{"object":"doc","slug":"failed-renewals-and-retries","title":"Failed renewals and retries","summary":"What happens when a renewal is declined. The retry schedule (+1, +3, +7 days by default, at most 8 retries), hard declines that are never retried and block the card, the per-card attempt ceilings, the final action, and what your app should do at each step.","tags":["guide","billing","subscriptions","dunning","declines"],"body":"# Failed renewals and retries\n\nWhen a renewal charge is declined, ZeroPoint retries it on a schedule, never more often than the card networks allow, and then takes the merchant's final action. Your app tells the customer and offers a way to pay with another card. ZeroPoint sends no email to your customers.\n\nIn this release the schedule runs when you advance a test clock; nothing renews or retries on real time yet ([Test your billing with test clocks and failure injection](test-billing-with-test-clocks.md)).\n\n## Three outcomes, and only one is a decline\n\nA charge is captured, declined, or unknown. Only a proven decline starts the steps below. An unknown outcome (a timeout, an answer that cannot be confirmed) is a hold: the invoice stays `open` with `collection_status: reconciling`, the subscription keeps its status with `payment_hold` set, nothing is counted and nothing is retried until the outcome is proven ([Subscriptions and invoices](subscriptions.md)). A `duplicate_transaction` answer (the processor's duplicate screen) is never counted as a decline and never retried automatically.\n\n## The schedule\n\n1. Before it you receive `invoice.upcoming` (3 days before the renewal, by default; the merchant's `upcoming_days`, 0 for none) and a `customer.subscription.updated` whose `latest_invoice` names the new renewal invoice. The renewal is declined. The invoice stays `open`, the subscription becomes `past_due`, and you receive `payment.failed`, `invoice.payment_failed` with `attempt_count` (1), `next_payment_attempt` (Unix seconds) and `last_payment_error` (`code`, `decline_code` when the issuer gave one), then `customer.subscription.updated`. `latest_invoice` on the subscription names that open invoice (it is set when the renewal invoice is created, as on Stripe); `GET /v1/invoices` filtered by `subscription` and `status: open` (MCP `list_invoices`) lists it too.\n2. Retries run at the first decline plus 1 day, plus 3 days and plus 7 days (the default `retry_offsets_s` is `[86400, 259200, 604800]`). Offsets count from the first decline, not from the previous retry, and two charges of one invoice are always at least 1 day apart, also after downtime or a long hold. Each declined retry sends `payment.failed` and `invoice.payment_failed`; `attempt_count` rises by one per retry slot, and also by one for each declined manual payment of the invoice (`POST /v1/invoices/{invoice_id}/pay` or the portal's Pay now), which never uses up a retry slot.\n3. A retry that is captured pays the invoice (`invoice.paid`, `invoice.payment_succeeded`), moves the period forward and returns the subscription to `active`. The billing anchor does not move.\n4. The last retry that is declined ends it at once. In the same change you receive the final `invoice.payment_failed` with `next_payment_attempt: null`, and the merchant's final action runs:\n   - `cancel` (default): `invoice.marked_uncollectible` (the invoice is `uncollectible`) and `customer.subscription.deleted` (the subscription is `canceled`). By the time these events reach you, the invoice can no longer be paid.\n   - `unpaid`: no more retries; the subscription is `unpaid` and the invoice stays payable until its period ends (the customer's Pay now in the portal, `POST /v1/invoices/{invoice_id}/pay`, MCP `pay_invoice`; a captured payment makes the subscription `active` again), then it is marked uncollectible and the subscription canceled.\n\nWith the defaults, a declined renewal therefore ends 7 days after the first decline, at the third retry. Send your last-chance notice on the retry before the last one: the `invoice.payment_failed` whose `next_payment_attempt` is the last slot (the +3 day failure with the default schedule).\n\nAn invoice is never charged after its period has ended: there are no catch-up charges for a period the customer did not get.\n\n`payment_intent` on an invoice is the `pay_...` id of the newest attempt that resolved with a payment. It changes with every attempt (older Stripe versions kept one intent per invoice), it can name a payment that is final and failed, and it is null while the first attempt is still in flight. To recover, pay the invoice again (`POST /v1/invoices/{invoice_id}/pay`, MCP `pay_invoice`, or the portal) with a new card; never confirm the named payment. On a held invoice (`collection_status: reconciling`) the named payment can read failed while money may still stand: read the invoice's own status, not the payment's, before charging another card.\n\n`GET /v1/billing_settings` (MCP `get_billing_settings`) shows a merchant's ladder and final action. `POST /v1/billing_settings` changes `final_action` (`cancel` or `unpaid`) freely, and the schedule anywhere within the merchant's limit, in either direction:\n\n- `retry_offsets_s`: the limit is the default ladder's (at most 3 retries, no wait shorter than 1 day) unless ZeroPoint set another for the merchant. A list with more retries than the limit, or whose shortest wait (the first offset, or the gap between two offsets) is shorter than the limit's, answers `400 parameter_invalid` naming the limit. Anything inside it is accepted, so after `[172800, 345600]` the default `[86400, 259200, 604800]` can be set again. Offsets are strictly increasing, and the last comes before the shortest billing interval in use ends: with monthly prices, within 28 days.\n- `min_retry_gap_s` (the least time between two charges of one invoice, 1 day by default): at least the merchant's limit (1 day unless ZeroPoint set more), up to 7 days, and back down to the limit.\n- ZeroPoint support sets a merchant's limit, tighter or looser (up to 8 retries, each from 1 hour to 60 days after the first decline, the last within 28 days).\n- `subscription_guard` (`product` by default; `off`, `price`, `product` or `customer`): a customer you identify may not start a second live subscription to the same price, the same product, or (under `customer`) anything at this merchant, and unless it is `off` every subscription checkout must name the buyer ([Sell a subscription in five calls](build-subscriptions.md), step 0, has the request and the refusals; [Hosted checkout](checkout.md) has the full rules).\n\nBoth routes name the merchant the way every route does: `merchant_id` (query on `GET`, body on `POST`), or the `ZeroPoint-Account` header (`Stripe-Account` is accepted too). Both at once must name the same merchant, else `400 parameter_invalid`. With neither, a platform with one merchant in the key's mode uses it, and one with more answers `400 parameter_invalid` naming both ways. `POST` needs an `Idempotency-Key`.\n\n### Billing settings\n\n`GET /v1/billing_settings` answers every field below; `POST` answers the same object after the change. You set the fields marked \"you\"; the others are shown so your code can read them, are set only by ZeroPoint support, and a `POST` that sends one answers `400 parameter_invalid`.\n\n| Field | Who sets it | What it does |\n|---|---|---|\n| `object`, `merchant_id`, `livemode` | | `billing_settings`, the merchant, and whether it is a live merchant |\n| `timezone` | you | IANA time zone, default `UTC`. Renewal dates, and the dates the checkout page and the portal show the customer, are days in this zone. A subscription keeps the zone it was created with |\n| `retry_offsets_s` | you, within the limit | Seconds after the first failed renewal at which to retry, default `[86400, 259200, 604800]` |\n| `min_retry_gap_s` | you may raise it | The least time between two charges of one invoice, default 86400 |\n| `final_action` | you | `cancel` (default) or `unpaid`, run when the last retry fails |\n| `upcoming_days` | you | Days before a renewal that `invoice.upcoming` is sent, 0 to 30, default 3; 0 turns it off |\n| `portal` | you | Switches for the hosted portal: `cancel`, `update_card`, `invoice_history` (all `true` by default), and `keep_plan` (undo a scheduled downgrade; when not set it follows `cancel`) |\n| `subscription_guard` | you | `off`, `price`, `product` or `customer`. See above. Default `product` |\n| `ended_period_grace_s` | ZeroPoint | How long after a renewal period ends its invoice may still be charged. Default 0: never after the period ends |\n| `duplicate_spacing_s` | ZeroPoint | Retries never send two charges of one amount on one card closer together than this, so the processor's duplicate check does not refuse them. Default 3600 |\n| `duplicate_screen_action` | ZeroPoint | What happens when the processor refuses a renewal as a duplicate: `hold` (default; the invoice waits for ZeroPoint to check it) or `retry_after` (retried once `duplicate_retry_s` has passed) |\n| `duplicate_retry_s` | ZeroPoint | The wait for `retry_after`, default 3600 |\n| `reversal_action` | ZeroPoint | `record_only`, the only value: a refund or void of an invoice payment is recorded and never cancels or changes the subscription |\n| `incomplete_expiry_s` | ZeroPoint | How long a subscription created with `POST /v1/subscriptions` stays `incomplete` waiting for its first payment before it becomes `incomplete_expired`. Default 82800 (23 hours) |\n| `min_proration_cents` | ZeroPoint | A plan-change charge below this is not charged now; it is added to the next renewal. Default 50 |\n| `customer_emails` | ZeroPoint | Reserved for a later release and normally `{}`. It has no effect: ZeroPoint sends no email to your customers, so renewal reminders, receipts and failed-payment emails are yours to send (from `invoice.upcoming`, `invoice.paid` and `invoice.payment_failed`) |\n| `renewals_paused` | ZeroPoint | `true` while ZeroPoint support has paused this merchant's billing: no renewal is charged and no new subscription starts until it is lifted |\n\n## Hard declines: never retried, and the card is blocked\n\nSome declines can never be approved: `lost_card`, `stolen_card`, `pickup_card`, `invalid_account`, `revocation_of_authorization` and the like. On a hard decline:\n\n- that card is never sent again for the invoice. A lost, stolen or closed card is blocked for every subscription at the merchant; a revoked authorization blocks that subscription (the table below has every code).\n- `last_payment_error.requires_new_payment_method` is `true` and `decline_code` names the reason.\n- `POST /v1/invoices/{invoice_id}/pay` and the portal's Pay now on that invoice answer `402 payment_method_blocked` with nothing sent. For a lost, stolen or closed card, a new subscription or an upgrade on that card answers the same. Saving the same card again does not unblock it.\n- The payment method itself does not show the block: it still reads `status: active`, because a card blocked for one subscription or invoice can still be good for others. Read the block from the invoice (`last_payment_error.requires_new_payment_method` and `decline_code`) or from the `402 payment_method_blocked` answer, and ask the customer for another card.\n- The schedule keeps running, as on Stripe: `next_payment_attempt` stays set and `attempt_count` counts retry slots (and declined manual payments), but a slot is skipped while the card is blocked. A different card saved as the default is charged at the next slot.\n\nNever show `lost_card`, `stolen_card` or `pickup_card` to the cardholder. Say the card was declined and ask for another card.\n\n### How far a block reaches\n\nThe decline code decides the scope of the block, and a block is matched by the card itself (brand, last four and expiry at the merchant), not by the `pm_...` id, so saving the same card again under a new id is still blocked:\n\n| Scope | Decline codes | What is refused |\n|---|---|---|\n| card | `lost_card`, `stolen_card`, `pickup_card`, `incorrect_number`, `invalid_account` (closed account), `revocation_of_all_authorizations` | This card at this merchant: every invoice, every subscription, new subscriptions and upgrades, scheduled retries and Pay now |\n| subscription | `revocation_of_authorization`, `stop_payment_order` | This card for the subscription that caught it (every invoice of it) |\n| invoice | `transaction_not_allowed`, `restricted_card` | This card for that one invoice |\n\n### How a block is lifted\n\n- A different card ends the problem for the customer: save it, make it the subscription's `default_payment_method`, then pay the open invoice now (`pay_invoice`, or the portal) or wait for the next retry slot. The old card stays blocked.\n- In the sandbox you cannot rehearse \"save a different card\" with `tok_visa`: every `tok_visa` card is the same card (Visa 0010, 12/2034), and a block is matched by the card, so a card-scope hard decline (`lost_card`, `stolen_card`, the first row of the table above) on one `tok_visa` card of a test merchant blocks every `tok_visa` card of that merchant, other customers' and newly saved ones included (`402 payment_method_blocked` on their renewals, on `POST /v1/subscriptions` and on the checkout confirm helper). After a hard-decline rehearsal, call `lift_card_block` (below) on the card before any other test at that merchant.\n- A block never expires and is never lifted by time or by saving the card again. In live mode only the ZeroPoint operator can lift one (contact support with the invoice id).\n- In test mode, `lift_card_block` (`POST /v1/test_helpers/payment_methods/{payment_method_id}/lift_card_block`) lifts every block of a test card, so a hard-decline rehearsal does not leave the sandbox's approving card blocked for every later test at that merchant. It charges nothing: a `past_due` subscription stays `past_due`, and its invoice open, until the next retry or Pay now. A live key or a live merchant's card is refused.\n\n## Per-card attempt ceilings\n\nCounted per card across every invoice and subscription of one merchant, scheduled retries and manual payments alike:\n\n- 24 hours: at most 10 sends that did not capture (declined, refused, unknown or still processing). A captured payment never counts.\n- 30 days: the card's first decline at the merchant is the original; after it, at most 15 reattempts that did not capture. So the original plus 15 reattempts can be declined in 30 days.\n\nA scheduled retry over a ceiling is skipped: the slot is used up with no charge and no event, `attempt_count` still rises, and the schedule moves on to the next slot. A skipped last slot takes the final action on schedule, with the final `invoice.payment_failed` (`next_payment_attempt: null`). So a card at its ceiling gets fewer real charges, but the subscription ends when it would have anyway. Manual payments have their own cap: at most 3 unpaid sends of one card per invoice in 24 hours, 10 per card in 30 days, 60 seconds apart; past it, `POST /v1/invoices/{invoice_id}/pay` answers `429 invoice_pay_limit` with `Retry-After`.\n\n## What your app does\n\nRead `billing_reason` on every `invoice.payment_failed` first: only `subscription_cycle` (a renewal, or one of its retries) is the dunning described on this page. A declined plan change (`subscription_update`) and a declined first payment (`subscription_create`) also carry `next_payment_attempt: null`, and the subscription has not ended.\n\n| Event | Do |\n|---|---|\n| `invoice.payment_failed` with `next_payment_attempt` set | Email the customer: the payment failed, we will retry on that date, update your card here (your account page, which opens the portal). When `next_payment_attempt` is the last slot, make this the last-chance notice |\n| `invoice.payment_failed` with `last_payment_error.requires_new_payment_method: true` | Ask for another card now; retries on this card will not succeed |\n| `customer.subscription.updated` to `past_due` | Show a banner. Keep or limit access: your grace policy |\n| `invoice.paid` | Clear the banner. Access stays or returns |\n| `invoice.payment_failed` with `next_payment_attempt: null` and `billing_reason: subscription_cycle` | The plan has ended (final action `cancel`) or stopped retrying (`unpaid`); `customer.subscription.deleted` or `.updated` arrives in the same change. Do not send a pay link with the default `cancel`: the invoice is already uncollectible |\n| `invoice.payment_failed` with `billing_reason: subscription_update` | A plan change was declined. The plan is unchanged, `invoice.voided` follows and nothing is owed. Tell the customer the change did not go through. Not a renewal failure: the table above does not apply |\n| `invoice.payment_failed` with `billing_reason: subscription_create` | The first payment of `POST /v1/subscriptions` was declined. The subscription is `incomplete`; ask for another card and pay `latest_invoice` within 23 hours, at least 60 seconds after the decline |\n| `customer.subscription.deleted` | Revoke access |\n| A change of `payment_hold` only | Nothing. A charge is being confirmed |\n\n## Paying now instead of waiting\n\nWhen the customer has a new card, let them pay at once. Either send them to the portal (Pay now on the open invoice), or from your server:\n\n```\nPOST /v1/invoices/{invoice_id}/pay      (invoice_id: in_123)\nIdempotency-Key: pay-in_123-1\n\n{\"payment_method\": \"pm_456\", \"off_session\": false}\n```\n\nMCP: `pay_invoice` with `invoice_id`, `request_key` and `payment_method`. It answers `200` only with the invoice paid; any other outcome is an error that names the invoice and the payment. A decline here never uses up a scheduled retry. Every final answer is kept under the key: after the customer changes the card, send a new key. An unknown outcome (`502 processor_unavailable`, `409 invoice_reconciling`) is never a decline: retry the same request with the same key, never a new one. To make the new card the default for future renewals, also `POST /v1/subscriptions/{subscription_id}` with `default_payment_method`.\n\n## Rehearse it\n\n`fail_next_charges` (`POST /v1/test_helpers/payment_methods/{payment_method_id}/fail_next_charges`) makes a test card's next billing charges decline without reaching the processor: a soft decline (`card_declined`) or a hard one (`lost_card`, `stolen_card`, `revocation_of_authorization`, `stop_payment_order`, `transaction_not_allowed`), which carries the same processor code as the real decline and so blocks the card in its scope, sets `requires_new_payment_method` and sends the same events. Lift the block afterwards with `lift_card_block`. With a test clock you can run subscribe, renew, decline, three retries and the final action in seconds: [Test your billing with test clocks and failure injection](test-billing-with-test-clocks.md).","updated":1795275945}