Prerequisites
- A Dancity account with Tier 3 status
- An approved API client (see Before you start)
- A generated API key from your API key page
- At least one allowlisted IP that matches the machine running these commands
Step 1 — Set up your credentials
Store your API key in an environment variable. Never commit it to source control.Step 2 — Confirm connectivity (optional)
Wallet reads use a JWT, not your merchant key. To prove your key + IP allowlist work, call a merchant endpoint with safe placeholders (expect400 until you substitute real catalogue values):
401→ key,channel, or IP allowlist issue.400/ vendor message → auth is fine; swap in realsmartcardNumber,cableplan, andcablenamefrom support or your catalogue.
Step 3 — Buy airtime
data mirrors the internal transaction record (tranxId, balances, status, etc.).
Step 4 — Receive webhooks (optional)
Set your webhook URL from your profile page. Dancity willPOST a signed payload to that URL for transaction events.
See the Webhook guide for verification instructions.
What’s next?
Authentication
Learn how API key auth and IP allowlists work
Run & test
Copy-paste curl recipes and env vars
Error codes
Understand every error response
OpenAPI & Try it
Technical endpoints and interactive playground
