Skip to content

Billing and credits

Billing v1 models an account per organization, with agency accounts able to own managed sub-account billing rows. Stripe Checkout handles subscriptions and credit top-ups when explicitly enabled. The Billing page also links to Stripe’s customer portal.

Paid operations use idempotent credit reservations before external work and settlement afterward. Reservation TTL and review grace prevent abandoned operations from holding funds indefinitely. Refunds or disputes can freeze paid operations while login, settings, billing, and the Stripe portal remain available.

Key runtime switches include BILLING_ENFORCE, BILLING_CHECKOUT_ENABLED, Stripe price/product IDs, reservation timing, and STRIPE_RECONCILE_SUBSCRIPTIONS. Run schema migration and reconciliation workers before enabling enforcement.

See docs/BILLING_V1.md for ledger invariants and rollout details.

Implementation anchors: modern/admin/billing.php, modern/shared/billing.php, stripe_billing.php, modern/agent-dialer/migrate_billing_v1.php, billing_cron.php.