Skip to main content
POST
Make airtime purchases via sub account
Always requery the transaction using Fetch a single transaction on a sub account to confirm its final status before issuing a refund.
The code field in the response reflects the HTTP status code of the response. For example, 200 means the request completed successfully, and 201 means it was accepted and is still being processed.

Authorizations

Authorization
string
header
required

Nomba authenticates API calls with OAuth2 HTTP bearer tokens. There are two methods of authentication; Client-Credentials method and PKCE (Proof Key for Code Exchange) method. In each of the methods, You will get an ACCESS_TOKEN. You need to use an "Authorization" HTTP header to provide your ACCESS_TOKEN. For example: Authorization: {ACCESS_TOKEN}.

Headers

accountId
string<uuid>
required

The parent accountId of the business this sub account belongs to

Example:

"890022ce-bae0-45c1-9b9d-ee7872e6ca27"

Path Parameters

subAccountId
string<uuid>
required

The sub accountId via which airtime is to be purchased

Example:

"890022ce-bae0-45c1-9b9d-ee7872e6ca27"

Body

application/json

The request payload required to make airtime purchases

amount
number<double>
required

The airtime amount to be purchased

Example:

200

phoneNumber
string
required

Recipient phone number

Required string length: 11 - 13
Example:

"08055441122"

network
enum<string>
required

Recipient network (telco). It can also come as lowercased values e.g. glo, mtn etc.

Available options:
GLO,
MTN,
9MOBILE,
AIRTEL
Minimum string length: 3
Example:

"GLO"

merchantTxRef
string
required

Merchant Transaction Identifier reference (Unique to merchant)

This is an idempotency key and must be unique per transaction.

Example:

"3bvwhibh38220dsjakTwvb"

senderName
string

A name to describe the sender of the airtime

Example:

"John Doe"

Response

OK - your request was successful.

code
enum<string>
required

Response code. This reflects the HTTP status code of the response, e.g. 200 when the request completed successfully and 201 when it was accepted and is still being processed.

Available options:
200,
201,
400,
401,
403,
429,
500
Example:

"200"

description
string
required

Response description

Example:

"SUCCESS"

data
object
required
message
string

Response message

Example:

"Transaction completed Successfully"

status
boolean

Whether the request was successful

Example:

true