Purchase Airtime

Use this endpoint to purchase airtime for a mobile phone number.

Before making an airtime purchase, the user's billing wallet must be mapped for utility transactions.

Endpoint

POST {{base_url}}/api/v1/utility/transactions/airtime

Headers

HeaderTypeRequiredDescription
AuthorizationstringYesBearer authentication token.
x-merchant-refstringYesYour unique merchant reference.
Content-TypestringYesMust be application/json.

Authorization

Include your access token using the Bearer authentication scheme:

Authorization: Bearer YOUR_ACCESS_TOKEN

Request Body

{
  "user_ref": "{{vault:Merchant-user-ref}}",
  "operator_id": "1",
  "product_id": "1",
  "recipient": "2349023172491",
  "amount": 10,
  "currency": "NGN",
  "reference": "buy000001"
}

Request Fields

FieldTypeRequiredDescription
user_refstringYesReference of the user making the airtime purchase.
operator_idstringYesIdentifier of the mobile network operator.
product_idstringYesIdentifier of the airtime product.
recipientstringYesPhone number that will receive the airtime. Use the appropriate international format.
amountnumberYesAmount of airtime to purchase.
currencystringYesCurrency of the transaction.
referencestringYesMerchant-generated reference used to identify the transaction.

Example Request


   {
    "user_ref": "{{vault:Merchant-user-ref}}",
    "operator_id": "1",
    "product_id": "1",
    "recipient": "2349023172491",
    "amount": 10,
    "currency": "NGN",
    "reference": "buy000001"
  }

Response

A successful request returns the payment reference, transaction reference, wallet information, debit details, and the response received from the utility provider.

{
  "status": "success",
  "message": "Airtime purchase successful",
  "data": {
    "payment_ref": "a214d6da-126c-4c2d-9853-ba5006d0d0d9",
    "txn_ref": "buy000001",
    "wallet_id": "LBWNGN81C4801EE29D43F8A0B2231E367B74550063J",
    "debit_currency": "NGN",
    "debit_amount": 10,
    "utility_response": {
      "data": {
        "amountOperator": "10.00",
        "amountUser": "10",
        "artxId": 206954114999217600,
        "artxStatus": 0,
        "artxStatusDescription": "Successful",
        "balanceAfter": "12.84",
        "createdAt": "2026-08-30T17:04:16.401612Z",
        "currency": "NGN",
        "id": "b7aa68a0-f396-486f-9ef3-88bd4a8119fe",
        "kind": "airtime",
        "operatorId": "1",
        "productId": "1",
        "recipient": "2349023172491",
        "reference": "buy000001",
        "status": "success",
        "updatedAt": "2026-08-30T17:04:16.401612Z"
      }
    }
  }
}

Response Fields

Transaction Details

FieldTypeDescription
payment_refstringUnique reference generated for the payment.
txn_refstringTransaction reference associated with the purchase.
wallet_idstringWallet used to fund the transaction.
debit_currencystringCurrency debited from the wallet.
debit_amountnumberAmount debited from the wallet.

Utility Response

The utility_response.data object contains the response returned by the underlying utility provider.

FieldTypeDescription
amountOperatorstringAmount processed by the utility operator.
amountUserstringAmount charged to the user.
artxIdnumberUtility provider transaction identifier.
artxStatusnumberStatus code returned by the utility provider.
artxStatusDescriptionstringDescription of the utility provider status.
balanceAfterstringRemaining balance reported after the transaction.
createdAtstringTimestamp when the utility transaction was created.
currencystringCurrency of the utility transaction.
idstringUnique utility transaction identifier.
kindstringType of utility transaction. For this endpoint, the value is airtime.
operatorIdstringMobile network operator identifier.
productIdstringAirtime product identifier.
recipientstringPhone number that received the airtime.
referencestringTransaction reference supplied in the request.
statusstringUtility transaction status.
updatedAtstringTimestamp when the utility transaction was last updated.

Transaction Flow

User
  ↓
Billing Wallet Mapped
  ↓
Identify Operator
  ↓
Select Airtime Product
  ↓
Purchase Airtime
  ↓
LedgerBlock Processes Transaction
  ↓
Transaction Result / Webhook

Important: The user must have a billing wallet mapped for utility transactions before purchasing airtime.


Did this page help you?