HubtelDevelopers
API referenceCommission Services

Buy MTN data bundle

POST
/commissionservices/{accountNumber}/b230733cd56b4a0fad820e39f66bc27c

Pays for MTN data bundles from your prepaid balance; look up a phone number first with the matching query. The response is pending and the final result arrives at your callback URL. Use a unique ClientReference to identify the transaction. Check its status before retrying an uncertain payment. You earn commission on each successful sale.

Authorization

basicAuth
AuthorizationBasic <token>

Base64 of API ID:API Key.

In: header

Path Parameters

accountNumber*string

Your disbursement account number (prepaid), which funds payouts and purchases. Find it in your Hubtel merchant account under Programmable keys → Account ID. In the sandbox, use the disbursement account in Workbench.

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

Callbacks

curl -X POST "https://example.com/commissionservices/string/b230733cd56b4a0fad820e39f66bc27c" \  -H "Content-Type: application/json" \  -d '{    "Destination": "233246912184",    "Amount": 0.5,    "CallbackUrl": "https://webhook.site/fcad8efa-624b-44c8-a129-b1c01921191d",    "ClientReference": "TestDATA01013",    "Extradata": {      "bundle": "data_bundle_1"    }  }'
{  "ResponseCode": "0001",  "Message": "Transaction pending. Expect callback request for final state.",  "Data": {    "ClientReference": "TestDATA01013",    "Amount": 0.5,    "TransactionId": "5b40e2e40fd4441d80b69b352f3103c7",    "Meta": {      "Commission": "0.0198"    }  }}