If you run billing for a subscription product, there's a good chance your failed-payment logic looks something like this:
retry after 1 day, then 3 days, then 7 days, then cancel
It's simple, it's the default in a lot of billing tools, and it quietly loses revenue. Here's why, and what a better design looks like.
Not all declines are the same
A decline comes back with a reason code, and those reasons fall into two rough groups:
- Soft declines are temporary: insufficient funds, a generic "do not honor", a processing error, a bank's fraud check on an unusual charge. The same card may well succeed later.- Hard declines won't fix themselves: an expired card, a closed account, a card reported lost or stolen. Retrying these wastes attempts, and card networks limit how often you can retry and can charge fees for excessive retries.A fixed schedule treats both groups identically. It retries hard declines that will never succeed, and it retries soft declines at arbitrary times instead of when they're most likely to work. ## A better structure Split the logic into three decisions. ### 1. Should we retry at all? Classify the decline. Hard declines skip retries entirely and go straight to asking the customer to update their card. Soft declines enter the retry flow. ### 2. When should we retry? Timing matters for soft declines. An insufficient-funds decline is more likely to clear after a typical payday than at 3am two days later. Useful signals include the decline reason, the customer's past successful payment days, and their local time zone. ### 3. What should the customer hear, and when? Retries and messages should be one coordinated flow, not two systems that don't talk. A long-time subscriber with one failed charge needs a light-touch note. A brand-new subscriber whose first renewal fails needs a clear, friendly update-your-card link right away. ## A sketch in pseudocode on payment_failed(charge): if is_hard_decline(charge.code): notify_update_card(customer, tone_for(customer)); return if attempts(charge) >= max_attempts_for(charge.network): notify_update_card(customer); return schedule_retry(charge, at = best_time(customer, charge.code)) maybe_notify(customer, attempt = attempts(charge), tone = tone_for(customer))The interesting work lives in best_time and tone_for. Start with simple rules, log every outcome, and let the data tell you which rules to change. ## Connect it to cancellations Failed payments and voluntary cancellations are usually handled by different tools, but they're the same problem: a subscriber about to leave. If someone's card has failed twice and they then visit the cancel page, that's useful context. Treat retention as one system. ## Where to start
- Log decline codes for every failed charge, if you aren't already.- Stop retrying hard declines.- Move soft-decline retries away from fixed intervals toward times that match each customer's payment history.- Personalize the dunning message by subscriber tenure.We build this kind of adaptive recovery for Shopify subscription brands at enComm, where brands recover 3x more failed payments, with $0 transaction fees. But the principles above apply to any billing stack. How does your team handle soft vs. hard declines today?
Top comments (1)
The hard/soft split is the right first cut and it is less clean than the reason code makes it look. "Do not honor" is what issuers reach for when they would rather not say why, and it covers both a card that clears on payday and an account that closed last month. Treat the code as a hint with a prior attached, not as a classification. The signal that separates them better than the code does is whether that card has ever succeeded for you before, and how recently.
best_time is where the revenue is and also where you will overfit fastest. One decline per customer per month is not much signal. The first version wants to be a population rule keyed on decline code, with per-customer history only as a tie-break, or you will be fitting noise and calling it personalisation.
The part I would add. Every line of this exists because a card payment is a pull. You hold a credential, so you can try again, so you need a schedule. On a push rail there is no retry, because there is nothing to retry: the customer completes the request or they do not. That is partly worse, since you lose the attempts you never had to ask for. But it collapses your three decisions into one, because "should we retry" and "when" both disappear and only "what should the customer hear, and when" survives. Worth knowing which of your three you are building on a property of cards rather than a property of billing.