What is a recharge API and how does it work?
A plain-language walk through a recharge request, from your server to the operator and back, including the three states you must handle.
A recharge API is a set of web addresses your software calls to request a recharge and to learn the result. Instead of connecting to each mobile operator yourself, you connect to one provider that handles those connections.
The life of one request
- Your app collects the mobile number, operator, circle and amount.
- Your server sends a recharge request to the provider with your credentials and a unique order ID.
- The provider acknowledges the request and passes it to the operator.
- The operator responds. The provider records the final status.
- You receive the result, either in the response, by a callback to your server, or when you check the status.
The three states you must handle
- Success: the recharge was completed. Show a receipt with a reference.
- Failed: the recharge was not completed. Return the amount to your user or retry.
- Pending: the result is not known yet. Do not treat this as a failure. Wait for the callback or check the status later.
Why a unique order ID matters
Send your own unique order ID with every request. If your server loses its connection halfway, you can check the status using that ID and avoid sending the same recharge twice.
What to ask for before integrating
- Sandbox access
- Documentation for each endpoint and error code
- How callbacks are signed or restricted, so you can verify them
- Limits per minute or per day for your account
If you would like to see how this fits your product, request API access and describe your use case.