Skip to main content
POST
/
api
/
external
/
v1
/
airtime
/
buy
Purchase airtime
curl --request POST \
  --url https://api.dancity.app/api/external/v1/airtime/buy \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --header 'channel: <api-key>' \
  --data '
{
  "product": "MTN Airtime",
  "phone": "08012345678",
  "amount": 525,
  "pin": "1234",
  "customerRef": "<string>",
  "saveAsBeneficiary": true,
  "beneficiaryName": "<string>",
  "promocode": "<string>",
  "deviceKey": "<string>"
}
'
{
  "success": true,
  "message": "<string>",
  "data": "<unknown>"
}

Authorizations

Authorization
string
header
required

Merchant API key from the Dancity dashboard.

channel
string
header
required

Required on VAS (merchant /api/external/v1) requests. Use API for server integrations.

Body

application/json
product
string
required
Example:

"MTN Airtime"

phone
string
required
Example:

"08012345678"

amount
number
required
Required range: 50 <= x <= 1000
pin
string
required
Example:

"1234"

customerRef
string
saveAsBeneficiary
boolean
beneficiaryName
string
promocode
string
deviceKey
string

Response

OK

success
boolean
Example:

true

message
string
data
any