API
Get the invoice of a charge
The link to the PDF, as JSON.
GET/billing/invoices/{orderId}
Runs the real call on your workspace.
GET /billing/invoices/{orderId}
The link to the PDF, as JSON.
Example
Needs billing:read. An invoice that was not written yet is written first, from the billing details on the charge or on the account, which can take a few seconds.
curl "$OE/billing/invoices/8c51f0d2-3b7e-4a19-b6c4-0e9d2f7a1c38" -H "$AUTH"{ "object": "invoice_link", "orderId": "8c51f0d2-3b7e-4a19-b6c4-0e9d2f7a1c38", "url": "https://files.example.com/invoices/acme-0007.pdf?signature=5f2c9a", "fileName": "Invoice-ACME-0007.pdf"}The link is signed by the billing provider, downloads the PDF and stops working after a while, so fetch it again rather than keeping it.
A charge with no billing name and address is a 409 billing_details_required, a draft or void charge is a 409 invoice_unavailable, and an invoice still being written is a 504 invoice_not_ready.