Invoice
Private Invoice API endpoints
An API endpoint to get list of invoices.
Query parameters
pageoptionalintegerPage
per_pageoptionalintegerEntities per page
customer_idoptionalintegerFilter by customer ID
subscription_idoptionalintegerFilter by subscription ID
created_at[gte]optionalstringFilter to include only invoices with a creation date on or after the given date.
Format: date-time.
created_at[lte]optionalstringFilter to include only invoices with a creation date on or before the given date.
Format: date-time.
start_dateoptionalstringDeprecatedDeprecated alias of created_at[gte]. When both arrive, created_at[gte] wins.
Format: date-time.
end_dateoptionalstringDeprecatedDeprecated alias of created_at[lte]. When both arrive, created_at[lte] wins.
Format: date-time.
statusesoptionalstring[]Filter by invoice status
sort[field]optionalstringField to sort by. Required whenever any sort[...] key is present, so sending sort[direction] on its own returns 422. Send sort as an object (sort[field]=created_at), never as a scalar. When sort is omitted the list is ordered by id descending.
Possible values: id, created_at.
sort[direction]optionalstringSort direction; defaults to asc.
Possible values: asc, desc.
Defaults to "asc".
expand[]optionalstring[]List of relations to expand in the response.
Returnsobject
Invoices list response
A detailed description of the invoice.
Path parameters
invoice_idRequiredintegerInvoice ID
Format: integer.
Query parameters
expand[]optionalstring[]List of relations to expand in the response.
ReturnsInvoice
Invoice object response
Schedule the next payment for current invoice
Path parameters
invoice_idRequiredstringInvoice ID
Request body
Schedule Payment Body
next_attempt_atRequiredstringFormat: date-time.
ReturnsInvoice
Invoice object response
Error responses
400objectThe invoice is not in open or past_due status.
Void an open or past_due invoice. Sets the status to voided, records voided_at and cancels the pending payment validation attempt. The related subscription is not changed. The invoice must not have a processing payment intent.
Path parameters
invoice_idRequiredintegerInvoice ID
Format: integer.
Query parameters
expand[]optionalstring[]List of relations to expand. Items, discounts and metadata are always included; billing_address and shipping_address are only returned when expanded.
ReturnsInvoice
Invoice object response
Error responses
400objectThe invoice is not in open or past_due status (invoice_status_not_allowed), or it has a processing payment intent (bad_request).
404objectInvoice not found
Forgive an open or past_due invoice. Voids the invoice the same way as the void endpoint (sets the status to voided, records voided_at and cancels the pending payment validation attempt) and additionally clears the related subscription's past-due state. The invoice must belong to a subscription and must not have a processing payment intent.
Path parameters
invoice_idRequiredintegerInvoice ID
Format: integer.
Query parameters
expand[]optionalstring[]List of relations to expand. Items, discounts and metadata are always included; billing_address and shipping_address are only returned when expanded.
ReturnsInvoice
Invoice object response
Error responses
400objectThe invoice is not in open or past_due status (invoice_status_not_allowed), does not belong to a subscription, or it has a processing payment intent (bad_request).
404objectInvoice not found
Record a successful payment for an open or past_due invoice without charging the customer. Creates a success charge transaction, marks the invoice as paid (records paid_at) and updates the related subscription's payment state. The invoice must belong to a subscription and must not have a processing payment intent.
Path parameters
invoice_idRequiredintegerInvoice ID
Format: integer.
Query parameters
expand[]optionalstring[]List of relations to expand. Items, discounts and metadata are always included; billing_address and shipping_address are only returned when expanded.
ReturnsInvoice
Invoice object response
Error responses
400objectThe invoice is not in open or past_due status (invoice_status_not_allowed), does not belong to a subscription, or it has a processing payment intent (bad_request).
404objectInvoice not found