One API to send mobile top-ups
from your own app

Integrate airtime top-ups into your app or platform through a simple server-to-server API. You handle your customers and checkout — AFGTopup handles operator detection and top-up processing across six countries.

Or email support@afgtopup.com

⚡ Fast processing

Top-ups are queued immediately. Delivery time can vary by operator and destination.

💳 Prepaid balance

Use a prepaid EUR partner balance and spend only from available funds.

🔍 Auto operator detection

Pass a phone number, we identify the network for you.

How the integration works

A simple server-to-server integration. Your backend talks to our API, and your private API key stays out of browser and mobile client code.

1
List operatorsYour customer picks a country and you show the supported networks.
2
Detect operatorPass the phone number and we identify the network automatically — no manual selection errors.
3
Get priceFetch the exact cost in euros before the customer pays, so you can display a firm price and add your own markup.
4
Send top-upIn LIVE mode, the accepted EUR charge is deducted and the top-up is queued for processing. In SANDBOX, the request is simulated with no balance deduction and no real delivery.
# after your customer pays on your platform POST /partner-topup X-API-Key: your_api_key { "phone": "+93712345678", "amount": 100, "country": "AF", "operator_id": 1, "external_id": "your_order_12345" } # LIVE: 202 Accepted — queued for processing { "success": true, "sandbox": false, "environment": "live", "status": "processing" } # SANDBOX: 200 OK — simulated, no balance deduction { "success": true, "sandbox": true, "environment": "sandbox", "simulated": true, "status": "success" }

Pass your own order ID as external_id. When retrying the same uncertain request, reuse the same ID so AFGTopup's idempotency protection can help prevent accidental duplicate top-ups.

Countries you can reach

Major networks covered in each market, including all five Afghan operators.

🇦🇫 Afghanistan 🇵🇰 Pakistan 🇩🇿 Algeria 🇲🇦 Morocco 🇳🇬 Nigeria 🇰🇪 Kenya

In Afghanistan the API covers Afghan Wireless (AWCC), Roshan, Etisalat Afghanistan, Salaam and ATOMA. Supported operators are returned by the API, so your integration does not need to hardcode operator lists.

At a glance

ItemDetail
Billing modelPrepaid EUR partner balance — no postpaid invoicing from AFGTopup
DeliveryAsynchronous, typically under a minute
IdempotencySame-order retries use your external ID to help prevent accidental duplicate top-ups
AuthenticationServer-side API key, backend calls only
Confirmation emailsOptional — sent to your customer if you pass their email
SupportDirect contact with the team, not a ticket queue

Transaction limits, rate limits and commercial terms are confirmed when your account is set up.

Who this is for

App developers

Add top-ups as a feature inside an app your users already use.

Shops & agents

Sell top-ups from your own counter or website with your own pricing.

Diaspora platforms

Offer airtime alongside whatever else you already do for your community.

Frequently asked questions

What does the API let me build?

You can add mobile top-ups to your own app, website or platform. Your users enter a phone number and an amount, and the credit is delivered to that number. Delivery, operator detection and provider connections are handled on our side.

Afghanistan, Pakistan, Algeria, Morocco, Nigeria and Kenya, covering the major mobile networks in each. In Afghanistan that includes Afghan Wireless (AWCC), Roshan, Etisalat, Salaam and ATOMA.

LIVE usage runs on a prepaid EUR partner balance. You load funds to your partner account and accepted live top-ups deduct their EUR charge from that balance. AFGTopup does not provide postpaid credit; you remain responsible for your own customer checkout, pricing and payment risk.

Yes. You collect payment from your customers however you prefer, then call the API to deliver the top-up. We handle delivery to the mobile network, not your checkout.

Top-ups are queued immediately, but delivery time can vary by operator and destination. Use a unique external ID for every new order and reuse the same ID when safely retrying the same uncertain request.

Contact us with a short description of your platform and expected volume. We will review it, create a SANDBOX account for testing, and provide your private credential and integration guide. LIVE access is enabled after successful testing.

Get API access

Message us and we'll set up your SANDBOX partner account, provide your private API credential securely, and share the integration guide. LIVE access is enabled after testing.

Tell us three things and we can set you up quickly:
  • What you're building — app, website or shop
  • Which countries you need
  • Roughly how many top-ups per month you expect
View the Node.js starter kit on GitHub

Public reference client and integration examples for all four endpoints — Node.js is optional; the API works with any backend that can make HTTPS requests and handle JSON.