Skip to content

Invoices API

Generate and download booking invoices.


Invoice HTML Preview

http
GET /api/v1/bookings/{id}/invoice

or alternatively:

http
GET /api/v1/bookings/{id}/invoice/html

Returns the invoice as rendered HTML, useful for browser previews.


Invoice PDF Download

http
GET /api/v1/bookings/{id}/invoice/pdf

Response:

json
{
  "success": true,
  "data": {
    "pdf_base64": "...",
    "filename": "invoice-BK-2024-001234.pdf"
  }
}

TIP

The pdf_base64 field contains the PDF encoded as a Base64 string. Decode it client-side to download or display the file.

Unified API Documentation