Purchase Data
curl --request POST \
--url https://api.dancity.app/api/v1/data/buy \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"plan": "40GB_MTN_GIFTING_1Day",
"phone": "080*******",
"wallettype": "main",
"customerRef": "DATA-REF-001"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
plan: '40GB_MTN_GIFTING_1Day',
phone: '080*******',
wallettype: 'main',
customerRef: 'DATA-REF-001'
})
};
fetch('https://api.dancity.app/api/v1/data/buy', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.dancity.app/api/v1/data/buy"
payload = {
"plan": "40GB_MTN_GIFTING_1Day",
"phone": "080*******",
"wallettype": "main",
"customerRef": "DATA-REF-001"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"success": true,
"message": "Data purchase processed",
"data": {
"_id": "6a1c3cf26da239b6da0e26dc",
"tranxId": "DNTY506236YALLPF",
"service": "DATA",
"product": "MTN GIFTING",
"tranxType": "DEBIT",
"status": "FAILED",
"currency": "NGN",
"remarks": "MTN GIFTING 40MB for 1 Day",
"amount": 50,
"fee": 0,
"amountPaid": 50,
"balanceBefore": 5276,
"balanceAfter": 5226,
"number": "09015665451",
"customerRef": "DATA-REF-001",
"channel": "API",
"paymentMedium": "MAIN WALLET",
"tranxDate": "2026-05-31T13:51:46.236Z",
"apiResponse": "Sorry, you are not allowed to migrate to Betamix Bundle Mini Plan. Thank you! — Oh dear! It seems xxxxxxxxxxx is not eligible for this bundle. Please select a new bundle and try again",
"isReversal": false,
"quantity": 0,
"createdAt": "2026-05-31T13:51:46.238Z"
}
}{
"success": false,
"message": "Validation failed",
"statusCode": 400
}{
"success": false,
"message": "Invalid API key or IP not allowlisted",
"statusCode": 401
}{
"success": false,
"message": "Sorry, something went wrong. Please try again later",
"statusCode": 500
}VAS
Purchase Data
Purchase Data
POST
/
api
/
v1
/
data
/
buy
Purchase Data
curl --request POST \
--url https://api.dancity.app/api/v1/data/buy \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"plan": "40GB_MTN_GIFTING_1Day",
"phone": "080*******",
"wallettype": "main",
"customerRef": "DATA-REF-001"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
plan: '40GB_MTN_GIFTING_1Day',
phone: '080*******',
wallettype: 'main',
customerRef: 'DATA-REF-001'
})
};
fetch('https://api.dancity.app/api/v1/data/buy', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.dancity.app/api/v1/data/buy"
payload = {
"plan": "40GB_MTN_GIFTING_1Day",
"phone": "080*******",
"wallettype": "main",
"customerRef": "DATA-REF-001"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"success": true,
"message": "Data purchase processed",
"data": {
"_id": "6a1c3cf26da239b6da0e26dc",
"tranxId": "DNTY506236YALLPF",
"service": "DATA",
"product": "MTN GIFTING",
"tranxType": "DEBIT",
"status": "FAILED",
"currency": "NGN",
"remarks": "MTN GIFTING 40MB for 1 Day",
"amount": 50,
"fee": 0,
"amountPaid": 50,
"balanceBefore": 5276,
"balanceAfter": 5226,
"number": "09015665451",
"customerRef": "DATA-REF-001",
"channel": "API",
"paymentMedium": "MAIN WALLET",
"tranxDate": "2026-05-31T13:51:46.236Z",
"apiResponse": "Sorry, you are not allowed to migrate to Betamix Bundle Mini Plan. Thank you! — Oh dear! It seems xxxxxxxxxxx is not eligible for this bundle. Please select a new bundle and try again",
"isReversal": false,
"quantity": 0,
"createdAt": "2026-05-31T13:51:46.238Z"
}
}{
"success": false,
"message": "Validation failed",
"statusCode": 400
}{
"success": false,
"message": "Invalid API key or IP not allowlisted",
"statusCode": 401
}{
"success": false,
"message": "Sorry, something went wrong. Please try again later",
"statusCode": 500
}Body
application/json
Response
OK
