Airtime Topup
Transfer airtime to a recipient after funding the transaction from your Partner Wallet (OVA).
Collect before topup when charging an end customer. The old working docs state that a complete customer-paid topup flow first calls the Collections API to take money from the customer, then calls this Topup API to deliver airtime to the intended recipient.
Topup Endpoint
POST
https://testxchange.korba365.com/api/v1.0/topup/
Topup Network Options
Fetch the networks enabled for your account and use the returned code as network_code.
POST
https://testxchange.korba365.com/api/v1.0/topup_network_options/
Example response
[ {"name": "AirtelTigo", "code": "AIR"}, {"name": "MTN", "code": "MTN"}, {"name": "Telecel", "code": "VOD"}, {"name": "GLO", "code": "GLO"} ]
Request Example
Topup request
curl -X POST https://testxchange.korba365.com/api/v1.0/topup/ \ -H "Authorization: HMAC YOUR_CLIENT_KEY:YOUR_SIGNATURE" \ -H "Content-Type: application/json" \ -d '{ "customer_number": "024000000", "amount": 10.0, "transaction_id": "TOPUP-001", "client_id": 2, "network_code": "MTN", "callback_url": "https://www.myapp.com/callback", "description": "awesome description", "payer_name": "John Doe", "extra_info": "metadata" }'
Responses
200 OK
{ "success": true, "results": "Transaction initiated successfully." }
4xx Error
{ "success": false, "error_code": 405, "error_message": "Invalid Network Code" }