Purchase Airtime

post
Purchase Airtime

https://api.cakes.com​/services​/airtime​/request
This endpoint allows you to purchase airtime for any or the network types. Service Types: (can be mtn, airtel, 9mobile, glo) mtn - MTN Nigeria airtel - Airtel Nigeria glo - Global Comm. 9mobile - 9 Mobile
Request
Response
Request
Headers
Authorization
required
string
See the authentications page
Body Parameters
agentReference
required
string
This is a unique key generated by the integrator (you) to identify the transaction. This has to be unique per transaction.
agentId
required
number
This is a numeric number given to the business as an identification number
plan
required
string
This can either be "prepaid" or "postpaid". Only "prepaid" services is offered for now by all mobile telecoms.
service_type
required
string
This is the service code type of the airtime provider you want to use. This field can be (mtn, airtel, 9mobile, glo)
amount
required
number
This is the amount you want to recharge ton your phone.
phone
required
string
11 digit mobile phone number that you want to recharge. e.g 07035361770
Response
200: OK
status: The success status means the transaction is successful message: just a description of the transaction status data: has an object property. statuscode: "0" means the transaction is successful transactionStatus: Response from the airtime provider transactionReference: This is the transaction reference generated by our B2B plaform. This is the transaction reference you need to be able to do a re-query of the said transaction. transactionMessage: successful message response.
"message": "Successful",
"code": 200,
"data": {
"statusCode": "0",
"transactionStatus": "success",
"transactionReference": 1,
"transactionMessage": "Airtime Topup successful on 07035361770"
}
}