Skip to main content
GET
Get Invoice Details

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

number
required
The unique identifier of the invoice you want to retrieve.

Query Parameters

string
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

number
Unique identifier for the invoice
string
Globally unique identifier for the invoice
string
Human-friendly invoice number as visible to the customer
boolean
Whether the invoice is a draft
boolean
Whether the invoice is fully paid
string
ISO 8601 datetime when the invoice was paid (if paid)
string
ISO 8601 date the invoice is due
boolean
Whether the document is a credit note
boolean
Whether the invoice has been refunded

Customer and Location

number
Customer id the invoice belongs to
number
Location id where this invoice was issued
number
Web address id for the issuing location

Billing To

string
Billing contact or company name (can be null)
string
Billing address line (can be null)
string
Billing city (can be null)
string
Billing state/region (can be null)
string
Billing postal/ZIP code (can be null)
object
Country object for the billing address
string
Tax/VAT registration number (can be null)

Amounts and Currency

number
Grand total amount of the invoice (in invoice currency)
number
Amount still due
number
Amount paid so far
number
Total tax amount across all lines
number
Total discount applied to the invoice
object
Invoice currency object with fields: Name, Code, Format, etc.
object
Transaction currency used by the payment gateway (if different)
string
Pre-formatted total, e.g. “$123.45”
string
Pre-formatted due amount

Lines and Taxes

array
Array of line items. Each item includes fields such as Description, Quantity, UnitPrice, SubTotal, TaxAmount, TaxPercentage, and optional DiscountCode.
array
Breakdown of totals by tax rate, including Rate, TaxSubTotal, SubTotal, and Lines.

Usage of Credits (if applicable)

array
Applied extra service credits with Amount, ChargePeriod, ExpiresOn.
array
Applied booking credits with Amount, ChargePeriod, ExpiresOn.

System Fields

string
ISO 8601 datetime when the invoice was created (local time)
string
ISO 8601 datetime when the invoice was created (UTC)
string
ISO 8601 datetime when the invoice was last updated (local time)
string
ISO 8601 datetime when the invoice was last updated (UTC)

Example Response

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:
  1. Checkout flow controller – decides steps when an invoice_id is present
    • File: src/views/checkout/CheckoutLayoutPage.tsx
  2. 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
  3. Completion step context
    • File: src/views/checkout/SignupCompletePage.tsx
  4. Invoice fetching and basket state orchestration
    • File: src/states/useBasketData.tsx (calls endpoints.billing.invoices.one when invoice_id is in the URL)
  5. Discount code summary UI (reads invoice lines and currency)
    • File: src/views/public/checkout/booking/components/DiscountCodeForm.tsx

Typical integration pattern

  • 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

error
The current user is not authenticated or The invoice is not accessible to the current user
error
Invoice with the specified id does not exist or is not accessible