Check out our upcoming events and meetups! View events →
Retrieve a single invoice by its unique identifier.
import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: process.env['TELNYX_API_KEY'], // This is the default and can be omitted
});
const invoice = await client.invoices.retrieve('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');
console.log(invoice.data);{
"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",
"download_url": "https://us-east-1.telnyxstorage.com/porting-documents/telnyx/..."
}
}Documentation Index
Fetch the complete documentation index at: https://developers.telnyx.com/llms.txt
Use this file to discover all available pages before exploring further.
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Invoice UUID
Invoice action
json, link "json"
Get invoice details
Show child attributes
Was this page helpful?
import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: process.env['TELNYX_API_KEY'], // This is the default and can be omitted
});
const invoice = await client.invoices.retrieve('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');
console.log(invoice.data);{
"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",
"download_url": "https://us-east-1.telnyxstorage.com/porting-documents/telnyx/..."
}
}