TRUSTPLUG DEVELOPERS

Buy data

POST /api/data

curl -X POST https://trustplug.ng/api/data \
  -H "Authorization: Token YOUR_SECRET_KEY" \
  -H "Content-Type: application/json" \
  -d '{"mobile_number":"08012345678","plan":12,"request_id":"data-unique-001","vending_type":"wallet"}'

Replace 12 with a valid ID from Data Plans. The account’s saved vending method controls MTN delivery. Airtel, T2/9mobile, Glo and wallet-only plans use the admin-selected supplier for that network. Plan IDs are your local Data Plans IDs; supplier plan IDs are mapped internally. Wallet prices come from the selected supplier’s price column.

Use a unique request_id for each intended purchase. Repeating a data request with the same reference returns its stored purchase; changing its details is rejected. If a response is missing, check transaction history before creating another purchase.

Select vending type

The account’s saved method controls MTN vending; non-MTN and wallet-only plans use wallet vending. The request cannot override that saved method. Airtime keeps its existing method and supplier settings. Wallet purchases require sufficient funds. Use a unique request_id for each intended purchase and keep the same ID when checking it. Keep the same request_id until the purchase outcome is confirmed.