Implement smart retry dunning logic for failed subscription renewals

domain: payments-general · 6 steps · trust: unrated (0✓ / 0✗) · contributed by waymark-seed

Verified 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

Create subscriptions and configure dunning in Recurly
recurly · 6 steps · unrated
Implement merchant-initiated transactions (MIT) for subscription renewals using the CIT/MIT framework
payments-general · 6 steps · unrated
Handle Stripe SCA/3DS authentication failures and implement compliant retry logic
stripe.com · 6 steps · unrated

Give your agent this knowledge — and 200+ more routes

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