REFERENCE
How Billing Works
Six core processes form a lifecycle from customer action to revenue. Three interface layers feed in, four data stores persist state, and data flows between them trace the full path.
Customer profiles, payment methods, and billing contacts. Creates the Stripe Customer object that all other processes reference.
Plan selection, checkout, and on-session card charges. Creates Stripe Subscriptions with 3-D Secure payment authentication while the customer is present.
Grants and revokes feature access based on subscription state. Provisioned asynchronously, checked at runtime by ~50 product services.
Products report consumption through metering APIs. Usage records are aggregated into billable line items on the billing schedule cadence.
Invoice generation and charge attempts on a recurring schedule. Off-session payments through Stripe where the customer is not present.
Retries failed payments on an escalating schedule. Exhausted retries accumulate into bad debt, triggering account bans and payment method enforcement.
The primary customer interface for plan management, payment methods, and billing history. All subscription changes and on-session payments originate here.
Internal tool for support to view account state, modify subscriptions, issue credits, and resolve billing disputes. Writes to the same APIs as Dashboard.
Distributed services that check entitlements at runtime and report metered usage. Read-heavy consumers of billing state with write access only through metering APIs.
Account records, entitlement state, and product configuration. The authoritative source for what a customer owns and what features are provisioned.
Invoices, charge attempts, dunning state, and billing schedules. The financial ledger — every charge, refund, and credit lives here.
Payment processor and subscription engine. Manages recurring billing schedules, processes card charges, and emits webhook events for state changes.
PayPal payment method vault. Handles PayPal-specific checkout flows and stores vaulted payment tokens for recurring charges.
| From | To | What Flows |
|---|---|---|
| Account | Subscription | Account ID and payment method enable subscription creation. Every subscription belongs to exactly one account. |
| Subscription | Entitlements | Creates, changes, and cancellations emit events that trigger entitlement grants and revocations. |
| Subscription | Billing | New subscriptions create billing schedules. Plan prices and billing periods determine charge amounts and timing. |
| Usage | Billing | Metered usage records feed into invoice line items. Aggregated on the billing schedule cadence alongside fixed charges. |
| Billing | Dunning | Failed charge attempts enter the dunning pipeline. Each failure increments the retry counter and escalation level. |
| Dunning | Account | Exhausted dunning escalates to account-level consequences — bad debt flags, payment method requirements, or account bans. |
The billing platform traces a single path — from customer action to revenue — through six processes, three interfaces, and four data stores. Understanding the data flows between them is the first step to working in the system.