List invoices
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('http://localhost:4000/v1/invoices', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request GET \
--url http://localhost:4000/v1/invoices \
--header 'Authorization: Bearer <token>'{
"object": "list",
"data": [
{
"id": "in_8Rt3Kq2Mn9Lp4Wx",
"object": "invoice",
"subscription": "<string>",
"customer": "<string>",
"period_start": 123,
"period_end": 123,
"seconds": 123,
"amount_settled": "<string>",
"gross": "<string>",
"fee": "<string>",
"net": "<string>",
"currency": "ausd",
"status": "paid",
"tx_hash": "<string>",
"livemode": true,
"created": 123
}
],
"has_more": true,
"url": "<string>"
}{
"error": {
"type": "api_error",
"message": "<string>",
"code": "<string>",
"param": "<string>"
}
}{
"error": {
"type": "api_error",
"message": "<string>",
"code": "<string>",
"param": "<string>"
}
}{
"error": {
"type": "api_error",
"message": "<string>",
"code": "<string>",
"param": "<string>"
}
}Invoices
List invoices
GET
/
v1
/
invoices
List invoices
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('http://localhost:4000/v1/invoices', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request GET \
--url http://localhost:4000/v1/invoices \
--header 'Authorization: Bearer <token>'{
"object": "list",
"data": [
{
"id": "in_8Rt3Kq2Mn9Lp4Wx",
"object": "invoice",
"subscription": "<string>",
"customer": "<string>",
"period_start": 123,
"period_end": 123,
"seconds": 123,
"amount_settled": "<string>",
"gross": "<string>",
"fee": "<string>",
"net": "<string>",
"currency": "ausd",
"status": "paid",
"tx_hash": "<string>",
"livemode": true,
"created": 123
}
],
"has_more": true,
"url": "<string>"
}{
"error": {
"type": "api_error",
"message": "<string>",
"code": "<string>",
"param": "<string>"
}
}{
"error": {
"type": "api_error",
"message": "<string>",
"code": "<string>",
"param": "<string>"
}
}{
"error": {
"type": "api_error",
"message": "<string>",
"code": "<string>",
"param": "<string>"
}
}Authorizations
Your secret key: sk_test_… for test mode, sk_live_… for live. Server-side only.
Query Parameters
Required range:
1 <= x <= 100Example:
10
Id of the last object on the previous page.
Settled at or after this unix time (period_end).
Settled at or before this unix time (period_end).
Available options:
paid, failed