Get Invoice Details
Retrieves a single invoice for the current customer. Invoices are created during checkout flows for bookings, products, plans, and more. This endpoint returns the full invoice breakdown, including lines, taxes, totals, currency, and metadata for the location.
Authentication
This endpoint requires an authenticated customer session. The invoice must belong to the current customer or to a team the customer manages.
Path Parameters
The unique identifier of the invoice you want to retrieve.
Query Parameters
Comma-separated list of field paths to include in the response. When provided, only the
specified fields are returned — useful for reducing payload size. Supports nested paths
using dot notation. Example: _shape=InvoiceNumber,TotalAmount,DueAmount,Paid,Lines.
Response
The response shape follows the InvoicePreview contract used across checkout and payments. Below is a summary of the most-used fields.
Identification and Status
Unique identifier for the invoice
Globally unique identifier for the invoice
Human-friendly invoice number as visible to the customer
Whether the invoice is a draft
Whether the invoice is fully paid
ISO 8601 datetime when the invoice was paid (if paid)
ISO 8601 date the invoice is due
Whether the document is a credit note
Whether the invoice has been refunded
Customer and Location
Customer id the invoice belongs to
Location id where this invoice was issued
Web address id for the issuing location
Billing To
Billing contact or company name (can be null)
Billing address line (can be null)
Billing city (can be null)
Billing state/region (can be null)
Billing postal/ZIP code (can be null)
Country object for the billing address
Tax/VAT registration number (can be null)
Amounts and Currency
Grand total amount of the invoice (in invoice currency)
Total tax amount across all lines
Total discount applied to the invoice
Invoice currency object with fields: Name, Code, Format, etc.
Transaction currency used by the payment gateway (if different)
Pre-formatted total, e.g. “$123.45”
Lines and Taxes
Array of line items. Each item includes fields such as Description, Quantity, UnitPrice, SubTotal, TaxAmount, TaxPercentage, and
optional DiscountCode.
Breakdown of totals by tax rate, including Rate, TaxSubTotal, SubTotal, and Lines.
Usage of Credits (if applicable)
Applied extra service credits with Amount, ChargePeriod, ExpiresOn.
Applied booking credits with Amount, ChargePeriod, ExpiresOn.
System Fields
ISO 8601 datetime when the invoice was created (local time)
ISO 8601 datetime when the invoice was created (UTC)
ISO 8601 datetime when the invoice was last updated (local time)
ISO 8601 datetime when the invoice was last updated (UTC)
Example Response
{
"Id": 12345,
"IdString": "12345",
"UniqueId": "e9a3a3b8-8d3e-4b54-9f2d-0c82b2a8b9a1",
"InvoiceNumber": "INV-2025-000123",
"CoworkerId": 987,
"BusinessId": 42,
"DueDate": "2025-09-30",
"Paid": false,
"Draft": false,
"Currency": { "Code": "USD", "Name": "US Dollar", "Format": "$0,0.00" },
"TotalAmount": 199.0,
"DueAmount": 199.0,
"TaxAmount": 33.17,
"DiscountAmount": 0,
"Lines": [
{
"Id": 1,
"Description": "Meeting room booking",
"Quantity": 1,
"UnitPrice": 165.83,
"SubTotal": 165.83,
"TaxAmount": 33.17,
"TaxPercentage": 20,
"SubTotalFormatted": "$165.83",
"TaxAmountFormatted": "$33.17",
"UnitPriceFormatted": "$165.83"
}
],
"TaxCategories": [{ "Rate": 20, "TaxSubTotal": 33.17, "SubTotal": 165.83, "Name": "VAT 20%", "Lines": [] }],
"TotalFormated": "$199.00",
"DueAmountFormated": "$199.00",
"CreatedOn": "2025-09-28T10:15:00",
"CreatedOnUtc": "2025-09-28T09:15:00Z"
}
Usage in Portal
This endpoint is used during checkout and payment flows whenever an existing invoice id is present (e.g., resuming payment or redirecting back from a payment provider). Key usages include:
- Checkout flow controller – decides steps when an
invoice_id is present
- File:
src/views/checkout/CheckoutLayoutPage.tsx
- Payment selection and processing (uses invoice data to start payment sessions)
- Files:
src/views/checkout/SignupPaymentPage.tsx
src/views/public/checkout/booking/components/StripeCheckoutForm.tsx
src/views/public/checkout/booking/components/SpreedlyCheckoutForm.tsx
- Completion step context
- File:
src/views/checkout/SignupCompletePage.tsx
- Invoice fetching and basket state orchestration
- File:
src/states/useBasketData.tsx (calls endpoints.billing.invoices.one when invoice_id is in the URL)
- Discount code summary UI (reads invoice lines and currency)
- File:
src/views/public/checkout/booking/components/DiscountCodeForm.tsx
Typical integration pattern
// From src/api/endpoints.ts
// const endpoints.billing.invoices.one = (invoiceId: number) => ({
// url: `/api/public/billing/invoices/${invoiceId}`,
// type: null as unknown as InvoicePreview,
// })
// Usage in React
const endpoint = endpoints.billing.invoices.one(Number(invoiceId))
const { resource: invoice } = useData<typeof endpoint.type>(httpClient, invoiceId ? endpoint.url : null)
POST /en/basket/CreateInvoice – Create an invoice from the current basket
POST /api/public/payments/stripe/createGuestSession – Start a Stripe checkout session
POST /api/public/payments/spreedly/createGuestSession – Start a Spreedly payment session
Error Responses
The current user is not authenticated or The invoice is not accessible to the current user
Invoice with the specified id does not exist or is not accessible