Build Smart Retry Logic for Failed Payments
Your gateway declines a renewal. A single-attempt system writes it off. Most of those failures are soft declines that clear when retry timing matches the failure code, without waiting for the customer to open an email.
We build the retry engine that recovers that revenue automatically.

Sound Familiar?
These are the exact issues our clients faced before payment recovery was automated at the gateway:
- A card or debit renewal fails once, the gateway marks it dead, and finance writes off revenue the customer still intended to pay
- Soft declines (insufficient funds, temporary issuer blocks) get the same one-shot treatment as hard declines (stolen or closed cards)
- Retry timing ignores payday cycles and decline codes, so the second attempt burns a scarce network retry at the wrong hour
- Idempotency keys are missing, so a manual re-charge risks double billing when the first attempt was only delayed
- Ops only discovers the lost MRR when monthly churn reports land, weeks after the recoverable soft declines expired
Card networks cap retries inside rolling windows (Visa around 15 attempts, Mastercard around 35 in 30 days). Blind daily retries burn the budget on the wrong hours and can attract fines up to roughly R248,000. Code-aware timing recovers more while staying inside the limits.
What Smart Payment Retry Logic Actually Does
Decline arrives → code decides the path → timed retry clears soft declines → revenue recovers without a customer email.
Charge Declines
Stripe, PayFast, or your debit-order provider returns a decline code on a renewal
Soft vs Hard Split
Soft declines enter a timed schedule; hard declines stop retries immediately
Code-Aware Retry
Insufficient funds wait for payday windows; processing errors retry within hours
Revenue Recovered
Charge clears silently, subscription stays active, CRM and billing stay in sync
Everything You Need for Reliable Payment Recovery
Soft vs Hard Decline Routing
Gateway decline codes decide the path. Soft declines enter a timed retry schedule. Hard declines stop retries immediately so you do not burn issuer reputation or network attempt limits.
Failure-Code Retry Schedules
Insufficient funds retry after payday windows. Processing errors retry within hours. Do-not-honor codes follow a measured cadence. Fixed every-three-days schedules get replaced with code-aware timing.
Idempotent Gateway Retries
Every re-attempt carries a stable idempotency key so a delayed authorisation cannot create a duplicate charge when the first attempt finally settles.
Silent Revenue Recovery
Soft declines clear without asking the customer to open an email. The gateway retries until the charge succeeds or the hard-decline path takes over.
Network Limit Guardrails
Retry counts stay inside Visa and Mastercard rolling windows so you recover revenue without attracting issuer fines for excessive attempts.
Recovery Analytics
See recovery rate by decline code, revenue recovered vs written off, and days-to-recovery, so finance can prove the retry engine is paying for itself.
Gateways and Billing Platforms We Wire Retry Logic Into
From One Blind Attempt to 52% Soft-Decline Recovery
How a SaaS ops lead at R220K MRR stopped writing off recoverable failed renewals and put R165,000 back in year one.
The Single-Attempt System
- Stripe and PayFast renewals failed once, then sat as written-off churn
- Roughly R26,000 of MRR failed each month; soft declines made up most of it
- Ops treated insufficient funds the same as stolen-card declines
- Occasional manual re-charges risked double billing with no idempotency key
- Lost subscribers were only spotted when monthly churn reports landed
The Smart Retry Engine
- Decline codes route soft declines into payday-aware retry windows
- Hard declines stop retries immediately and hand off to update-card flows
- Every re-attempt carries an idempotency key tied to the invoice
- Soft declines clear silently; customers never see a recovery email for funds issues
- Ops sees recovery rate by decline code inside the first billing cycle
Before vs After Failed Payment Retry Logic
How It Works
From first conversation to live retry engine in 2 to 4 weeks.
Audit Your Declines
Which gateways you use, how soft vs hard declines are treated today, and how much failed MRR a single-attempt system is writing off.
Free Scoping Call
30-minute call to design failure-code schedules, idempotency rules, and retry windows that fit your billing cycle and SA payday patterns.
Build & Test
We wire the retry engine to your gateway webhooks, test soft and hard decline scenarios, and validate no duplicate charges under delayed settles.
Go Live & Tune
Retries go live. We watch recovery by decline code in the first billing cycle and tighten timing where soft declines still slip through.
Frequently Asked Questions
How is smart retry logic different from dunning emails?
Smart retry logic lives inside the payment gateway path. It re-attempts soft declines at the right moment so revenue clears without the customer doing anything. Dunning emails ask the customer to update a card. Soft declines (roughly 80 to 90% of failures) often recover on retries alone; hard declines still need outreach, which is a separate layer.
What is a soft decline versus a hard decline?
Soft declines are temporary: insufficient funds, do not honor, processing errors, or issuer timeouts. The card is still valid, so a well-timed retry often succeeds. Hard declines mean the method is unusable: lost, stolen, expired, closed, or fraudulent. Retrying hard declines wastes network attempts and can attract issuer penalties; stop and ask for a new payment method instead.
Which payment gateways can you build retry logic on?
We have built failure-code-aware retry engines around Stripe (including Smart Retries policies and custom schedules), PayFast, Peach Payments, Netcash debit orders, Ozow, and subscription platforms such as Chargebee and Recurly. If your gateway exposes decline codes and webhooks, we can route them.
Will retries risk charging the customer twice?
No. Every re-attempt uses an idempotency key tied to the original invoice or debit mandate. If the first attempt was only delayed, the gateway treats the retry as the same charge. We also stop the schedule the moment a successful payment or a hard decline lands.
How long does payment retry logic take to set up?
A standard soft/hard decline router with code-aware schedules and idempotent retries typically takes 2 to 4 weeks from scoping to go-live. Multi-gateway stacks, DebiCheck edge cases, or complex subscription state machines take closer to 4 to 6 weeks.
How much does smart payment retry automation cost?
Retry-engine builds typically range from R25,000 to R60,000 depending on the number of gateways and billing rules involved. Operators losing more than about R50,000 a month in failed soft declines usually cover the build cost within one or two billing cycles from recovered MRR alone.
Stop Writing Off Soft Declines After One Attempt
If your billing system treats every failed renewal as permanent churn, you are leaving recoverable revenue on the table every month.
Tell us which gateways you run, how much MRR fails on renewals, and whether soft declines get a second chance. We will show you exactly how failure-code-aware retry logic would work for your stack.