Build Smart Retry Logic for Failed Payments | Payment Recovery | WebFootprint
Payment Integrations Payment Retry Engine

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.

A CRM panel and Stripe badge linked by an orange ribbon of failed then recovered payment receipts, illustrating smart payment retry logic
25%
of lapsed subscriptions fail purely due to payment issues (involuntary churn)
80–90%
of payment failures are soft declines that can be retried
51%
of failed payments recovered by Stripe Smart Retries in 5.5 days on average
2.5×
higher recovery for ML-timed retries vs fixed every-three-days schedules
The Problem

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.

How It Works

What Smart Payment Retry Logic Actually Does

Decline arrives → code decides the path → timed retry clears soft declines → revenue recovers without a customer email.

1

Charge Declines

Stripe, PayFast, or your debit-order provider returns a decline code on a renewal

2

Soft vs Hard Split

Soft declines enter a timed schedule; hard declines stop retries immediately

3

Code-Aware Retry

Insufficient funds wait for payday windows; processing errors retry within hours

4

Revenue Recovered

Charge clears silently, subscription stays active, CRM and billing stay in sync

What We Build

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

StripePayFastPeach PaymentsNetcashOzowChargebeeRecurlyCustom billing
Client Story

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.

Before

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
~8% of failed renewals recovered
After

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
52% of failed renewals recovered
R165K+ recovered in year one
52% failed renewals recovered
5 days average time to recovery
6 weeks to full ROI
The Difference

Before vs After Failed Payment Retry Logic

Before
After
Soft decline handling
One attempt, then write-off
Code-aware timed retries
Hard decline handling
Blind retries burn limits
Retries stop immediately
Retry timing
Fixed every 3 days (or none)
Payday and issuer windows
Duplicate charge risk
Manual re-charge, no key
Idempotent retries only
Customer involvement
Email required for every miss
Silent for soft declines
Failed renewal recovery
Under 10%
Around 50%+
Getting Started

How It Works

From first conversation to live retry engine in 2 to 4 weeks.

01

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.

02

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.

03

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.

04

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.

Questions

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.

Ready to recover lost MRR?

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.

Chat with us