DataplanetDataplanetDevelopers
HomeSign inGet API keyAPI key

Dataplanet Developers

API Documentation

Merchant REST API for data, airtime, electricity, cable TV, exam PINs, betting and more. Build in the sandbox with test money, then go live with one key change.

JSON over HTTPS Free sandbox Signed webhooks

Base URL

https://dataplanet.ng

https://dataplanet.ng

Getting started

IntroductionAuthenticationResponses & statusesError codes

MSORG website slot

MSORG slotMSORG buy dataPOSTMSORG buy airtimePOSTMSORG balanceGETMSORG requeryGET

Sandbox & testing

Sandbox & testingReset sandbox walletPOST

Wallet & catalog

Wallet balanceGETList billersGETBiller productsGET

Data & airtime

Buy dataPOSTBuy airtimePOSTBulk dataPOSTBulk airtimePOSTBulk order statusGET

Electricity & cable TV

Verify meterPOSTBuy electricityPOSTVerify smartcardPOSTBuy cablePOST

Exam PINs, gift cards & eSIM

Exam PINsPOSTBuy gift cardPOSTBuy eSIMPOST

Betting, internet, voice & SMS

Verify betting IDPOSTFund bettingPOSTVerify internet accountPOSTBuy internetPOSTBuy voicePOSTSend bulk SMSPOST

Recharge PINs

NetworksGETDenominationsGETBuy recharge PINsPOSTList PIN ordersGETGet PIN orderGET

Beneficiaries

List beneficiariesGETSave beneficiaryPOSTUpdate beneficiaryPUTDelete beneficiaryDEL

Transactions

List transactionsGETGet transactionGET

Webhooks

Overview & signatureGet webhook settingsGETSet webhook URLPUTDisable webhookDELSend test webhookPOSTList deliveriesGETResend deliveryPOST
Get an API key

Sandbox & testing

Build and test your whole integration without spending money. Sandbox keys call the same endpoints with the real catalogue and your real prices, but purchases are paid from a test wallet and nothing is sent to networks or billers.

How it works

1. Create a sandbox key

In Dashboard → Developer, choose Sandbox when creating a key. Sandbox keys start with ds_test_ and work straight away, even before your API access is approved.

2. Use the same base URL

There is no separate sandbox host. The key decides the mode: ds_test_ keys run in the sandbox and ds_live_ keys run live.

3. Spend test money

Your sandbox wallet starts with ₦100,000 of test money. Reset it any time from the dashboard or with POST /sandbox/reset.

4. Choose the result with test numbers

The last four digits of the phone, meter, smartcard or account number decide what happens. Use them to test success, failure, pending and webhooks.

5. Go live

Once API access is approved, swap the ds_test_ key for a ds_live_ key. Nothing else in your code needs to change.

Test numbers

Any number that does not end in one of these suffixes completes successfully.

Ends inExample phoneExample meter / smartcardResult
anything else0803123456745012345678successful (HTTP 201) with a test token, PINs or delivery details
00020803000000245010000002failed (HTTP 422). The sandbox wallet is refunded.
00030803000000345010000003pending (HTTP 202), then successful about 20 seconds later, with a webhook
00040803000000445010000004pending (HTTP 202), then failed and refunded about 20 seconds later, with a webhook
0009—45010000009Verify endpoints return 400 VERIFICATION_FAILED

Example — test a pending purchase

This returns pending first. Poll GET /transactions/{reference} or wait for the webhook, and it becomes successful.

curl -X POST "https://dataplanet.ng/api/v1/merchant/data/purchase" \
  -H "Authorization: Bearer ds_test_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -d '{"product_id": 212, "phone": "08030000003", "reference": "TEST-ORDER-1001"}'

Live vs sandbox

Live (ds_live_)Sandbox (ds_test_)
Needs API approvalYesNo
WalletYour real walletSeparate test wallet (₦100,000, resettable)
Catalogue, plan ids and pricesRealReal (same as live)
Validation and error codesRealSame as live
Sent to networks / billersYesNever. Tokens, PINs and eSIMs are fake
Webhooksmode: "live"Same URL, mode: "test" and data.sandbox: true
TransactionsGET /transactionsGET /transactions shows sandbox transactions only, kept for 30 days
Daily and account-tier limitsAppliedNot applied

Telling sandbox responses apart

  • Every response has the header X-Api-Mode: test (live keys get X-Api-Mode: live).
  • Transaction objects, balances and verify responses include "sandbox": true.
  • Sandbox transaction_id values start with SBX.
  • Webhooks carry mode: "test" in the body and the X-dataplanet-Mode: test header.

Good to know

  • Bulk airtime and data orders are processed straight away in the sandbox. Fetch them with GET /bulk/{reference}, using your reference rather than a numeric id.
  • Webhook settings, beneficiaries and IP whitelists are shared between live and sandbox keys.
  • Rate limits are the same as live: 120 requests per minute per key.
  • If the platform turns the sandbox off, sandbox keys get 403 SANDBOX_DISABLED.
Sandbox tokens, PINs, gift card codes and eSIM details are randomly generated and will not work on a real meter, phone or device.
Previous · MSORG website slotMSORG requeryNext · Sandbox & testingReset sandbox wallet

Developed by Scaler Developers