Airtime
Airtime
Airtime
Airtime
Buy airtime
POST
/
airtime
/
buy
curl --request POST \
--url https://api.simpu.co/airtime/buy \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '{
"network": "Airtel",
"amount": 1500,
"recipient": "2348023456789",
"callback": "https://example.com/airtime/delivery_report",
"external_ref": "674535b2b39158b9aae90188fcec23eb"
}'
{
"id": "674535b2b39158b9aae90188fcec23eb",
"recipient": "2348023456789",
"external_ref": "674535b2b39158b9aae90188fcec23eb",
"callback": "https://example.com/airtime/delivery_report",
"status": "pending",
"created_datetime": "2024-06-28T23:56:38.128604+00:00",
"network": "Airtel",
"meta": {
"method": "POST",
"resource": "/airtime/buy",
"charge": {
"amount": 1500,
"available_balance": 2000,
"balance_before": 500,
"refunded": false
}
}
}
Authorizations
An API key to authenticate requests
Body
application/json
Buy airtime object
The body is of type object
.
Response
200
application/json
Buy airtime response
The response is of type object
.
curl --request POST \
--url https://api.simpu.co/airtime/buy \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '{
"network": "Airtel",
"amount": 1500,
"recipient": "2348023456789",
"callback": "https://example.com/airtime/delivery_report",
"external_ref": "674535b2b39158b9aae90188fcec23eb"
}'
{
"id": "674535b2b39158b9aae90188fcec23eb",
"recipient": "2348023456789",
"external_ref": "674535b2b39158b9aae90188fcec23eb",
"callback": "https://example.com/airtime/delivery_report",
"status": "pending",
"created_datetime": "2024-06-28T23:56:38.128604+00:00",
"network": "Airtel",
"meta": {
"method": "POST",
"resource": "/airtime/buy",
"charge": {
"amount": 1500,
"available_balance": 2000,
"balance_before": 500,
"refunded": false
}
}
}