SET Merchant API · Recurring invoices
Create a recurring invoice
POST/v1/invoice_schedules
Issues an invoice every week, month, quarter or year, numbered <prefix>-0001, -0002, … Each run applies the checks of POST /v1/invoices (run once when the schedule is set), carries the schedule's payer, gets a payment link, and raises invoice_schedule.invoiced with the invoice and the link's URL for you to send. A schedule that starts now issues its first invoice at once (firstInvoice).
Headers
Idempotency-Keystring- Optional. The same key and body run once; a replay answers with
Idempotent-Replayed: true. Kept 24 hours.
Body
customerstringrequired- The merchant itself.
amountdecimal stringrequired- Each invoice's amount.
currency"usd" | "eur" | "gbp"- Default
usd. pay{ cashOutAddress } | { virtualAccount }required- Where the payer pays, as on an invoice.
payerobject- Who will pay (same body as
/sender), sealed at rest. every"week" | "month" | "quarter" | "year"required- How often. The 31st becomes a shorter month's last day.
numberPrefixstringrequired- 1–30 letters, digits or
_ . -. startAtISO time- The first invoice. Default now.
dueDaysinteger- 0–365, default 14.
countinteger- How many invoices in all, 1–1000. Default: until cancelled.
Notes
- A number you already used moves to the next one; any other refusal is kept in
lastProblemand retried in an hour. - Events
invoice_schedule.created,.invoiced,.canceled. A saved card charged each period is Stripe Billing on the merchant's own Stripe account, not SET's.
Errors
400 every_invalid400 number_prefix_invalid400 due_days_invalid400 count_invalid400 start_at_invalid400 amount_invalid400 currency_invalid400 pay_invalid503 invoice_payer_unavailable403 invoices_merchant_only401 api_key_required401 api_key_invalid401 api_key_wrong_mode403 scope_missing429 rate_limited