ZeroPointPayments

Guides

Failed renewals and retries

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.

When 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.

In 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).

Three outcomes, and only one is a decline

A 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). A duplicate_transaction answer (the processor's duplicate screen) is never counted as a decline and never retried automatically.

The schedule

  1. 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.
  2. 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.
  3. 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.
  4. 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:
    • 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.
    • 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.

With 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).

An invoice is never charged after its period has ended: there are no catch-up charges for a period the customer did not get.

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.

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:

  • 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.
  • 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.
  • 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).
  • 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, step 0, has the request and the refusals; Hosted checkout has the full rules).

Both 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.

Billing settings

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.

FieldWho sets itWhat it does
object, merchant_id, livemodebilling_settings, the merchant, and whether it is a live merchant
timezoneyouIANA 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
retry_offsets_syou, within the limitSeconds after the first failed renewal at which to retry, default [86400, 259200, 604800]
min_retry_gap_syou may raise itThe least time between two charges of one invoice, default 86400
final_actionyoucancel (default) or unpaid, run when the last retry fails
upcoming_daysyouDays before a renewal that invoice.upcoming is sent, 0 to 30, default 3; 0 turns it off
portalyouSwitches 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)
subscription_guardyouoff, price, product or customer. See above. Default product
ended_period_grace_sZeroPointHow long after a renewal period ends its invoice may still be charged. Default 0: never after the period ends
duplicate_spacing_sZeroPointRetries 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
duplicate_screen_actionZeroPointWhat 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)
duplicate_retry_sZeroPointThe wait for retry_after, default 3600
reversal_actionZeroPointrecord_only, the only value: a refund or void of an invoice payment is recorded and never cancels or changes the subscription
incomplete_expiry_sZeroPointHow long a subscription created with POST /v1/subscriptions stays incomplete waiting for its first payment before it becomes incomplete_expired. Default 82800 (23 hours)
min_proration_centsZeroPointA plan-change charge below this is not charged now; it is added to the next renewal. Default 50
customer_emailsZeroPointReserved 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)
renewals_pausedZeroPointtrue while ZeroPoint support has paused this merchant's billing: no renewal is charged and no new subscription starts until it is lifted

Hard declines: never retried, and the card is blocked

Some declines can never be approved: lost_card, stolen_card, pickup_card, invalid_account, revocation_of_authorization and the like. On a hard decline:

  • 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).
  • last_payment_error.requires_new_payment_method is true and decline_code names the reason.
  • 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.
  • 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.
  • 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.

Never show lost_card, stolen_card or pickup_card to the cardholder. Say the card was declined and ask for another card.

How far a block reaches

The 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:

ScopeDecline codesWhat is refused
cardlost_card, stolen_card, pickup_card, incorrect_number, invalid_account (closed account), revocation_of_all_authorizationsThis card at this merchant: every invoice, every subscription, new subscriptions and upgrades, scheduled retries and Pay now
subscriptionrevocation_of_authorization, stop_payment_orderThis card for the subscription that caught it (every invoice of it)
invoicetransaction_not_allowed, restricted_cardThis card for that one invoice

How a block is lifted

  • 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.
  • 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.
  • 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).
  • 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.

Per-card attempt ceilings

Counted per card across every invoice and subscription of one merchant, scheduled retries and manual payments alike:

  • 24 hours: at most 10 sends that did not capture (declined, refused, unknown or still processing). A captured payment never counts.
  • 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.

A 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.

What your app does

Read 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.

EventDo
invoice.payment_failed with next_payment_attempt setEmail 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
invoice.payment_failed with last_payment_error.requires_new_payment_method: trueAsk for another card now; retries on this card will not succeed
customer.subscription.updated to past_dueShow a banner. Keep or limit access: your grace policy
invoice.paidClear the banner. Access stays or returns
invoice.payment_failed with next_payment_attempt: null and billing_reason: subscription_cycleThe 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
invoice.payment_failed with billing_reason: subscription_updateA 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
invoice.payment_failed with billing_reason: subscription_createThe 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
customer.subscription.deletedRevoke access
A change of payment_hold onlyNothing. A charge is being confirmed

Paying now instead of waiting

When 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:

POST /v1/invoices/{invoice_id}/pay      (invoice_id: in_123)
Idempotency-Key: pay-in_123-1

{"payment_method": "pm_456", "off_session": false}

MCP: 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.

Rehearse it

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.