Skip to content

Business billing flow

Billing uses Stripe as the engine and Vendure as the canonical ledger. Invoices raised in Stripe are mirrored scheduler-side and reconciled. See the Billing concept for the model.

sequenceDiagram
    participant Cron as billing-scanner
    participant API as scheduler-api
    participant ST as Stripe
    participant DB as Scheduler DB (mirror)
    participant Portal as portal-business

    Cron->>API: evaluate due businesses (billing-gate)
    API->>ST: create / advance invoice + subscription
    ST-->>API: webhook (invoice.*, subscription.*)
    API->>DB: update billing_invoice_mirror + status
    API->>DB: write business_billing_audit
    Portal->>API: view billing status
    API-->>Portal: invoices + status (from mirror)

Live, money-moving actions are gated by a runtime admin toggle (platform_config.domains_purchase_enabled), not an env var — so a misconfiguration can’t silently charge. Operator steps: Stripe account cache runbook.