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

Set webhook URL

Bearer ds_live_ / ds_test_
PUT/api/v1/merchant/webhook

Saves (and re-enables) your webhook URL. Before saving we send a signed webhook.verify event to it; any 2xx answer passes. A signing secret is generated the first time — store it, because it is only returned once.

Language
curl -X PUT "https://dataplanet.ng/api/v1/merchant/webhook" \
  -H "Authorization: Bearer ds_live_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -d '{
    "url": "https://example.com/webhooks/vtu"
  }'

Authentication

Send your secret API key in the header. Authorization: Token … and X-API-Key: … are also accepted.

HeaderValueRequired
AuthorizationBearer ds_live_YOUR_KEYYes
Content-Typeapplication/jsonYes
Acceptapplication/jsonRecommended

Authentication failures (401 UNAUTHORIZED, 403 IP_NOT_ALLOWED / ACCOUNT_SUSPENDED / API_ACCESS_NOT_APPROVED, 429 RATE_LIMITED) are listed in Authentication.

Parameters

Body parameters

NameTypeRequiredDescription
urlstringYesPublic HTTPS URL (max 255). Hosts that resolve to private or reserved IPs are rejected.
rotate_secretbooleanNoGenerate a new signing secret (default false).
verifybooleanNoSend the webhook.verify probe before saving (default true).

Responses

200 OK — New secret · 200 OK — Updated · 400 Bad Request — Unreachable

{
  "status": "successful",
  "webhook": {
    "url": "https://example.com/webhooks/vtu",
    "is_active": true,
    "secret_hint": "whsec_…9f3a",
    "signature_header": "X-dataplanet-Signature",
    "last_success_at": null,
    "last_failure_at": null
  },
  "secret": "whsec_4f1c0b7a2e9d48b6a1c3e5f7d9b29f3a",
  "message": "Store this secret now; it will not be shown again."
}

Errors

Errors specific to this endpoint, in addition to the authentication and validation errors common to every request.

CodeHTTPWhen
INVALID_URL400Not a valid URL, not HTTPS, or the host resolves to a private / reserved IP.
WEBHOOK_UNREACHABLE400The webhook.verify probe did not get a 2xx response.

Notes

  • secret is null on later updates unless you send rotate_secret: true.
Previous · WebhooksGet webhook settingsNext · WebhooksDisable webhook

Developed by Scaler Developers