Skip to main content
  1. Home
  2. Blog
  3. Recharge API
  4. Recharge API Integration Security Checklist for Developers

Recharge API Integration Security Checklist for Developers

Recharge API Integration Security Checklist for Developers

Key takeaways

  • Never put API credentials in an app or web page
  • Trust a callback only for your own pending orders
  • One order id per recharge, always

A recharge API is a payment API. If someone gets your credentials, they can spend your wallet. Most problems we see are not clever attacks, just small shortcuts taken on the first day of integration.

The checklist

  1. Credentials stay on the server. The app talks to your server; your server talks to the API.
  2. Whitelist your server IP with the provider.
  3. Use HTTPS everywhere, including your callback URL.
  4. Unique order id for every request.
  5. Never retry pending; check status with the same order id.
  6. Verify callbacks: known order id, still pending, expected values.
  7. Limit amounts per user and per day on your side.
  8. Log every request and response with time and order id.
  9. Change passwords when a developer leaves.
  10. Watch the wallet: a sudden drop should alert someone.
Pro tip

Create a separate, low-limit API user for testing. If test credentials leak, the damage is capped.

Shortcuts that cause trouble

  • API password inside the Android app
  • Sample credentials left in public documentation
  • A callback that refunds without checking the order status

Conclusion

Security for a recharge integration is mostly discipline. Run this list before go-live and again every few months. Full integration details are in the API documentation.

Integrating the recharge API?

Docs, samples and a Postman collection.

Frequently asked questions

Where should recharge API credentials be stored?
Only on your server, never in the Android app or browser JavaScript.
How do I make sure a callback is genuine?
Accept callbacks only for order ids you created, update only pending orders, and restrict by IP where possible.
How do I avoid duplicate recharges?
Use a unique order id per request and never retry a pending recharge.

Have a question? Talk to our team

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

Related articles

WhatsApp