For the complete documentation index, see llms.txt. This page is also available as Markdown.

Vend

The "Vend" endpoint allows customers to pay for or purchase a package from a biller, for example, airtime, electricity, or a subscription.

POST /api/bills/v1/vend

To vend a bill, you need to provide the necessary body parameters, such as accountNumber, paymentReference, amount, packageIdentifier, billerIdentifier, and customerId.

Headers

Name
Value

Content-Type*

application/json

Authorization*

Bearer

Request-Reference

{unique_reference}

Body

Name
Data Type (Length)
Required
Description

accountNumber

string (10)

The account number to be debited.

paymentReference

string (50)

A unique instrument reference for this payment.

amount

number

The amount to be debited. Amount should be sent in the base unit of the currency. For example, 500 naira should be sent as 50,000 kobo.

packageIdentifier

string (50)

The package identifier, obtained from the Get All Billers endpoint.

billerIdentifier

string (50)

The biller identifier, obtained from the Get All Billers endpoint.

customerId

string (50)

The customer's unique ID to be recharged or reloaded. This can be the Phone Number or DSTV smart number, or a Bet account User ID, depending on the biller.

customerName

string (250)

For billers that require a name inquiry, pass the name obtained from the Get Customer (User ID) Information endpoint.

phoneNumber

string (50)

Some billers, like IBEDC, validate the phone number on the biller account. You're advised to pass the PhoneNumber from the Get Customer Information response. If not passed, the system will use the Phone Number already on the account.

transactionChannel

integer

The channel through which this transaction is being initiated.

Here is an example request and response with a sample payload sent to the endpoint in Curl format.

Sample Request
curl --location -g '{{baseurl}}/api/bills/v1/vend' \
--header 'Authorization: bearer {token}' \
--header 'request-reference: {unique_reference}' \
--header 'Content-Type: application/json' \
--data '{
  "paymentReference": "",
  "customerId": "09132058051",
  "phoneNumber": "",
  "packageIdentifier": "MTN_VTU",
  "billerIdentifier": "MTN",
  "amount": 10,
  "accountNumber": "1000002105",
  "transactionChannel": 1,
  "customerName": "John Doe"
}'
Response: 200

Last updated