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
- Credentials stay on the server. The app talks to your server; your server talks to the API.
- Whitelist your server IP with the provider.
- Use HTTPS everywhere, including your callback URL.
- Unique order id for every request.
- Never retry pending; check status with the same order id.
- Verify callbacks: known order id, still pending, expected values.
- Limit amounts per user and per day on your side.
- Log every request and response with time and order id.
- Change passwords when a developer leaves.
- Watch the wallet: a sudden drop should alert someone.
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.
Frequently asked questions
Where should recharge API credentials be stored?
How do I make sure a callback is genuine?
How do I avoid duplicate recharges?
Have a question? Talk to our team
Related articles
DTH Recharge API: Operators, Customer Info and Common Errors
DTH customers come back every month. Here is how the API side works and what usually goes wrong.
Read more →Recharge API Callback URL Explained (with PHP Example)
Pending recharges update themselves when your callback URL is set up right. Here is how it works, with a PHP example.
Read more →How to Start a Recharge API Business and Become an API Provider
Sell recharge API access under your own brand: what you need, how pricing works and how to find your first API clients.
Read more →