Skip to main content

Make Payment

To process a payment, there are two stages:

AUTH: Payment must be authorized by making a request with Action set to Auth. The vendor's request is validated, wallet funding is checked, and the biller's availability is confirmed. The account details of the specified member are returned for customer confirmation.

PAY: An authorized payment is then initiated with Action set to Pay. The vendor's wallet is debited and the product(s) or service(s) are provisioned.

warning

AUTH and PAY requests should be identical. Send the AUTH request prior to debiting the customer's payment method, to avoid having to refund them following an invalid request or incorrect member number.

info

In some cases, PAY may differ slightly from AUTH — e.g. if the customer's balance owing is returned during AUTH, the TotalAmount and each product's Price fields should be left blank in the PAY request.

Request

POST /api/payment/process

Payment Request Fields

FieldTypeDescriptionRequired
ActionStringSee Action values belowRequired
BillerCodeStringCode identifying the billerRequired
ReferenceStringVendor's unique reference per transaction (same for AUTH and PAY)Required
MemberNumberStringThe member number whose account/service/product will be creditedRequired
ProductsArray of PaymentProductThe product(s) to be paid forRequired
TotalAmountDecimalSum of product/service totals. Can be blank if AUTH returns balance/amountRequired
PayerDetailsPayerDetailsDetails of vendor/customer payment. Required during PAY by some billersOptional

Payment Product

FieldTypeDescriptionRequired
CodeStringUnique identifier for the productRequired
QuantityIntegerDefaults to 1 if not specifiedOptional
DepartmentStringMandatory if the product has a departmentSometimes
PriceDecimalLeave blank if AUTH returns balance/amount. Required during PAYSometimes
RequiresForexPaymentBooleanRequired as acknowledgement of forex requirementSometimes
MetadataArray of Key/Value PairsAny required metadata for the productSometimes

Payer Details

Only required by some billers, and when applicable only required during PAY (can be left blank during AUTH).

FieldTypeDescription
BankAccountNameStringSource bank account name
BankAccountNumberStringSource bank account number
BankNameStringSource bank name
BankBranchStringSource bank branch
BankReferenceStringSource bank reference, used for reconciliation
ContactNumberStringUsed by some billers to contact the payer
NationalIdStringUsed by some billers to validate payer identity

Action

ActionDescription
AuthAuthorize a payment before it can be initiated
PayInitiate an authorized payment
RetryRetry a payment (in case of a retryable error or network interruption)
StatusGet the status of a payment

Sample Auth Request

// POST /api/payment/process
{
"BillerCode": "COB",
"MemberNumber": "ABC123",
"Reference": "08be48c6-2624-4a06-95eb-be79ff5d6ef5",
"TotalAmount": "100",
"Products": [
{
"Code": "USD",
"Quantity": "1",
"Price": 100,
"RequiresForexPayment": true
}
],
"Action": "AUTH"
}

Sample Pay Request

// POST /api/payment/process
{
"BillerCode": "COB",
"MemberNumber": "ABC123",
"Reference": "08be48c6-2624-4a06-95eb-be79ff5d6ef5",
"TotalAmount": "100",
"Products": [
{
"Code": "USD",
"Quantity": "1",
"Price": 100,
"RequiresForexPayment": true
}
],
"Action": "PAY"
}