Auto TopUp
API used to top up airtime when the balance is below a particular amount
Create a new user
POST {{baseUrl}/mtn/autotopup/subscription
Headers
Name
Value
Content-Type
application/json
client-id
your valid client-id
x-api-key
your valid x-api-key
Sample Request
{ "subscriberMSISDN": "08021483214", "thresholdType": "Airtime" }{ "subscriberMSISDN": "08021483214", "thresholdType": "Airtime", "airtimeThreshold": "5" }Body
Name
Type
Description
subscriberMSISDN
string
subscriber phoneNumber
thresholdType
string
Airtime
airtimeThreshold
string
This is only for MTN
Response
{
"status": 200,
"description": "Your top up amount has been update successfully.",
"data": null,
"responseCode": "00"
}{
"status_code": "401",
"transaction_id": null,
"reference": null,
"phonenumber": null,
"network": null,
"message": "Unathorized"
}{
"status": 400,
"description": "you have active subscription",
"data": null,
"responseCode": null
}{
"status": 400,
"description": "An error occured",
"data": {
"subscriberMSISDN": "Phonenumber must be 11 digits "
},
"responseCode": null
}{
"status": 400,
"description": "An error occured",
"data": {
"thresholdType": "Value must be Airtime or Data"
},
"responseCode": null
}Last updated