Invoice history.
const url = 'https://api.siteqwality.com/billing/invoices';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://api.siteqwality.com/billing/invoices \ --header 'Authorization: Bearer <token>'Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Query Parameters
Section titled “Query Parameters ”How many invoices to return (default 24, max 100).
Responses
Section titled “ Responses ”Invoices, newest first
object
object
Stripe’s human-facing invoice number. Absent until finalization.
Unix seconds.
ISO 4217, uppercase.
A direct files.stripe.com link, handed to the browser as-is rather
than proxied. A PDF download is a file, not a management screen, so it
does not break the “no screen sends the customer to Stripe” rule, and
proxying it would mean streaming a document through a Lambda for no
gain. The link is short-lived and scoped to the invoice by Stripe.
A readable summary of the line items. Deliberately NOT Stripe’s
top-level description, which is null on every subscription invoice we
generate and would leave the whole column blank.
Stripe’s paging flag for the page requested. It counts invoices Stripe holds, not rows returned, so it can be true while this page dropped a draft.
Example generated
{ "invoices": [ { "id": "example", "number": "example", "created": 1, "total_cents": 1, "currency": "example", "status": "example", "pdf_url": "example", "description": "example" } ], "has_more": true}Missing or invalid authentication
Account has no Stripe customer
Internal server error