import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: 'My API Key',
});
const invoices = await client.invoices.list();
console.log(invoices.data);{
"meta": {
"total_results": 20,
"total_pages": 1,
"page_number": 1,
"page_size": 20
},
"data": [
{
"invoice_id": "48eff763-ea80-4345-b688-78249eb165a8",
"file_id": "454ea3b0-9eaa-4fa9-992e-6d9f31c0a37e",
"period_start": "2023-11-01",
"period_end": "2023-11-30",
"paid": true,
"url": "https://api.telnyx.com:443/v2/invoices/48eff763-ea80-4345-b688-78249eb165a8"
}
]
}Retrieve a paginated list of invoices.
import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: 'My API Key',
});
const invoices = await client.invoices.list();
console.log(invoices.data);{
"meta": {
"total_results": 20,
"total_pages": 1,
"page_number": 1,
"page_size": 20
},
"data": [
{
"invoice_id": "48eff763-ea80-4345-b688-78249eb165a8",
"file_id": "454ea3b0-9eaa-4fa9-992e-6d9f31c0a37e",
"period_start": "2023-11-01",
"period_end": "2023-11-30",
"paid": true,
"url": "https://api.telnyx.com:443/v2/invoices/48eff763-ea80-4345-b688-78249eb165a8"
}
]
}Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Specifies the sort order for results.
period_start, -period_start "period_start"
List of invoices
Show child attributes
"48eff763-ea80-4345-b688-78249eb165a8"
"454ea3b0-9eaa-4fa9-992e-6d9f31c0a37e"
"2023-11-01"
"2023-11-30"
true
"https://api.telnyx.com:443/v2/invoices/48eff763-ea80-4345-b688-78249eb165a8"
Was this page helpful?