Invoice PDFs
Invoice PDF rendering is synchronous. The first render request pins the language
selected by Accept-Language; the first successful render is billable, while
cached requests are free and keep that language.
Responses are JSON by default. Send Accept: application/pdf to receive the PDF
bytes directly. JSON responses contain an unauthenticated customer-facing URL
that expires after 30 days. Anyone with that URL can download the invoice until
it expires, so treat it as a secret.
GET only retrieves a cached PDF and never renders or bills. POST renders the
PDF when necessary and returns the cached PDF otherwise.
The Invoice PDF object
id
string
object
string
invoice_pdf.live
boolean
invoice
string
status
enum
rendering
FiscalRail is generating the PDF.
ready
The PDF is available for download.
failed
The last render attempt failed.
locale
enum
es
Spanish.
en
English.
rendered_at
string or null
url
string or null
url_expires_at
string or null
{
"id": "inv_pdf_14Vxtqg6oXpAY5WdWoq4wW",
"object": "invoice_pdf",
"live": true,
"invoice": "inv_14Vxtqg6oXpAY5WdWoq4wW",
"status": "ready",
"locale": "es",
"rendered_at": "2026-07-31T09:31:00Z",
"url": "https://api.fiscalrail.com/invoice-pdfs/inv_pdf_14Vxtqg6oXpAY5WdWoq4wW?token=example",
"url_expires_at": "2026-08-30T09:31:00Z"
}
Render an invoice PDF
/v1/invoices/{invoice_id}/pdfSynchronously renders the PDF and charges only when no cached PDF
exists. Accept-Language selects es or en for the first render
request; that locale remains pinned for the invoice PDF. The account
invoice locale is used as fallback. Returns JSON metadata by default; send
Accept: application/pdf for PDF bytes. A cached render returns 200,
while a newly rendered PDF returns 201.
invoice_id
string
required
Accept-Language
string
200
A cached Invoice PDF object or the PDF bytes.
JSON or PDF
201
A newly rendered Invoice PDF object or the PDF bytes.
JSON or PDF
curl --request POST \
'https://api.fiscalrail.com/v1/invoices/inv_14Vxtqg6oXpAY5WdWoq4wW/pdf' \
--header "Authorization: Bearer ak_test_..." \
--header "Accept-Language: es"
{
"id": "inv_pdf_14Vxtqg6oXpAY5WdWoq4wW",
"object": "invoice_pdf",
"live": true,
"invoice": "inv_14Vxtqg6oXpAY5WdWoq4wW",
"status": "ready",
"locale": "es",
"rendered_at": "2026-07-31T09:31:00Z",
"url": "https://api.fiscalrail.com/invoice-pdfs/inv_pdf_14Vxtqg6oXpAY5WdWoq4wW?token=example",
"url_expires_at": "2026-08-30T09:31:00Z"
}
Retrieve an existing invoice PDF without generating or billing
/v1/invoices/{invoice_id}/pdfReturns JSON metadata by default. Send Accept: application/pdf to
download the PDF bytes. This operation never renders or bills; it
returns 404 if no PDF has been generated.
invoice_id
string
required
200
An Invoice PDF object or the PDF bytes.
JSON or PDF
curl --request GET \
'https://api.fiscalrail.com/v1/invoices/inv_14Vxtqg6oXpAY5WdWoq4wW/pdf' \
--header "Authorization: Bearer ak_test_..."
{
"id": "inv_pdf_14Vxtqg6oXpAY5WdWoq4wW",
"object": "invoice_pdf",
"live": true,
"invoice": "inv_14Vxtqg6oXpAY5WdWoq4wW",
"status": "ready",
"locale": "es",
"rendered_at": "2026-07-31T09:31:00Z",
"url": "https://api.fiscalrail.com/invoice-pdfs/inv_pdf_14Vxtqg6oXpAY5WdWoq4wW?token=example",
"url_expires_at": "2026-08-30T09:31:00Z"
}