Skip to main content
POST
/
api
/
external
/
v1
/
data
/
buy
Purchase data bundle
curl --request POST \
  --url https://api.dancity.app/api/external/v1/data/buy \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --header 'channel: <api-key>' \
  --data '
{
  "plan": "<string>",
  "phone": "08012345678",
  "wallettype": "main",
  "pin": "<string>",
  "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
plan
string
required

Data plan ID from catalogue

phone
string
required
Example:

"08012345678"

wallettype
string
required
Example:

"main"

pin
string
required
customerRef
string
saveAsBeneficiary
boolean
beneficiaryName
string
promocode
string
deviceKey
string

Response

OK

success
boolean
Example:

true

message
string
data
any