Mintcash
Concepts

Retries

How Mintcash retries failed recurring charges over time — the schedule, the customer notifications, and when a subscription is cancelled.

When a subscription renewal fails, Mintcash doesn't give up on the first decline. It retries the charge on a fixed schedule, escalating customer communication along the way, and only cancels the subscription once every attempt is exhausted. This is the "dunning" loop you'd otherwise build yourself.

Retries vs. cascading

Cascading happens within a single charge attempt — try provider A, then B, then C, all in seconds. Retries happen across time — try today, fail, wait a day, try again. The two combine: each retry attempt can itself cascade across providers.

The retry schedule

Rendering diagram…
AttemptWhen (from first failure)Customer email
Initial chargeDay 0 (renewal due date)"Please update your payment method"
1st retryDay +1"Your payment failed"
2nd retryDay +3"Your payment failed"
3rd retryDay +5"Your subscription will be cancelled"
4th retryDay +7Subscription cancelled, access revoked

The day offsets are measured from the original renewal failure, not from the previous attempt.

What you see

  • subscription.succeeded — a charge attempt succeeded; following a failure, it means a retry recovered the subscription (back to active).
  • subscription.failed — a subscription charge attempt failed. You'll receive one per failed charge in the ladder. A step that charges nothing, because the card is blocked, sends no event.
  • subscription.cancelled — the subscription terminated (nothing was paid by the end of the schedule, or you cancelled it).

Each retry that charges the card creates a new Payment linked to the subscription. On the first renewal failure the subscription moves to past_due and stays there through the dunning ladder, returning to active if a retry succeeds, or ending in cancelled once attempts are exhausted.

Letting the customer fix the card

Retries only ever re-charge the same card, so a card that was cancelled or reissued will fail every attempt in the ladder. The way out is a card-update link: a URL where the customer enters a new card, which settles the failed invoice, returns the subscription to active, and becomes the card future renewals bill.

There are two ways one reaches the customer:

  • Automatically. Every dunning email sent while the subscription can still be saved — day 0, +1, +3 and +5 — carries its own link.
  • On demand. Call POST /subscriptions/{id}/card-update yourself — useful when a customer contacts support before the next email goes out, or when you've turned the emails off.

A card-update link does not pause the ladder

Scheduled retries keep running on the old card while a link is live, and a failed recovery attempt does not advance the ladder or move the cancellation date. Whichever charge settles the invoice first wins. If the retries run out first, the subscription is cancelled and the link dies with it.

Links last 7 days, and an invoice accepts at most 5 submitted cards across every link it has — email and API links draw on the same budget. See Update a card on a subscription for the full behaviour and limits.

Hard declines

Some declines mean the card itself won't work again: it has expired, been reported lost or stolen, been restricted by the bank, or been flagged for fraud. These are hard declines.

A hard decline doesn't end the schedule or cancel the subscription. The subscription follows the same days as any failed renewal, with the same customer emails and the same card-update links. The difference is that the card is blocked: Mintcash doesn't charge it again.

  • The steps on days 1, 3, 5 and 7 still run and still email the customer, but no charge is attempted. The emails ask for a new card and never say the old one was tried.
  • If the customer adds a new card through a card-update link, it is charged straight away. If it pays, the subscription returns to active. If it's declined, the customer can try another, and the attempt doesn't use up a step.
  • A new card that's put on the subscription is charged at the remaining steps, unless it's blocked too.
  • If nothing is paid by the end of the schedule, the subscription is cancelled, exactly as when retries run out.
ResolutionRetry?Why
insufficient_fundsYesThe customer may have funds later
provider_errorYesTransient PSP issue
issuer_declineYesIssuer may approve a later attempt
expiredYesThe processor's session timed out, not the card
invalid_cvvYesRenewals send no CVV, so it says nothing about the card
card_expiredNoHard decline: the card is blocked, the schedule runs on
lost_or_stolen_cardNoHard decline: the card is blocked, the schedule runs on
antifraud_errorNoHard decline: the card is blocked, the schedule runs on

The table lists the common codes. Other hard decline codes, such as a restricted card, block the card too. You don't need your own copy of the list: card.blocked on the webhook is true once a card is blocked, and card.blockedCode says which code did it. See Blocked cards.

The block is on the card

A block belongs to the card, not to one subscription. If another subscription renews on a blocked card, Mintcash doesn't send that charge to the processor either. The renewal fails straight away and that subscription starts the same schedule. You still receive subscription.failed, and its payment has failureMessage: "card_blocked" and no providerTransactionId. See A renewal on a blocked card.

A block lifts only when a charge or card check on that card succeeds, or, for an expired card, when the card network reports its new expiry date. Payments you create yourself with a saved card's token aren't checked against the block.

What you receive after a hard decline

  1. subscription.failed with data.status: "past_due", the hard failureCode and data.payment.card.blocked: true. If the customer saved the card, payment_method.updated arrives too.
  2. Nothing on the steps that skip the charge.
  3. subscription.succeeded if a new card pays. Otherwise subscription.cancelled at the end of the schedule. Its data.payment is the last failed charge, usually the hard decline itself, so its failureCode says why.

Cancel on a hard decline yourself

Mintcash used to cancel the subscription as soon as a hard decline came in. If you want to keep that behaviour, cancel it yourself when the decline arrives:

  1. On subscription.failed with data.status: "past_due" and data.payment.card.blocked: true, call DELETE /subscriptions/{id}. The optional cancellationReason query parameter defaults to merchant_cancelled. It can appear in the customer's cancellation email, so use a neutral value such as card_blocked, not the decline code.
  2. You receive subscription.cancelled. If our emails are on, the customer gets Subscription cancelled.
  3. Ask us to turn off the Update payment method email for your account. It goes out with the decline, usually before your cancellation lands, and asks the customer for a new card. Retry emails that fall due after you cancel aren't sent.
const sub = event.data;

if (
  event.event === "subscription.failed" &&
  sub.status === "past_due" &&
  sub.payment?.card?.blocked
) {
  await fetch(
    `https://api.mintcash.me/subscriptions/${sub.id}?cancellationReason=card_blocked`,
    { method: "DELETE", headers: { Authorization: ... } },
  );
}

Key on card.blocked, not on a list of decline codes, so your handler stays in step with Mintcash if the list changes.

See also