# Double-Entry Accounting Model

This note defines the accounting invariant for Zavvion Events checkout and finance reporting.

## Core Rule

Every paid order must create balanced ledger entries:

```text
total debits == total credits
```

For the launch model, the successful payment journal is:

| Entry | Debit | Credit | Meaning |
| --- | ---: | ---: | --- |
| `customer_gross` | Customer total collected | 0 | Stripe clearing / cash receivable for the full customer payment |
| `platform_fee` | 0 | Platform fee net + platform fee VAT/tax | Zavvion platform revenue plus VAT/tax payable component |
| `organiser_revenue` | 0 | Ticket, merchandise, and donation gross | Amount due to organiser before known Stripe processing fees |

Example:

| Component | Minor amount |
| --- | ---: |
| Ticket gross due to organiser | 12000 |
| Platform fee net | 1000 |
| Platform fee VAT | 200 |
| Platform fee gross | 1200 |
| Customer total paid | 13200 |
| Organiser gross due | 12000 |

Journal:

```text
Dr customer_gross       13200
Cr platform_fee          1200
Cr organiser_revenue    12000
```

This balances exactly. A reconciliation difference is not acceptable as a normal state; it is a review exception that must be resolved.

## Stripe Connect Treatment

The current Stripe model is Checkout Sessions with PaymentIntents and Connect destination charges:

- `payment_intent_data[transfer_data][destination]` points to the organiser connected account.
- `payment_intent_data[application_fee_amount]` is the Zavvion platform fee gross amount, including platform-fee VAT/tax where applicable.
- Stripe webhooks are the trusted payment confirmation source.

With destination charges, Stripe documents that the platform receives the full charge and transfers funds to the connected account while keeping application fees as platform revenue. Stripe also states that, for destination charges, Stripe collects processing fees from the platform by default. If Zavvion wants organisers to economically bear those fees, the settlement report must show either:

- the Stripe fee as a deduction from organiser settlement once known, or
- a separately configured organiser fee recovery line.

Do not hide this in a vague adjustment.

## Report Meaning

Admin settlement report columns should be read as:

- `Collected from customer`: gross paid by customers for the organiser/event row, including Zavvion platform service fees.
- `Platform revenue`: platform-fee net amount, with gross shown underneath.
- `Platform VAT`: tax on the Zavvion platform fee where configured.
- `Organiser gets`: organiser ticket, merchandise, and donation gross, before known Stripe processing fee deductions unless explicitly configured otherwise.
- `Stripe / refunds`: external processing costs and approved refund effects, shown separately.
- `Review signals`: exceptions such as payment mismatch, unbalanced ledger, missing connected account, or ticket quantity mismatch.

If `Review signals` appears, the row is not silently reconciled. It needs correction or a documented operational action.

## Tax Ownership Note

Ticket VAT/tax and platform-fee VAT/tax are separate components. The current MVP stores both separately but does not provide legal/tax advice. The launch owner must confirm with an accountant whether the organiser or platform is merchant of record for ticket tax in each operating country.

## Sources Checked

- Stripe Connect destination charges and `application_fee_amount` documentation.
- Stripe Accounts v2 connected-account responsibility settings.
- OpenStax double-entry accounting explanation: every transaction affects at least two accounts and debits must equal credits.
