Skip to content
myela

startDate and endDate are calendar dates (YYYY-MM-DD), not timestamps, and they mean dates in YOUR timezone — set it in the portal under Settings → Invoicing, because "the 1st of the month" is a claim about your calendar and not about UTC. A dayOfMonth of 29, 30 or 31 is honoured as asked: a schedule set to the 31st bills the 28th in February and returns to the 31st in March, rather than quietly becoming a 28th-of-the-month schedule. Use lastDayOfMonth: true when the last day is what you actually mean. mode defaults to auto_send — each cycle issues the invoice. draft_for_review leaves a draft for you to edit and send instead, which is what you want when the amount needs a human look. Amounts are integers in the minor unit — 4999 is $49.99. A decimal is rejected rather than silently charged as a different figure.

Create recurring invoice

POST/v1/recurring_invoicesLink

startDate and endDate are calendar dates (YYYY-MM-DD), not timestamps, and they mean dates in YOUR timezone — set it in the portal under Settings → Invoicing, because "the 1st of the month" is a claim about your calendar and not about UTC.

A dayOfMonth of 29, 30 or 31 is honoured as asked: a schedule set to the 31st bills the 28th in February and returns to the 31st in March, rather than quietly becoming a 28th-of-the-month schedule. Use lastDayOfMonth: true when the last day is what you actually mean.

mode defaults to auto_send — each cycle issues the invoice. draft_for_review leaves a draft for you to edit and send instead, which is what you want when the amount needs a human look. Amounts are integers in the minor unit — 4999 is $49.99. A decimal is rejected rather than silently charged as a different figure.

SandboxSecret keyrecurringInvoices.create

Request fields

Edit a field and the generated request updates immediately.

Request body
stringrequired

The customer that owns or receives this resource.

stringrequired

A human-readable name.

stringrequired

The cadence value.

stringrequired

The start date value.

stringrequired

The template value.

Response contract

The successful wire shape and errors an integration should branch on.

201

Recurring invoice

application/json
idstringrequired
Unique recurring invoice identifier.
object"recurring_invoice"required
Stable resource discriminator.
customerIdstringrequired
The customer every generated invoice bills.
namestringrequired
Your label for the schedule. Not shown to the customer.
statusstringrequired
One of active, paused, completed, cancelled or failed. You set paused and cancelled; completed and failed are set for you — completed when it runs out of occurrences or passes its end date, failed when it parks itself after repeated errors.
modestringrequired
auto_send issues each invoice as it is generated. draft_for_review leaves a draft for you to edit and send, which is what you want when the amount needs a human look before it goes out.
cadenceobjectrequired
unit (weekly or monthly) and interval, plus weekday for weekly, or dayOfMonth or lastDayOfMonth for monthly. dayOfMonth is reported as you asked for it, never as clamped: a schedule set to the 31st reports 31 in every month, and bills the 28th in February.
startDatestringrequired
First date the schedule may produce an invoice, as a calendar date (YYYY-MM-DD) in your timezone — not a timestamp.
endDatestring
Optional last date, inclusive. Absent means it runs until you stop it.
nextInvoiceDatestring
The next date this produces an invoice, in your timezone. Absent once the schedule is cancelled or has run its course.
maxOccurrencesinteger
Optional cap on how many invoices this will ever produce.
occurrenceCountintegerrequired
How many invoices it has produced so far.
templateobjectrequired
What each generated invoice is built from: amount and currency, optional amountTax, amountDiscount, description, paymentTerms, items, plus autoCharge and paymentMethodId. Amounts are minor units. Editing it changes the next cycle only.
lastFailureCodestring
Why the last cycle produced nothing, as a code. Present only after a failure; cleared once a cycle succeeds.
recurringInvoiceIdstring
The recurring invoice that produced this one. Absent on a one-off invoice.
billingPeriodstring
Which cycle this invoice satisfies, as the period's start date in your timezone. Two invoices in one month carry two different values, which is how you tell them apart.
createdAtstringrequired
ISO 8601 creation timestamp.
Example response
{
  "id": "sch_01JEXAMPLE",
  "object": "recurring_invoice",
  "customerId": "cus_01JEXAMPLE",
  "name": "Monthly retainer",
  "status": "active",
  "mode": "auto_send",
  "cadence": {
    "unit": "monthly",
    "interval": 1,
    "dayOfMonth": 1
  },
  "startDate": "2026-09-01",
  "endDate": "2027-09-01",
  "nextInvoiceDate": "2026-10-01",
  "maxOccurrences": 12,
  "occurrenceCount": 3,
  "template": {
    "amount": 120000,
    "currency": "USD",
    "paymentTerms": "net_30",
    "autoCharge": false
  },
  "lastFailureCode": "RECURRING_INVOICE_CARD_NOT_FOR_CUSTOMER",
  "recurringInvoiceId": "sch_01JEXAMPLE",
  "billingPeriod": "2026-09-01",
  "createdAt": "2026-08-19T12:00:00.000Z"
}
Error responses
401authentication_failed

The key is missing, malformed, revoked, or invalid for this environment.

403permission_denied

The key does not have recurringInvoices.create.

422invalid_request

One or more request fields are invalid.