1 Answers
A:
When your reconciliation software talks to UPI APIs (like PSPs or banks) to confirm settlements or fetch status updates, there’s always a risk of hammering the API too hard during load spikes, especially when credit card bill payments are high-value and time-sensitive. If you don’t throttle intelligently, you’ll either hit NPCI or PSP rate limits or end up with duplicate reconciliation entries.
Here’s how you can configure throttling and retry logic the smart way
Don’t retry failed UPI status calls instantly. Start with a short delay (like 2–5 seconds) and double it with every retry — up to a max backoff of, say, 2 minutes. This keeps your system from flooding PSP endpoints when they’re lagging.
A minor DDoS can occur when hundreds of reconciliation workers hit the same PSP API, causing all retries to line up again. To ensure that retries spread out naturally, add a little random delay (such as ±10%) on top of your backoff timing.
Your overall request rate should be temporarily slowed by, say, 30 to 50% if your system detects increasing response delays or error rates more than 10%. Rolling averages over the last five minutes can be used to automatically identify these increases.
For transactions already past T+1 or marked pending confirmation, batch them into scheduled jobs instead of real-time retries. Keep the high-priority API calls only for same-day settlements or partial reversals.
Log every retry attempt with timestamp, reason, and PSP response. This prevents double retries for the same UPI reference ID if your service restarts mid-operation.
After, say, 5 failed attempts, stop hitting the PSP and move the item into a manual review or deferred check queue. You can reattempt later when PSP latency stabilizes or when NPCI publishes new status files.
Set up an alert rule like average API latency > 1.5s or failure rate > 15% for 10 minutes so your ops team knows it’s a systemic slowdown and not a software bug.
Find the Best Payment Gateway
Explore all products with features, pricing, reviews and more
View All SoftwareHelp the community
Be the First to Answer these questions
Disclaimer
Techjockey’s software industry experts offer advice for educational and informational purposes only. A category or product query or issue posted, created, or compiled by Techjockey is not meant to replace your independent judgment.
20,000+ Software Listed
Best
Price Guaranteed
Free Expert
Consultation
2M+
Happy Customers