-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathopenapi.yaml
More file actions
1618 lines (1582 loc) · 47.9 KB
/
openapi.yaml
File metadata and controls
1618 lines (1582 loc) · 47.9 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
openapi: 3.1.0
info:
title: Jenga API
description: API for Jenga payment processing and transaction management
version: 3.0.0
servers:
- url: https://api.finserve.africa
description: Production environment
- url: https://uat.finserve.africa
description: Sandbox/UAT environment
components:
securitySchemes:
ApiKeyAuth:
type: apiKey
in: header
name: Api-Key
description: API key for authentication
BearerAuth:
type: http
scheme: bearer
description: JWT token for authenticated requests
SignatureAuth:
type: apiKey
in: header
name: Signature
description: Base64 encoded RSA signature of the request payload
schemas:
Error:
type: object
properties:
status:
type: boolean
example: false
message:
type: string
example: "Authentication failed"
AuthenticationRequest:
type: object
required:
- merchantCode
- consumerSecret
properties:
merchantCode:
type: string
description: Merchant code for authentication
example: "123456"
consumerSecret:
type: string
description: Consumer secret for authentication
example: "secret123"
AuthenticationResponse:
type: object
properties:
accessToken:
type: string
description: JWT access token
example: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
expiresIn:
type: string
format: date-time
description: Token expiration timestamp
example: "2024-03-20T10:00:00Z"
issuedAt:
type: string
format: date-time
description: When the token was issued
example: "2024-03-20T09:00:00Z"
tokenType:
type: string
description: Type of token
example: "Bearer"
refreshToken:
type: string
description: Token used to refresh the access token
example: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
MPesaTransactionStatus:
type: object
properties:
status:
type: boolean
description: Indicates if the request was successful
example: true
code:
type: string
description: Response code indicating status
example: "0"
message:
type: string
description: Description of the response status
example: "Order found"
data:
type: object
properties:
order:
type: object
properties:
orderAmount:
type: number
description: Request amount
example: 2.0
amountPaid:
type: number
description: Amount paid by customer including service charge
example: 2.0
orderReference:
type: string
description: Order Reference
example: "OR28922980077"
orderStatus:
type: string
description: Status of an order (Paid, Pending)
example: "Paid"
createdOn:
type: number
description: Creation date of the order in EPOC time
example: 1723209757300
invoices:
type: array
items:
type: object
properties:
amount:
type: number
description: Invoice Amount
example: 100.0
amountDebited:
type: number
description: Amount paid by the customer
example: 100.0
charge:
type: number
description: Service charge
example: 0.0
invoiceStatus:
type: string
description: Status of invoice (Pending, Paid, Cancelled, Expired)
example: "Expired"
orderReference:
type: string
description: Order Reference
example: "ORD1748939052F6DD4B"
externalReference:
type: string
nullable: true
description: Mpesa Reference
example: null
createdOn:
type: string
description: Date invoice was generated
example: "2025-06-03 11:26:22.347"
completedOn:
type: string
nullable: true
description: Date Payment was completed
example: null
BillPaymentRequest:
type: object
required:
- biller
- bill
- payer
- partnerId
properties:
biller:
type: object
required:
- billerCode
- countryCode
properties:
billerCode:
type: string
description: The unique code for the biller
example: "320320"
countryCode:
type: string
description: The country code of the biller
example: "KE"
bill:
type: object
required:
- reference
- amount
- currency
properties:
reference:
type: string
description: The reference number for the bill
example: "10170476767676"
amount:
type: string
description: The amount to be paid
example: "111.00"
currency:
type: string
description: The currency for the payment
example: "KES"
payer:
type: object
required:
- name
- account
- reference
- mobileNumber
properties:
name:
type: string
description: The name of the person making the payment
example: "A. N Other"
account:
type: string
description: The account number for the payer
example: "101704"
reference:
type: string
description: The reference number for the payer's transaction
example: "123451000002"
mobileNumber:
type: string
description: The mobile number of the payer
example: "0764555320"
partnerId:
type: string
description: The ID of the partner initiating the payment
example: "0020100014605"
remarks:
type: string
description: Additional remarks about the payment
example: "These are just some remarks"
BillPaymentResponse:
type: object
properties:
status:
type: boolean
description: Overall status of the response
example: true
code:
type: integer
description: Response code
example: 0
message:
type: string
description: Response message
example: "success"
reference:
type: string
description: Bill reference number
example: "10170476767676"
data:
type: object
properties:
transactionId:
type: string
description: Payment transaction ID (returned only if payment is successful)
example: "123451000002"
status:
type: string
description: Bill processing status
example: "SUCCESS"
BillValidationRequest:
type: object
required:
- billerCode
- customerRefNumber
- amount
- amountCurrency
properties:
billerCode:
type: string
description: The code for the biller. This is provided by the service provider.
example: "320320"
customerRefNumber:
type: string
description: The reference number for the customer's bill.
example: "28055948"
amount:
type: string
description: The amount to be validated.
example: "1000.00"
amountCurrency:
type: string
description: The currency of the amount (e.g., KES, USD).
example: "KES"
BillValidationResponse:
type: object
properties:
status:
type: boolean
description: Response status
example: true
code:
type: integer
description: Response code
example: 0
message:
type: string
description: Response message
example: "success"
data:
type: object
properties:
amount:
type: string
description: Bill amount
example: "1000.0"
customerRefNumber:
type: string
description: Bill identifier
example: "101704"
name:
type: string
description: Bill name
example: "John Doe"
billStatus:
type: string
description: Bill status
example: "true"
message:
type: string
description: Bill query response message
example: "SUCCESS"
createdOn:
type: string
description: Bill create date on third party system
example: "Fri Jun 24 11:04:14 EAT 2022"
amountCurrency:
type: string
description: Bill amount currency
example: "KES"
status:
type: boolean
description: Bill status
example: true
EquitelPushRequest:
type: object
required:
- merchant
- payment
properties:
merchant:
type: object
required:
- countryCode
- accountNumber
- name
properties:
countryCode:
type: string
description: Merchant country code
example: "KE"
accountNumber:
type: string
description: Account number to be credited on payment completion
example: "0170194290581"
name:
type: string
description: Merchant name
example: "Sportify Ltd"
payment:
type: object
required:
- ref
- mobileNumber
- telco
- amount
- date
- callBackUrl
- pushType
properties:
ref:
type: string
description: Payment Reference (6-12 alphanumeric characters)
example: "MPS3883889822982"
mobileNumber:
type: string
description: Payer's mobile number with country code prefix
example: "254764555291"
telco:
type: string
description: Payer's telco
example: "Equitel"
amount:
type: string
description: Transaction amount (up to 2 decimal places)
example: "5.00"
date:
type: string
format: date
description: Transaction date in YYYY-MM-DD format
example: "2024-08-13"
callBackUrl:
type: string
format: uri
description: Callback URL for transaction status notifications
example: "https://webhook.site/6173e296-a2b0-4fb5-a06e-bfbb2e352e30"
pushType:
type: string
enum: [STK, USSD]
description: Type of push notification
example: "STK"
EquitelPushResponse:
type: object
properties:
status:
type: boolean
description: Overall status of the response
example: true
code:
type: integer
description: Response code
example: -1
message:
type: string
description: Response message
example: "Transaction has been successfully acknowledged, await final transaction status on callback"
reference:
type: string
description: Payment reference number
example: "MPS3883889822982"
transactionId:
type: string
description: Transaction ID
example: "MPS3883889822982"
EquitelCallbackResponse:
type: object
properties:
status:
type: boolean
description: Transaction status
example: true
code:
type: integer
description: Status code
example: 3
enum: [0, 1, 2, 3, 4, 5, 6, 7]
message:
type: string
description: Status message
example: "Successful"
transactionReference:
type: string
description: Transaction reference number
example: "MPS3883889822982"
telcoReference:
type: string
description: Telco reference number
example: "MPS3883889822982"
mobileNumber:
type: string
description: Payer's mobile number
example: "254764555291"
debitedAmount:
type: number
description: Amount debited from payer
example: 5
requestAmount:
type: number
description: Original requested amount
example: 5
charge:
type: number
description: Service charge
example: 1
currency:
type: string
description: Transaction currency
example: "KES"
telco:
type: string
description: Telco provider
example: "Equitel"
MPesaStkPushRequest:
type: object
required:
- order
- customer
- payment
properties:
order:
type: object
required:
- orderReference
- orderAmount
- orderCurrency
- source
- countryCode
- description
properties:
orderReference:
type: string
description: Order reference, should be unique per order
example: "OR28922980077"
orderAmount:
type: number
description: Original order amount
example: 2
orderCurrency:
type: string
description: Currency of the order
example: "KES"
source:
type: string
description: Source of the order
example: "APICHECKOUT"
countryCode:
type: string
description: Source country code (alpha-2)
example: "KE"
description:
type: string
description: Description of the order
example: "Purchase"
customer:
type: object
required:
- name
- email
- phoneNumber
- identityNumber
properties:
name:
type: string
description: Customer's name
example: "John Doe"
email:
type: string
format: email
description: Customer's email
example: "xyx2@gmail.com"
phoneNumber:
type: string
description: Customer's phone number
example: "0722000111"
identityNumber:
type: string
description: Customer's identity number
example: "0000000"
firstAddress:
type: string
description: Customer's first address
example: ""
secondAddress:
type: string
description: Customer's second address
example: ""
payment:
type: object
required:
- paymentReference
- paymentCurrency
- channel
- service
- provider
- callbackUrl
- details
properties:
paymentReference:
type: string
description: Payment reference, should be unique per request
example: "MKQR28922980073"
paymentCurrency:
type: string
description: Currency of the payment
example: "KES"
channel:
type: string
description: Channel of the payment
example: "MOBILE"
service:
type: string
description: Payment service
example: "MPESA"
provider:
type: string
description: Payment provider
example: "JENGA"
callbackUrl:
type: string
format: uri
description: Callback URL for transaction status
example: "https://webhook.site/5c74a733-1caa-4f10-b876-3df9c0d7453c"
details:
type: object
required:
- msisdn
- paymentAmount
properties:
msisdn:
type: string
description: Number to push the STK
example: "0722000000"
paymentAmount:
type: number
description: Amount to pay on the request
example: 2
MPesaStkPushResponse:
type: object
properties:
status:
type: boolean
description: Response status
example: true
code:
type: string
description: Response code
example: "0"
message:
type: string
description: Response message
example: "Order found"
data:
type: object
properties:
order:
type: object
properties:
orderAmount:
type: number
description: Request amount
example: 100.0
amountPaid:
type: number
description: Amount paid by customer including service charge
example: 0.0
orderReference:
type: string
description: Order Reference
example: "ORD1748939052F6DD4B"
orderStatus:
type: string
description: Status of an order (Paid, Pending, Expired)
example: "Expired"
createdOn:
type: number
description: Creation date of the order in EPOC time
example: 1748939182287
invoices:
type: array
items:
type: object
properties:
amount:
type: number
description: Invoice Amount
example: 100.0
amountDebited:
type: number
description: Amount paid by the customer
example: 100.0
charge:
type: number
description: Service charge
example: 0.0
invoiceStatus:
type: string
description: Status of invoice (Pending, Paid, Cancelled, Expired)
example: "Expired"
orderReference:
type: string
description: Order Reference
example: "ORD1748939052F6DD4B"
externalReference:
type: string
nullable: true
description: Mpesa Reference
example: null
createdOn:
type: string
description: Date invoice was generated
example: "2025-06-03 11:26:22.347"
completedOn:
type: string
nullable: true
description: Date Payment was completed
example: null
MPesaCallbackResponse:
type: object
properties:
callbackType:
type: string
description: Type of callback
example: "IPN"
customer:
type: object
properties:
name:
type: string
description: Customer name
example: "John Doe"
mobileNumber:
type: string
description: Customer mobile number
example: "0722000000"
reference:
type: string
description: Customer reference
example: "OR28922980077"
transaction:
type: object
properties:
date:
type: string
format: date-time
description: Transaction date
example: "2024-08-09 16:22:50"
reference:
type: string
description: Transaction reference
example: "SH90HU7FO2"
paymentMode:
type: string
description: Payment mode
example: "MPESA"
amount:
type: number
description: Transaction amount
example: 2
currency:
type: string
description: Transaction currency
example: "KES"
serviceCharge:
type: number
description: Service charge
example: 1
billNumber:
type: string
description: Bill number
example: "INVDBU"
servedBy:
type: string
description: Service provider
example: "JENGA"
additionalInfo:
type: string
description: Additional information
example: "MPESA"
orderAmount:
type: number
description: Order amount
example: 2
orderCurrency:
type: string
description: Order currency
example: "KES"
status:
type: string
description: Transaction status
example: "SUCCESS"
remarks:
type: string
description: Transaction remarks
example: "ED990222"
bank:
type: object
properties:
reference:
type: string
description: Bank reference
example: "NONE"
transactionType:
type: string
description: Transaction type
example: "C"
account:
type: string
description: Account number
example: "NONE"
PaymentLinkRequest:
type: object
required:
- customers
- paymentLink
properties:
customers:
type: array
items:
type: object
required:
- firstName
- lastName
- email
- countryCode
properties:
firstName:
type: string
description: First Name of the customer
example: "John"
lastName:
type: string
description: Last Name of the customer
example: "Doe"
email:
type: string
format: email
description: Customer Email
example: "johndoe902@gmail.com"
phoneNumber:
type: string
description: Customer phone number
example: "254764848636"
firstAddress:
type: string
description: Physical Address
example: ""
countryCode:
type: string
description: Alpha-2 country code
example: "KE"
postalOrZipCode:
type: string
description: Postal or Zip Code
example: "00100"
customerExternalRef:
type: string
description: Unique identifier for customer
example: "575657788779"
paymentLink:
type: object
required:
- expiryDate
- saleDate
- saleType
- paymentLinkType
- name
- description
- externalRef
- amountOption
- amount
- currency
properties:
expiryDate:
type: string
format: date
description: Link Expiry date (yyyy-MM-dd)
example: "2024-03-22"
saleDate:
type: string
format: date
description: Date service or product offered (yyyy-MM-dd)
example: "2024-02-20"
saleType:
type: string
enum: [SERVICE, PRODUCT]
description: Type of sale
example: "SERVICE"
paymentLinkType:
type: string
enum: [SINGLE, BULK]
description: Type of payment link
example: "SINGLE"
name:
type: string
description: Name of product or Service
example: "Hotel Reservation"
description:
type: string
description: Description of service or product
example: "Hotel Reservation"
externalRef:
type: string
description: Third Party reference
example: "575657788779"
paymentLinkRef:
type: string
description: Link reference for updating link details
example: ""
redirectURL:
type: string
format: uri
description: Website URL to redirect to on successful payment
example: "https://v3.jengahq.io"
amountOption:
type: string
enum: [OPEN, RESTRICTED]
description: Allow change amount or not
example: "OPEN"
amount:
type: number
description: Payment Link amount
example: 400
currency:
type: string
description: Payment currency
example: "KES"
notifications:
type: array
items:
type: string
enum: [EMAIL, SMS]
description: Modes for customer to receive payment link
example: ["EMAIL", "SMS"]
PaymentLinkResponse:
type: object
properties:
status:
type: boolean
description: Response status
example: true
code:
type: integer
description: Response code
example: 200
message:
type: string
description: Response message
example: "Payment link successfully generated"
metadata:
type: object
description: Additional metadata
data:
type: object
properties:
dateCreated:
type: integer
description: Timestamp of creation
example: 1709277210697
paymentLinkRef:
type: string
description: Payment link reference
example: "456175577507808"
externalRef:
type: string
description: External reference
example: "565657788779"
status:
type: object
properties:
code:
type: string
description: Status code
example: "PEND"
name:
type: string
description: Status name
example: "Pending"
EazzyPayMerchant:
type: object
properties:
name:
type: string
description: Merchant name
example: "Nakumatt"
tillnumber:
type: string
description: Merchant till number
example: "0766002221"
outlets:
type: array
items:
type: object
properties:
name:
type: string
description: Merchant outlet name
example: "Nakumatt Presitige"
tillnumber:
type: string
description: Merchant outlet till number
example: "0766002201"
EazzyPayMerchantsResponse:
type: object
properties:
merchants:
type: array
items:
$ref: '#/components/schemas/EazzyPayMerchant'
TransactionDetailsResponse:
type: object
properties:
status:
type: boolean
description: Response status
example: true
code:
type: string
description: Response code
example: "0"
message:
type: string
description: Response message