Two ways to accept payments
Checkout modal
TheCheckoutModal renders a secure iframe-based checkout. Card data never touches your servers.
With PricingTable (easiest)
ThePricingTable component opens the checkout modal automatically when a user selects a plan — no extra code needed:
Standalone checkout modal
For custom UIs where you want to trigger checkout yourself:
Prefill customer information
Skip the email step by passing customer data:Handle events
Adaptive pricing
Enable localized pricing based on the customer’s location:The checkout modal runs in a secure iframe. Card details are handled entirely by Stripe — your app never processes or stores payment information. This means you’re PCI-compliant by default.
Checkout API
For fully custom checkout flows, use theuseCheckout hook:
Imperative API
You can also open checkout programmatically from anywhere in your app:Testing payments
Use these test card numbers in development:
Use any future expiry date and any 3-digit CVC.
What happens after payment
- BillingOS creates a Stripe subscription
- The
onSuccesscallback fires with the subscription object - The customer’s entitlements are immediately updated
- Feature gates (
useFeature,<FeatureGate>) reflect the new plan - The
PricingTableshows “Current Plan” on the subscribed plan