Purchase airtime
curl --request POST \
--url https://api.sendpadi.com/api/v1/merchant/vas/airtime \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--header 'X-Api-Key: <api-key>' \
--header 'X-Signature: <x-signature>' \
--header 'X-Timestamp: <x-timestamp>' \
--data '
{
"phoneNumber": "080*******8",
"network": "MTN",
"amount": 50
}
'const options = {
method: 'POST',
headers: {
'X-Timestamp': '<x-timestamp>',
'X-Signature': '<x-signature>',
'Idempotency-Key': '<idempotency-key>',
'X-Api-Key': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({phoneNumber: '080*******8', network: 'MTN', amount: 50})
};
fetch('https://api.sendpadi.com/api/v1/merchant/vas/airtime', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.sendpadi.com/api/v1/merchant/vas/airtime"
payload = {
"phoneNumber": "080*******8",
"network": "MTN",
"amount": 50
}
headers = {
"X-Timestamp": "<x-timestamp>",
"X-Signature": "<x-signature>",
"Idempotency-Key": "<idempotency-key>",
"X-Api-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"success": true,
"data": {
"transactionId": "vas_airtime_001",
"reference": "AIRTIME-************-****",
"status": "completed",
"message": "Transaction submitted",
"details": {
"reference": "AIRTIME-************-****",
"transactionId": "vas_airtime_001",
"status": "completed",
"userMessage": "Transaction submitted",
"retryAfterSeconds": 3
}
}
}{
"success": false,
"data": {
"transactionId": null,
"reference": null,
"status": "FAILED",
"message": "We couldn't process your request: Maximum airtime purchase amount is 10000 NGN. Please check your details and try again."
},
"error": "VALIDATION_ERROR"
}{
"success": false,
"message": "Invalid request signature",
"error": true,
"errorCode": "MERCHANT_AUTH_SIGNATURE_INVALID"
}VAS (Bill payments)
Purchase airtime
Purchase airtime via merchant VAS API. Scope: vas:write. Requires Idempotency-Key.
POST
/
api
/
v1
/
merchant
/
vas
/
airtime
Purchase airtime
curl --request POST \
--url https://api.sendpadi.com/api/v1/merchant/vas/airtime \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--header 'X-Api-Key: <api-key>' \
--header 'X-Signature: <x-signature>' \
--header 'X-Timestamp: <x-timestamp>' \
--data '
{
"phoneNumber": "080*******8",
"network": "MTN",
"amount": 50
}
'const options = {
method: 'POST',
headers: {
'X-Timestamp': '<x-timestamp>',
'X-Signature': '<x-signature>',
'Idempotency-Key': '<idempotency-key>',
'X-Api-Key': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({phoneNumber: '080*******8', network: 'MTN', amount: 50})
};
fetch('https://api.sendpadi.com/api/v1/merchant/vas/airtime', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.sendpadi.com/api/v1/merchant/vas/airtime"
payload = {
"phoneNumber": "080*******8",
"network": "MTN",
"amount": 50
}
headers = {
"X-Timestamp": "<x-timestamp>",
"X-Signature": "<x-signature>",
"Idempotency-Key": "<idempotency-key>",
"X-Api-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"success": true,
"data": {
"transactionId": "vas_airtime_001",
"reference": "AIRTIME-************-****",
"status": "completed",
"message": "Transaction submitted",
"details": {
"reference": "AIRTIME-************-****",
"transactionId": "vas_airtime_001",
"status": "completed",
"userMessage": "Transaction submitted",
"retryAfterSeconds": 3
}
}
}{
"success": false,
"data": {
"transactionId": null,
"reference": null,
"status": "FAILED",
"message": "We couldn't process your request: Maximum airtime purchase amount is 10000 NGN. Please check your details and try again."
},
"error": "VALIDATION_ERROR"
}{
"success": false,
"message": "Invalid request signature",
"error": true,
"errorCode": "MERCHANT_AUTH_SIGNATURE_INVALID"
}Pick
network from List billers (category=airtime). Requires Idempotency-Key.Authorizations
API key id (sp_test_… / sp_live_…)
Headers
Unix time in seconds
HMAC-SHA256 signature
UUID. Required on money-moving writes.
Body
application/json
Response
OK
The response is of type object.

