/Docs
Search docs or ask a question⌘K
DocsAgent
Changelog
API Reference List Invoices

List Invoices

List an organization's invoices, newest first

GET/v1/billing/invoicesTry it
Session token

Returns an organization's invoices, newest first. Billing is per organization, so the list covers every project in it. Each invoice carries its total only — there are no line items.

Note

Requires a session JWT and the admin or owner role in the organization. A member gets 403 forbidden ("Only admins can view invoices"), and so does anyone who is not a member of the organization ("Not a member of this organization"). API keys are not accepted on billing endpoints. Any plan.

Query Parameters

NameDescription
orgId:stringqueryRequired
The organization ID (a UUID).
limit:integerquery
How many invoices to fetch, 1–100.
Default12
startingAfter:stringquery
Cursor for the next page: the id of the last invoice on the page you already have.

Response

NameDescription
data:array
The invoices, newest first. Draft invoices are left out.
Show 8 child attributesarray
hasMore:boolean
true when there are older invoices. Fetch them with startingAfter set to the last id in data.

An organization that has never had a paid subscription gets { "data": [], "hasMore": false }.

Note

Drafts are removed after a page is fetched, so a page can hold fewer than limit invoices even when hasMore is true. Page on hasMore, not on the page size.

Response — 200 OK

To fetch the next page:

Error Responses

400 Bad Request

Returned when orgId is missing or not a UUID, limit is not an integer from 1 to 100, or startingAfter is empty or longer than 255 characters.

json
{
"error": {
"code": "validation_error",
"message": "limit: Number must be less than or equal to 100",
"details": { "traceId": "6f1c2a9e-3b7d-4c11-9a0e-2d5f8b4c7e10" }
}
}

401 Unauthorized

Returned when the Authorization header is missing, or the token is invalid or expired.

403 Forbidden

Returned when you are a member of the organization rather than an admin or owner, or not a member at all.

json
{
"error": {
"code": "forbidden",
"message": "Only admins can view invoices",
"details": { "traceId": "6f1c2a9e-3b7d-4c11-9a0e-2d5f8b4c7e10" }
}
}

502 Bad Gateway

Returned when the payment provider could not be reached or returned an error. Retry with backoff.

json
{
"error": {
"code": "stripe_error",
"message": "Could not load billing details. Try again shortly.",
"details": { "traceId": "6f1c2a9e-3b7d-4c11-9a0e-2d5f8b4c7e10" }
}
}

503 Service Unavailable

Returned when billing is temporarily unavailable. An organization with no billing record still gets the empty list instead.

json
{
"error": {
"code": "billing_unavailable",
"message": "Billing is not available right now.",
"details": { "traceId": "6f1c2a9e-3b7d-4c11-9a0e-2d5f8b4c7e10" }
}
}
Was this page helpful? Yes No
Request
cURLJavaScriptPythonGoRubyPHPJavaC#cURL
curl "https://api.syntext.dev/v1/billing/invoices?orgId=0b6f2c1e-8a4d-4f3b-9c2e-7d1a5e6f8b90&limit=12" \
-H "Authorization: Bearer $SYNTEXT_JWT"
Responseapplication/json
200bashOK
{
"data": [
{
"id": "in_1Q2w3E4r5T6y7U8i",
"number": "A1B2C3D4-0007",
"date": "2026-11-01T00:04:12.000Z",
"amount": 2900,
"currency": "usd",
"status": "paid",
"pdfUrl": "https://pay.stripe.com/invoice/acct_123/test_abc/pdf",
"hostedUrl": "https://invoice.stripe.com/i/acct_123/test_abc"
},
{
"id": "in_1P9o8I7u6Y5t4R3e",
"number": "A1B2C3D4-0006",
"date": "2026-10-01T00:03:58.000Z",
"amount": 2900,
"currency": "usd",
"status": "paid",
"pdfUrl": "https://pay.stripe.com/invoice/acct_123/test_def/pdf",
"hostedUrl": "https://invoice.stripe.com/i/acct_123/test_def"
}
],
"hasMore": true
}
Product
Resources
Company
© 2026 SyntextBuilt with Syntext