Buy a package

POST/databundle-api-v2/buy

Debits your wallet for the package price and sends it to the number. Keep the returned ext_transaction_id to check status.

Parameters

  • phone_numberstringrequired

    Recipient number.

  • service_idstringrequired

    From List data services.

  • package_idstringrequired

    From List packages, fetched within the last 60 minutes.

  • networkstringrequired

    Recipient network code.

    MTNVDFATL
  • typestringrequired

    Always e_wallet: packages are paid from your wallet.

    e_wallet
  • namestringoptional

    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"
    }
  }
}