Skip to content

Retry the payments that failed

Say "retry the payments that failed" and each unpaid Invoice is tried again over the following days, with access paused only after the last try.

Retry each unpaid Invoice over the following days, so a declined renewal becomes a paid one before the Customer loses access.

Needs Open a bank account · Charge monthly

What you get

  • 4retries of each unpaid Invoice, spaced out over the following daysInvoice
  • 1email to the Customer after each failed retry, with a link to update the cardMessage
  • 1standing permission for the Billing Specialist to retry without asking you each timeMandate
  • 1pause of the customer’s access only after the last retry failsSubscription
  • 2lines in your books when a retry succeeds: cash in and revenue earnedEntry

Your agent does

Invoice.collect
You, to your agent

Retry the payments that failed.

A customer’s card was declined, charge it again.

Chase the renewals that did not go through.

# Invoice.collect
curl -X POST https://api.sb/leaseline.app/invoices/invoice_harbor_0002/collect \
  -H "Authorization: Bearer $STARTUP_BUILDER_API_KEY"
import { $ } from 'startup-builder'

await $.Invoice.collect({ invoice: 'invoice_harbor_0002' })
npx startup-builder do Invoice.collect --json '{"invoice":"invoice_harbor_0002"}'
{
  "name": "do",
  "arguments": {
    "code": "return await $.Invoice.collect({ invoice: 'invoice_harbor_0002' })"
  }
}

Change it

  • Retry six times instead of four.
  • Keep service on until the last retry fails.
  • Email me the list of past-due customers every Monday.

Under the hood

Systems
Billing, Ledger
Nouns
Invoice, Subscription, Mandate, Entry
Events
Invoice.overdue, Invoice.collected, Subscription.paused
Stripe objects
Invoice, PaymentIntent, Subscription

The guide wakes the first time a renewal fails, when Invoice.overdue appears in your records. Each retry runs Invoice.collect under the Billing Specialist's dunning Mandate, so no retry waits for your yes. The Billing Process holds the schedule: four retries by default, set with dunning.retries.