Buy a package
POST
/databundle-api-v2/buyDebits your wallet for the package price and sends it to the number. Keep the returned ext_transaction_id to check status.
Parameters
phone_numberstringrequiredRecipient number.
service_idstringrequiredFrom List data services.
package_idstringrequiredFrom List packages, fetched within the last 60 minutes.
networkstringrequiredRecipient network code.
MTNVDFATLtypestringrequiredAlways e_wallet: packages are paid from your wallet.
e_walletnamestringoptionalRecipient name for your records.
| Field | Type | Required | Description |
|---|---|---|---|
phone_number | string | required | Recipient number. |
service_id | string | required | From List data services. |
package_id | string | required | From List packages, fetched within the last 60 minutes. |
network | string | required | Recipient network code.MTNVDFATL |
type | string | required | Always e_wallet: packages are paid from your wallet.e_wallet |
name | string | optional | Recipient name for your records. |
Errors
- 400Insufficient wallet balance
- 404Invalid Package ID or Package ID has expired
Request
curl -X POST "https://api.bulkclix.com/api/v1/databundle-api-v2/buy" \ -H "x-api-key: YOUR_API_KEY" \ -H "Accept: application/json" \ -H "Content-Type: application/json" \ -d '{ "phone_number": "0241234567", "service_id": "b2c3d4e5-0000-4000-8000-000000000001", "package_id": "c9d8e7f6-1111-4000-8000-000000000009", "network": "MTN", "type": "e_wallet" }'
Response · 200
application/json
{ "message": "Payment Initiated Successful", "data": { "payment": { "amount": "10.00", "status": "success", "ext_transaction_id": "DB7F3A9C2E1B" }, "data_bundle": { "status": "submitted", "display": "2GB - 30 days", "phone_number": "233241234567" } } }