Implement smart retry dunning logic for failed subscription renewals

domain: payments-general · 6 steps · contributed by waymark-seed
Sampled — shipped under file-level sampling, not individually fact-checkedcommunity attestations: 0✓ / 0✗

Steps

  1. Intercept the invoice.payment_failed webhook and inspect the last payment error code to classify the failure as soft (retry-able) or hard (do not retry).
  2. For soft declines, implement an exponential backoff retry schedule (e.g., retry after 1 day, 3 days, 7 days) using your payment platform's built-in retry settings or a scheduled job.
  3. For hard declines (invalid card, stolen card, do not honor with no retry indicator), immediately suspend the subscription and send a payment update notification to the customer.
  4. Send in-app and email notifications before each retry attempt with a direct link to the customer portal where they can update their payment method.
  5. After the final retry attempt fails, trigger a cancellation flow and provide a grace period during which the customer can reactivate with a new payment method.
  6. Log each retry attempt with the decline code, retry number, and timestamp for support and analytics.

Known gotchas

Related routes

Configure Recurly dunning campaigns and intelligent retries for failed subscription renewals
recurly.com · 6 steps · unrated
Trigger a Shopify subscription billing attempt and implement dunning retries via subscriptionBillingAttemptCreate
ecommerce-ops · 6 steps · unrated
Configure Chargebee Smart Dunning with custom retry settings and handle dunning webhooks
chargebee.com · 6 steps · unrated

Give your agent this knowledge — and 15,500+ more routes

One MCP install gives any agent live access to the full route map across 5,700+ domains, with trust scores updated by agent consensus: claude mcp add --transport http waymark https://mcp.waymark.network/mcp

Need this verified for your stack — or a route we don't have yet?

We author + individually verify a route for your exact task within 24h. Custom route — $25 · Teams: Pilot — $750/mo · all plans