List Stripe invoices for the authenticated account, newest first.
const url = 'https://api.pingram.io/account/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.pingram.io/account/invoices \ --header 'Authorization: Bearer <token>'Authorizations
Parameters
Query Parameters
Max invoices to return (1-100, default 10)
Pagination cursor (invoice id from a previous response)
Filter by status
Inclusive lower bound (YYYY-MM-DD or unix seconds)
Inclusive upper bound (YYYY-MM-DD or unix seconds)
Responses
200
Successful response
GET /account/invoices response.
object
object
Human-readable invoice number, when assigned.
Total amount due on the invoice (cents).
Unix timestamp (seconds) when the invoice was created.
Stripe-hosted invoice page (receipt / pay).
Direct PDF download URL.
Billing period start (unix seconds), when applicable.
Billing period end (unix seconds), when applicable.
True when more invoices exist; pass the last invoice id as startingAfter.
Example
{ "invoices": [ { "status": "draft" } ]}400
Bad Request - validation errors, invalid input
Standard error response for API errors.
object
Unique tracking ID for the request.
Structured error details for API error responses.
object
Machine-readable error code.
Human-readable error message.
Actionable hint for fixing the error.
Examplegenerated
{ "trackingId": "example", "error": { "code": "example", "message": "example", "fix": "example" }}401
Unauthorized
402
Payment Required - usage limits exceeded
Standard error response for API errors.
object
Unique tracking ID for the request.
Structured error details for API error responses.
object
Machine-readable error code.
Human-readable error message.
Actionable hint for fixing the error.
Examplegenerated
{ "trackingId": "example", "error": { "code": "example", "message": "example", "fix": "example" }}500
Internal Server Error
502
Bad Gateway - provider error
Standard error response for API errors.
object
Unique tracking ID for the request.
Structured error details for API error responses.
object
Machine-readable error code.
Human-readable error message.
Actionable hint for fixing the error.
Examplegenerated
{ "trackingId": "example", "error": { "code": "example", "message": "example", "fix": "example" }}