Create Renewal Invoice
Create a DRAFT renewal invoice for the next billing cycle (idempotent).
Called by the Restate workflow handler to initiate subscription renewal.
The invoice is created in DRAFT state and must be finalized separately.
Idempotency: If a DRAFT invoice already exists for this subscription's
next billing period, returns the existing invoice instead of creating
a duplicate.
Returns status-based response for workflow orchestration:
- status: "invoice_created", "skipped", or "stopped"
- subscription_id, invoice_id: Present when status is "invoice_created"
- reason: Explanation when status is "skipped" or "stopped"
Authentication
AuthorizationBearer
Bearer authentication of the form Bearer <token>, where token is your auth token.
Path parameters
subscription_id
account_id
Headers
X-Restate-Secret-Key
Response
Successful Response
status
subscription_id
invoice_id
reason