We’ve designed bills for simplicity and compatibility to take advantage of different use-cases, either a regular payment bill (Transaction Bills) or a dynamic (non-transactional Bills).
By default, all payment bills are transactional (i.e. they are unique and can receive value).
Use Case
On your store-front, you want each payment unique to each customer, then our regular payment bill (transactional bill) will be used. In a case where you want a reusable payment link to request money from your customers, then our dynamic payment bills (non-transactional) is best suited.
Regular (Transaction Bills)
Regular payment bills are unique with non-reusable payment references, and suitable for one-time payments.
POST
{{BASE_URL}}}/v1/checkout
{ "amount": 1000, "email": "user@gamil.com" }
Request Body
201: Created
Copy {
"success" : true ,
"data" : {
"outstanding" : 0 ,
"amountPaid" : 0 ,
"split" : false ,
"transactionCharge" : 0 ,
"type" : "regular" ,
"expiry" : false ,
"queuedForRetry" : false ,
"status" : "pending" ,
"message" : [] ,
"settled" : false ,
"retries" : 0 ,
"virtual" : false ,
"_id" : "xxx" ,
"deleted" : false ,
"merchantId" : "xxx" ,
"email" : "user@gamil.com" ,
"amount" : 1000 ,
"bearer" : "xxx" ,
"principalAccount" : "xxx" ,
"callback" : {} ,
"paymentRef" : "xxx" ,
"qrCode" : "xxx.png" ,
"originalBillAmount" : 1000 ,
"createdAt" : "2021-11-04T12:16:25.477Z" ,
"updatedAt" : "2021-11-04T12:16:25.477Z" ,
"__v" : 0
}
}
Dynamic (Non-Transactional Bills)
Dynamic payment bills are unique with reusable payment references, and suitable for accepting multiple payments.
Please note: every dynamic payment reference generates a unique payment reference at the time of payment.
POST
{{BASE_URL}}/v1/checkout
{ "amount": 1000, "email": "user@gamil.com", "type": "dynamic" }
Request Body
201: Created
Copy {
"success" : true ,
"data" : {
"expiry" : false ,
"type" : "dynamic" ,
"isFlexible" : true ,
"status" : "active" ,
"split" : false ,
"_id" : "xxx" ,
"deleted" : false ,
"merchantId" : "xxx" ,
"amount" : 1000 ,
"reference" : "xxx" ,
"qrCode" : "xxx.png" ,
"createdAt" : "2021-11-04T12:17:25.785Z" ,
"updatedAt" : "2021-11-04T12:17:25.785Z" ,
"__v" : 0
}
}
Payment Bill Properties
Re-query Payment
GET
{{BASE_URL}}/v1/checkout/requery/{{paymentRef}}
200: OK
Copy {
"success" : false ,
"data" : {
"outstanding" : 0 ,
"amountPaid" : 0 ,
"split" : true ,
"transactionCharge" : 0 ,
"type" : "regular" ,
"expiry" : false ,
"queuedForRetry" : false ,
"status" : "pending" ,
"message" : [] ,
"settled" : false ,
"retries" : 0 ,
"virtual" : false ,
"deleted" : false ,
"_id" : "xxx" ,
"merchantId" : "xxx" ,
"email" : "user@gamil.com" ,
"amount" : 1000 ,
"subaccounts" : [
{
"_id" : "xxx" ,
"accountRef" : "xxx" ,
"amount" : 100 ,
"accountNumber" : "xxx"
}
] ,
"bearer" : "xxx" ,
"principalAccount" : {
"_id" : "xxx" ,
"accountNumber" : "xxx" ,
"accountRef" : "xxx" ,
"percentage" : 0.1
} ,
"paymentRef" : "xxx" ,
"createdAt" : "2021-03-16T02:47:11.958Z" ,
"updatedAt" : "2021-03-16T02:47:11.958Z" ,
"__v" : 0
}
}
Update Payment Bills
Example
PUT
{{BASE_URL}}/v1/checkout/{{paymentRef}}
{ "amount": 30000, "email": "user@gamil.com", "split": true, "subaccounts": [ { "accountRef": " xxx", "amount": 100 } ] }
200: OK
Copy {
"success" : true ,
"data" : {
"split" : true ,
"transactionCharge" : 0 ,
"type" : "regular" ,
"expiry" : false ,
"queuedForRetry" : false ,
"status" : "pending" ,
"message" : [] ,
"settled" : false ,
"retries" : 0 ,
"deleted" : false ,
"_id" : "xxx" ,
"merchantId" : "xxx" ,
"email" : "user@gamil.com" ,
"amount" : 30000 ,
"subaccounts" : [
{
"_id" : "xxx" ,
"accountRef" : "xxx" ,
"amount" : 100 ,
"accountNumber" : "xxx"
}
] ,
"bearer" : "xxx" ,
"principalAccount" : {
"_id" : "xxx" ,
"accountNumber" : "xxx" ,
"accountRef" : "xxx" ,
"percentage" : 0.015
} ,
"paymentRef" : "xxx" ,
"createdAt" : "2021-03-16T11:15:07.066Z" ,
"updatedAt" : "2021-03-16T12:28:11.272Z" ,
"__v" : 0
}
}