A smooth checkout experience directly impacts your conversion rate. BillingOS gives you a PCI-compliant checkout modal that handles card collection, 3D Secure, and subscription creation — all without touching Stripe directly.Documentation Index
Fetch the complete documentation index at: https://docs.billingos.dev/llms.txt
Use this file to discover all available pages before exploring further.
Two ways to accept payments
| Approach | Best for | Effort |
|---|---|---|
| Checkout modal (recommended) | Most apps — drop-in, PCI-compliant, handles everything | 3 lines of code |
| Checkout API | Custom flows where you need full control | More code, more flexibility |
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.
| Card | Result |
|---|---|
4242 4242 4242 4242 | Successful payment |
4000 0000 0000 3220 | 3D Secure authentication |
4000 0000 0000 0002 | Card declined |
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