App Billing
Let your generated apps charge end-users via Stripe - one-time payments, subscriptions, customer portal, and metered usage. Hybrid managed-mode for instant demos, Stripe Connect for real revenue.
Available on Pro and Business plans.
How it works
GenMB Billing is a single SDK at window.genmb.billing that gets auto-injected into any generated app where the AI detects payment intent (paywalls, buy buttons, donations, subscriptions, etc.). No API keys, no Stripe.js loading, no server code to write.
Workspaces operate in one of three modes:
- Managed- charges run on GenMB's platform Stripe account, capped at $500 lifetime per workspace. Useful for instant demos before you do Stripe KYC.
- Connected - you complete Stripe Express onboarding, charges land in your account, GenMB takes a 5% application fee.
- Disabled - SDK calls return
BILLING_DISABLED. Useful for workspaces that should never charge customers.
Enabling Billing
Open workspace settings
/workspaces/{id}/settings/billing.Generate a paid feature
Test in managed mode
Connect Stripe to keep going
Managed mode (instant demos)
Managed mode is on by default for every paid workspace. It’s designed for one purpose: letting you ship a paid feature without an onboarding wall.
- $500 lifetime cap per workspace (configurable on request).
- One-time payments only - subscriptions require Connect.
- Your business name doesn’t appear on customer statements yet.
- Refunds are manual - contact support.
Stripe Connect (real revenue)
Once connected, every charge becomes a Direct Charge on your Stripe account. GenMB attaches a 5% application_fee_amount on each transaction; the rest is yours. Stripe handles payouts to your bank on whatever schedule you configure (default: every 2 business days for new accounts).
- One-time payments via Stripe Checkout
- Recurring subscriptions (monthly / yearly)
- Customer Portal for end-users to manage payment methods + cancellations
- Metered subscriptions (bill at period end based on usage)
- Refunds, disputes, payouts - all in your Stripe dashboard
SDK methods
All methods live at window.genmb.billing:
ready()- wait for SDK init. Call once on app start.checkout({ amount, currency, productName, successUrl?, cancelUrl?, endUserEmail? })- open Stripe Checkout for a one-time payment. Amount in major units (9.99 = $9.99).subscribe({ amount, currency, interval: 'month' | 'year', productName })- create a subscription (requires signed-in user viawindow.genmb.auth).openPortal({ returnUrl })- open Stripe Customer Portal for the current end-user.reportUsage({ subscriptionItemId, quantity })- record metered usage.getCustomer()- returns{ exists, isAuthed, email }or null.onCustomerChange(callback)- subscribe to state changes; returns an unsubscribe fn.
Error codes (caught in error.code):
CONNECT_REQUIRED- owner needs to onboard Stripe (also setserror.onboardUrl).OVER_CAP- managed-mode cap exceeded.BILLING_DISABLED- owner disabled billing.AUTH_REQUIRED- subscription/portal called without signed-in user.AMOUNT_INVALID- amount under $0.50 or non-numeric.
Patterns
Buy button (one-time):
try {
await window.genmb.billing.checkout({
amount: 5,
currency: 'usd',
productName: 'PDF download',
})
// user is redirected to Stripe; control returns post-payment via successUrl
} catch (err) {
if (err.code === 'CONNECT_REQUIRED') {
alert('Payments not yet activated for this app.')
}
}Paywall (subscription):
await Promise.all([
window.genmb.auth.ready(),
window.genmb.billing.ready(),
])
const customer = window.genmb.billing.getCustomer()
if (!customer?.isAuthed) {
return <button onClick={() => window.genmb.auth.signIn()}>Sign in to subscribe</button>
}
return (
<button onClick={() => window.genmb.billing.subscribe({
amount: 9, currency: 'usd', interval: 'month', productName: 'Pro',
})}>
Upgrade $9/mo
</button>
)Webhooks & ledger
GenMB receives Stripe webhooks at genmb.com/api/webhooks/stripe-connect (proxied to our IAM-protected backend). Every successful charge writes a row to the per-app billing ledger; you can’t see this directly today (admin-only), but it backs the cap meter and the Owed To You display on the Billing page.
Stripe at-least-once delivery is handled idempotently - redelivered events short-circuit on the event ID, so you won’t see duplicate ledger rows.
Limits
- Managed-mode lifetime cap: $500 per workspace (one-way - contact support to extend).
- Application fee on Connect-mode charges: 5%.
- Minimum charge: $0.50 (Stripe minimum).
- Currency: any presentment currency Stripe supports; cap math is USD-cents.
- Per-app rate limit: 30 checkout attempts/min/app.
- Credit cost (charged to app owner): 1 credit per checkout/subscribe; portal and usage are free.
FAQs
Do my customers see GenMB on their card statements?▾
How does the $500 lifetime cap work?▾
What fee does GenMB take?▾
Can I charge subscriptions from a generated app?▾
Where do I see transactions and manage payouts?▾
What plans is App Billing available on?▾
Ready to build?
Create your first app for free, no credit card required.