Your workspace's invoices, the latest first, with Stripe's pages for each: its owner
GET
/v1/buyer/billing/invoices
const url = 'https://example.com/v1/buyer/billing/invoices?sort=created_at';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://example.com/v1/buyer/billing/invoices?sort=created_at' \ --header 'Authorization: Bearer <token>'Who: a workspace’s owner. Not for API keys.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”page_size
integer
Rows a page, up to the list’s maximum; the service’s default when left out
page_token
string
The previous page’s meta.next_page_token
sort
string
Comma-separated fields, each with - for descending
status
string
Responses
Section titled “Responses”OK
Media typeapplication/json
object
data
required
Array<object>
object
amount_due
required
amount_paid
required
attempt_count
required
integer format: int32
created_at
required
string | null format: date-time
hosted_invoice_url
required
string
id
required
string
invoice_pdf_url
required
string
next_payment_attempt
required
string | null format: date-time
number
required
string
paid_at
required
string | null format: date-time
period_end
required
string | null format: date-time
period_start
required
string | null format: date-time
plan
required
string
status
required
string | null
subtotal
required
workspace_id
required
integer format: int64
meta
required
object
next_page_token
required
string | null
total
required
integer | null format: int64
total_approximate
required
boolean
Example
{ "data": [ { "status": "draft" } ]}default
Section titled “default”An error, as go-commons apperr maps it
Media typeapplication/json
object
error
required
object
code
required
string
fields
object
key
additional properties
string
message
required
string
Example generated
{ "error": { "code": "example", "fields": { "additionalProperty": "example" }, "message": "example" }}