Build with Reteller.
Purchases return 202 Accepted while delivery runs. Send a unique request_ref or Idempotency-Key for each intended order. Reuse it after a timeout or retry response. Read the transaction status or webhook for the delivery result.
Connect airtime, data and bill payments to your platform. Start with your keys, explore the catalogue, then create your first purchase.
https://www.reteller.net/api/v1Authenticate
Use your public and secret keys with every request.
Authentication guide02Find a service
Retrieve products, plan codes and your current prices.
Explore the catalogue03Create a purchase
Submit a recipient and numeric plan ID, then track the reference.
Purchase referenceKeep your keys server-side.
Generate keys in Settings & API. Fund your wallet before creating paid orders. Use GET /ping to verify your credentials without a purchase.
Authentication
Every request must include your public and secret keys. Choose one of two schemes — both are equivalent.
Keys are created and revoked in Settings → API keys. Keep the secret key server-side; never expose it in client code. All endpoints are relative to the base URL:
Response format
Responses share one envelope. On success, status is true and the result is in data. On failure, status is false with a human-readable message, and data is null.
Endpoint directory
All v1 endpoints at a glance.
| Method | Endpoint | Description |
|---|---|---|
| GET | /ping | Verify API keys |
| GET | /balance | Wallet balance |
| GET | /services | Full catalogue |
| GET | /products/{category} | Products in a category |
| POST | /purchase | Buy airtime, data, cable, power… |
| GET | /transactions/{reference} | Retrieve a transaction |
| GET | /airtime/operators | International airtime operators |
| POST | /airtime/purchase | Send airtime abroad |
| GET | /data/operators | International data operators |
| POST | /data/purchase | Send data abroad |
| GET | /giftcards | Gift-card products |
| POST | /giftcards/purchase | Buy a gift card |
| GET | /esim/packages | eSIM plans for a destination |
| POST | /esim/purchase | Buy an eSIM |
| GET | /esim/status/{reference} | Retrieve an eSIM profile |
Verify API keys
Confirms your API keys are valid. Does not touch your wallet.
Wallet balance
Returns your current wallet balance.
Service catalogue
Returns categories, products and plans. Each plan has a permanent numeric id starting from 1. Send this number as plan_id when creating a purchase. Provider plan IDs remain in your gateway mappings.
Category products
Returns the products in a single category.
Path parameters
| Parameter | Type | Description | |
|---|---|---|---|
category |
string | required | Category code, e.g. airtime, data-gifting, cable, electricity, betting. |
Create a purchase
Accepts an order, reserves its wallet payment once and queues delivery. A new queued order returns 202 Accepted with status pending.
Send a unique Idempotency-Key header or request_ref for every new order. Reuse that key with identical details when retrying a timeout. Reteller returns the original order without another debit. Reusing a key for different details returns 409.
Manual-amount services (airtime, electricity and betting) also require amount. Check the transaction reference or receive a signed webhook for the final delivery outcome.
For a cable renewal, first call POST /api/v1/verify with the plan ID, recipient and subscription_type: renew. Use the returned quote_id when purchasing within 120 seconds. Verification does not debit the wallet.
If a worker is unavailable or the queue is full, Reteller returns 503 with Retry-After. Retry using the same order key; a committed order is recovered instead of charged again.
Body parameters
| Parameter | Type | Description | |
|---|---|---|---|
request_ref |
string | optional | Your unique business order ID. Required unless the Idempotency-Key header is supplied. |
quote_id |
string | optional | The current verification quote for a cable renewal. |
plan_id |
integer | required | The numeric plan ID returned by /services. |
option_id |
integer | optional | An optional add-on ID belonging to the selected plan. |
recipient |
string | required | Phone, smartcard, meter or customer ID for the service. |
amount |
number | optional | Required for manual-amount services (airtime, electricity, betting). |
meter_type |
string | optional | Electricity only — prepaid or postpaid. |
subscription_type |
string | optional | Cable only — change or renew. |
Transaction status
Retrieves a transaction by reference. Use it to resolve orders that returned pending.
Path parameters
| Parameter | Type | Description | |
|---|---|---|---|
reference |
string | required | The reference returned when the transaction was created. |
International airtime
Top up mobile numbers in 150+ countries. Airtime is priced live per country, so list operators first, then buy. Each operator is either FIXED (choose an options[] entry and send its sender value) or RANGE (send any amount between range.min and range.max). The ngn field is what your wallet is charged.
Opaque tokens: the id and code values here (and for data, gift cards and eSIMs) are opaque — send them back exactly as received; do not parse or construct them.
Query parameters
| Parameter | Type | Description | |
|---|---|---|---|
country |
string | required | ISO-3166 alpha-2 country code, e.g. US, GB, GH. |
Body parameters
| Parameter | Type | Description | |
|---|---|---|---|
request_ref |
string | optional | A unique order reference. Required unless the Idempotency-Key header is sent. Reuse it for retries. |
operator_id |
string | required | Operator id from /airtime/operators. |
amount |
number | required | A FIXED option's sender value, or any value within the RANGE. |
phone |
string | required | Recipient number in international format, e.g. +14155550123. |
country |
string | required | ISO alpha-2 country code. |
A pending status settles shortly — poll /transactions/{reference} to confirm.
International data
Data bundles for numbers abroad, using the same live list-then-buy model as airtime. Operators return real bundle sizes in their options[] labels.
Query parameters
| Parameter | Type | Description | |
|---|---|---|---|
country |
string | required | ISO alpha-2 country code. |
Body parameters
| Parameter | Type | Description | |
|---|---|---|---|
request_ref |
string | optional | A unique order reference. Required unless the Idempotency-Key header is sent. Reuse it for retries. |
operator_id |
string | required | Operator id from /data/operators. |
amount |
number | required | The chosen option's sender value. |
phone |
string | required | Recipient number in international format. |
country |
string | required | ISO alpha-2 country code. |
Gift cards
Sell branded gift cards priced live per country. The card is delivered by email to the recipient.
Query parameters
| Parameter | Type | Description | |
|---|---|---|---|
country |
string | required | ISO alpha-2 country code. |
Body parameters
| Parameter | Type | Description | |
|---|---|---|---|
request_ref |
string | optional | A unique order reference. Required unless the Idempotency-Key header is sent. Reuse it for retries. |
product_id |
string | required | Product id from /giftcards. |
amount |
number | required | A FIXED sender value, or a value within the RANGE. |
recipient_email |
string | required | Where the gift-card code is sent. |
Travel eSIMs
Global travel-data eSIMs, priced live in NGN. The flow is three steps: list plans for a destination, buy one, then fetch its QR / activation profile. Ordering is asynchronous — if the profile isn't ready, the eSIM returns PROCESSING; poll the status endpoint for it.
Query parameters
| Parameter | Type | Description | |
|---|---|---|---|
region |
string | required | ISO alpha-2 country code (US, GB), !GL for a global plan, or a region code. |
Body parameters
| Parameter | Type | Description | |
|---|---|---|---|
request_ref |
string | optional | A unique order reference. Required unless the Idempotency-Key header is sent. Reuse it for retries. |
package_code |
string | required | The code from /esim/packages. |
email |
string | required | Email associated with the order. The QR is available on its receipt. |
To install: scan qr_image, or enter activation_code manually (Settings → Add eSIM).
Read /transactions/{reference} for delivery status. This endpoint returns the QR after allocation. Refresh /esim/packages before ordering if its five-minute verified price expires.
Provider responses
Order acceptance returns 202 while delivery runs. A provider response is available only after an actual provider call has been recorded. The transaction status endpoint and settlement webhooks include provider_response containing http_status, received_at and body. The body retains the provider's returned fields, with credentials, fulfilment tokens and upstream account balances hidden. Electricity tokens are supplied separately through the owner-scoped delivery field.
Reteller's status controls delivery and refund accounting. An upstream success message alone does not override an uncertain or unverified Reteller state. Historical responses that were never logged return an empty object/array rather than reconstructed data.
Webhook events
Orders that come back pending settle later. Rather than polling
/transactions/{reference}, set a webhook URL in
Settings → Webhook and we will POST the update to you
as soon as it happens.
When we call you
| Event | Sent when |
|---|---|
transaction.successful | The order was delivered. Any commission has been credited to your wallet. |
transaction.reversed | The order failed or was refunded. The amount is back in your wallet. |
Only real state changes are sent — a pending order that is
still pending produces nothing, and a repeated refund is not re-sent. You will never receive a
pending event, because that status is already in the response to your
/purchase call.
Request we send
Payload fields
| Parameter | Type | Description | |
|---|---|---|---|
event_id |
string | required | Stable event ID. Deduplicate repeated deliveries by this value. |
event |
string | required | One of the events above. |
sent_at |
string | required | ISO-8601 UTC payload creation time, retained across retries. |
data.reference |
string | required | Your order reference — match this against your own records. |
data.status |
string | required | successful or reversed. Always the settled value. |
data.amount |
number | required | Amount charged, in NGN. |
data.commission |
number | required | Commission earned. Reversed if the order is later refunded. |
data.provider_reference |
string | optional | Upstream reference, when the provider supplies one. |
data.provider_response |
object | optional | Recorded provider HTTP status, received_at and response body with credentials and upstream balances hidden. Empty when no response was recorded. |
data.message |
string | optional | Human-readable outcome. |
Responding
Reply 2xx to acknowledge. Anything else is recorded as a failed delivery.
We wait up to 5 seconds for your response, do not follow redirects, and
only call http or https URLs.
event_id. Use GET /transactions/{reference} to recover the latest order status.Signature verification
Every call carries X-Reteller-Signature — an
HMAC-SHA512 of the raw request body, keyed with your signing secret from
Settings → Webhook. Compute the same digest and compare. Two rules matter:
- Hash the raw body bytes, not a re-encoded copy of the parsed JSON — re-encoding changes key order and spacing, and the digest will not match.
- Compare with a timing-safe function (
hash_equals,crypto.timingSafeEqual), never==.
Deliveries can arrive more than once if an order is settled
and later refunded, so deduplicate using event_id and apply each status transition once.
Rotate the secret by clearing and re-saving your webhook URL.
Statuses & errors
The status field on a transaction is one of:
| Status | Meaning |
|---|---|
| successful | Delivered to the recipient. |
| pending | Accepted and settling — re-check with /transactions/{reference}, or let a webhook tell you. |
| reversed | Failed and automatically refunded to your wallet. |
HTTP status codes
| Code | Meaning |
|---|---|
200 / 201 | Success. |
401 | Missing or invalid API keys. |
402 | Insufficient wallet balance. |
404 | Resource not found. |
422 | Validation error — see message. |
429 | Too many requests — retry after a short delay. |
502 | Upstream provider unavailable. Check transaction status before retrying a purchase. |