Stripe and billing source-of-truth boundaries
Platform billing
The central control plane tracks the BuildWithHQ builder/customer subscription, invoices, payments, refunds, checkout state, and resource add-ons.
Stripe boundary
Stripe owns external customer/subscription/invoice/payment/refund/payment-method state. SQL stores identifiers and a reconciled projection used for entitlements, capacity, audit, and support.
Required mechanics
- Verify webhook signatures before database processing.
- Deduplicate and make processing idempotent/order-tolerant.
- Do not treat a browser redirect as proof of payment.
- Do not expose raw Stripe secrets or full payment data.
Separation
Billing that a builder charges the end customers of a generated SaaS belongs to that SaaS application data plane, not the BuildWithHQ platform billing ledger.