Skip to content

Recurring invoices

A recurring invoice is a template plus a schedule. EmiteCR replays the template through the normal emission pipeline on each run, so every generated document is a real invoice with its own clave and status.

Ventana de terminal
POST /v1/recurring-invoices
GET /v1/recurring-invoices
GET /v1/recurring-invoices/:id
PATCH /v1/recurring-invoices/:id
DELETE /v1/recurring-invoices/:id
POST /v1/recurring-invoices/preview-next-runs
GET /v1/recurring-invoices/:id/runs
POST /v1/recurring-invoices/:id/pause
POST /v1/recurring-invoices/:id/resume
POST /v1/recurring-invoices/:id/run-now
  • The template holds a full invoice payload (docType, receiver, lines, taxes) plus a cadence (interval + start/end).
  • A background sweep finds templates due to run and emits them by replaying the template through create() — the same path a manual invoice takes.
  • Each execution is a run you can inspect (/runs), with the resulting invoice id and status.
  • preview-next-runs — dry-run the next N dates before committing to a cadence.
  • pause / resume — stop and restart without deleting the template.
  • run-now — emit an out-of-band occurrence immediately (e.g. to catch up).
  • Gated by the recurring:* scopes and the recurring-invoices feature on the tenant’s plan.
  • Because each run goes through normal emission, all the usual rules apply — quota consumption (production), idempotency, Hacienda acceptance, webhooks.
  • A run that fails (e.g. Hacienda rejection) is visible in /runs; fix the template and let the next occurrence run, or run-now.