This endpoint enables the purchase of data and descriptions, both of which are available for use with their inherent descriptions.
Request
{{baseUrl}}/data/purchase
Headers
Parameter | Type | Description | Mandatory |
---|---|---|---|
Authorization | String | public secret key e.g dc_test_1T1eSavlZxy02OT3OWlvbxK4G | Required |
Body Parameters
Mandatory | Type | Description | Mandatory |
---|---|---|---|
datacode | String | You can subscribe to any data bundle via the following channels :USSD: dialing 1311# or *904# and select your prefered data plan. | Required |
phone_number | String | A valid phone number | Required |
service_type | String | This can be (mtn,airtel,glo etc.) | Required |
amount | String | This is the price value of the selected bundle | Required |
package | String | A standard for the type of data to purchase | Optional |
Response Sample
{
"status": "success",
"message": "Successful",
"code": 200,
"data": {
"statusCode": "0",
"transactionStatus": "success",
"transactionReference": 35814077,
"transactionMessage": "Data bundle successful on 08139021881",
"baxiReference": 1512899,
"provider_message": "SendOk",
"extraData": {
"balance": "1000",
"exchangeReference": "282505520",
"responseMessage": "SendOk",
"status": "ACCEPTED",
"statusCode": "0",
"responseCode": "0"
}
}
}