Invoices

Preview the next invoice for a customer (Stripe-equivalent)

Answers "what is my next bill going to look like?" as a full-period ESTIMATE. Usage lines are rated through the same per-meter aggregation path as the cycle scan, but the estimate deliberately does NOT replicate usage-cap scaling or mid-period segment proration (ADR-045) — for capped or mid-period-changed subscriptions the response carries warnings[] naming the divergence and the finalized invoice can differ (lower, for capped usage). Composes across customer / subscription / pricing; registered as a sibling of /v1/invoices (chi picks the more specific pattern, otherwise /{id} would capture create_preview as an invoice ID). See docs/design-create-preview.md.

post/v1/invoices/create_preview

Request

  • Base URL: http://localhost:8080
  • URL: http://localhost:8080/v1/invoices/create_preview
  • Auth: HTTP bearer

Request body

customer_idstring required

Customer to preview the invoice for.

subscription_idstring

Optional. Defaults to the customer's primary active subscription if not supplied.

Response

Preview result

Changes

No recorded changes to this operation across all 53 revisions of this API.