Overview
Theinvoice.created event is sent every time an invoice document is issued in BookingShake. This covers all invoice document types: standard invoices, deposit invoices, balance invoices, and credit notes.
The legal invoice is immutable once issued - its amounts, lines, and seller / account / contact snapshots are frozen - so there is no invoice.updated or invoice.deleted event. A legal correction is always materialized by a new document (typically a credit note), which triggers its own invoice.created event. The only writable part of an invoice is its free-form metadata (integration key/value pairs); updating it is a silent side-channel write that emits no webhook.
Quotes do not trigger this event. Global invoices (issued across multiple bookings at once) are also excluded.
- Sync invoices to your accounting software or ERP
- Archive legal documents in your own document management system
- Track revenue in real-time across venues
- Feed e-invoicing pipelines (the payload is aligned with EN 16931 semantics)
Conventions
The invoice payload follows strict conventions, shared with payment events:Invoice Types
Thetype field identifies the document type. type_code carries the corresponding UNTDID 1001 code used in e-invoicing standards:
type_code follows UNTDID 1001 (BT-3 in EN 16931, the basis of the French e-invoicing reform). This coding is broader than our internal types, so several type values legitimately share the same code. Only the deposit invoice has a dedicated code (386); a balance invoice is a standard invoice (380) that references the deposits, consistent with the B4/S4/M4 framework. Credit notes use 381, except a credit note on a deposit invoice which uses 503.Payload Example
Data Fields
General
Amounts
All amounts are integer cents, and are always the amounts of the document itself: a balance invoice carries the balance amount, not the total of the full service.On a balance invoice, the total of the full service can be recomposed as
amount_incl_tax + sum(deposit_invoices[].amount_incl_tax). The deposits deducted from the balance are itemized in deposit_invoices and appear as negative deduction lines in lines.Lines
lines contains the invoice line items as printed on the PDF, self-consistent with the document totals: sum(lines[].total_excl_tax) - global_discount_excl_tax = amount_excl_tax (within rounding).
Per document type:
- Deposit invoice: the deposit lines (one per VAT rate), not the lines of the underlying quote. Their split by accounting code is given by
accounting_breakdown. - Balance invoice: the full service lines, followed by one negative deduction line per deposit invoice and VAT rate (e.g.,
Déduction acompte FAC-2026-0021 (TVA 20%)with a negativetotal_excl_tax). Each deduction line carries theaccounting_breakdownof the deposit it deducts and itsdeposit_invoice_id. Recognise a deduction line by a non-nulldeposit_invoice_id, not by its sign or its missingaccounting_code: a service line can be negative and have no accounting code too. - Credit notes: same line structure as the document type they cancel.
accounting_breakdownfollows the same rules but can benullon a credit note even when the cancelled invoice carried one; in that case read the breakdown of the cancelled invoice vialinked_invoice_id.
- A line entered with a tax-inclusive price that was left empty is billed
0: it is returned with aunit_price_excl_taxand atotal_excl_taxof0. - A line with a negative quantity (an amount the venue takes off) is returned with a negative
quantity,total_excl_taxanddiscount.
Accounting breakdown
Deposit lines and deposit-deduction lines are aggregated per VAT rate, so they carry noaccounting_code of their own. accounting_breakdown tells you how each of these lines splits across the accounting codes of the underlying service lines (other line fields omitted):
- The entries sum exactly to the line’s
total_excl_tax(no rounding gap). The split is proportional to the net amount of the deposit invoice’s own billed service lines at the same VAT rate (after line discount, before global discount, options excluded), grouped by accounting code. - Entries are sorted by
accounting_codein plain ascending string order (character by character, not numeric:"10"sorts before"9"). Codes are trimmed. The share of service lines without an accounting code comes last, with"accounting_code": null. Shares that round to zero are omitted. - On a balance invoice, each deduction line carries the breakdown of the one deposit invoice it deducts (one line per deposit invoice and VAT rate), with negative amounts. It does not depend on the balance invoice’s own service lines.
accounting_breakdownisnullwhen there is nothing reliable to split on: the deposit invoice has no detailed service lines, no billed service line carries the VAT rate of the line, an accounting code has a negative net amount at that VAT rate (for example a negative service line), or the line amount is zero. It is never an empty array.- The breakdown is computed when the payload is built, from the accounting codes currently set on the deposit invoice’s service lines. It is available on GET /invoices for invoices issued before this field existed, and it can differ from an earlier webhook if those codes were changed since.
Global discount breakdown
A global discount is carried by the document, not by its lines: the service lines keep their amount before that discount.global_discount_breakdown tells you how the discount splits across VAT rates and accounting codes, so it can be posted without any computation on your side:
- Amounts are positive cents, like
global_discount_excl_tax: subtract them from the lines. - The entries sum exactly to
global_discount_excl_tax. - Per VAT rate,
sum(lines at that rate) - sum(entries at that rate) = taxable_breakdown at that rate. In the example:79773 - 60517 - 4127 = 15129and16875 - 12802 - 873 = 3200. On the rare documents where the invoice itself absorbs a rounding gap (for example a balance invoice fully covered by several deposits, brought to exactly0), the two sides can be a few cents apart: the breakdown stays the discount of the invoice. - The share of a VAT rate is the discount actually applied by the invoice at that rate, read from its stored amounts. Inside a rate, the split is proportional to the net amount of the service lines per accounting code.
- Entries are sorted by VAT rate ascending (compare rates as numbers:
tax_rateis"5.50"where the key oftaxable_breakdownis"5.5"), then byaccounting_codein plain ascending string order. Codes are trimmed. The share of lines without an accounting code comes last, with"accounting_code": null. Shares that round to zero are omitted. []when the document has no global discount to split. This includes deposit invoices and their credit notes: their lines are already net of the discount, andglobal_discount_excl_taxis0.nullwhen a global discount exists but no reliable split can be given: the lines do not match the stored amounts of the document, a VAT rate carries a stored base but no line, an accounting code has a negative net amount at a VAT rate, or the document is a partial credit note.global_discount_excl_taxis then an unchecked value (on a partial credit note it is the discount of the whole invoice). Handle these documents manually.- A credit note that cancels a whole invoice carries the same breakdown as that invoice.
Relations
Payments
payments contains the payment schedule attached to the invoice, as it stood when the invoice was issued. Since there is no invoice.updated event, this array is a snapshot: to follow the lifecycle of each payment afterwards (marked as paid, rescheduled, canceled), subscribe to payment events and join them on id — each entry here has the exact same shape as the data block of payment.* events, minus the join keys (invoice_id, invoice_number, quote_id, booking_id) already carried at the invoice level.
Entries are sorted by due_date (then created_at). Security deposits (holds) are excluded, consistent with payment events. Credit notes carry an empty array.
Amounts are signed: a negative amount with status
paid represents a refund - see Refunds.
Seller, Account, and Contact Blocks
seller (your venue), account (the buyer company), and contact (the buyer contact) are frozen snapshots captured when the invoice was issued. They reflect the legal mentions printed on the PDF and will not change if the live account or contact is later edited.
Field names are aligned with the account.* and contact.* events: a consumer sees the same account format across all event types.
Fields specific to these blocks:
Any of the three blocks can be
null if the corresponding entity was not set on the booking (e.g., account is null for an individual customer without a company).Next Steps
Payment Events
Track payments with the payment.created, updated, and deleted events
Security & Verification
Verify webhook signatures before processing
