Skip to main content
  1. Home
  2. Blog
  3. Recharge API
  4. Recharge API Responses Explained: Success, Pending and Failed

Recharge API Responses Explained: Success, Pending and Failed

Recharge API Responses Explained: Success, Pending and Failed

Key takeaways

  • Success: show it, save the operator reference
  • Pending: wait for the callback, never retry
  • Failed: refund to the user wallet, then allow a fresh try

Every recharge API answer comes down to three outcomes. Getting them right decides whether your support team has a quiet day or a phone full of screenshots.

The three statuses

StatusWhat it meansWhat your code should do
SuccessThe operator confirmed the rechargeMark done, store the operator reference, show it to the user
PendingThe operator has not answered yetShow "processing", wait for the callback or check status later
FailedThe recharge did not go throughRefund the user wallet and allow a new attempt

Why pending needs the most care

Most duplicate recharges come from one habit: retrying a pending recharge because it "took too long". The first one often succeeds a minute later, and now the customer has paid twice. Treat pending as pending until the callback says otherwise.

Pro tip

Log the raw response for every recharge for at least 30 days. When a dispute comes, the log answers it in seconds.

A simple handling flow

  1. Send the request with a unique order id.
  2. Read the status in the response.
  3. On pending, save the order and wait for the callback.
  4. If no callback after a few minutes, call the status API with the same order id.

Conclusion

Handle the three statuses differently and most support problems disappear. Field names and sample responses are in the API documentation.

Building on the recharge API?

Docs, sample responses and a Postman collection.

Frequently asked questions

What does a pending recharge status mean?
The operator has not confirmed the result yet. The final status comes later on your callback URL or through the status API.
Should I retry a failed recharge automatically?
Only with a new order id and only when the response clearly says failed, never when it is pending.
Where do I find the full list of response fields?
In the A1Topup API documentation.

Have a question? Talk to our team

We respect your privacy. Your details are only used to contact you about A1Topup.

Related articles

WhatsApp