Skip to main content
Docs/Docs
DocsApp Billing
Pro

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

1

Open workspace settings

From your workspace page, click Billing. You’ll land at/workspaces/{id}/settings/billing.
2

Generate a paid feature

Ask GenMB to build something with payments - e.g. “Add a $5 paid PDF download” or “Make the Pro tier $9/mo.” The SDK auto-injects when the capability detector picks up payment-related hints.
3

Test in managed mode

Click your buy button. The first $500 of revenue runs through the platform account so you can validate UX without Stripe onboarding.
4

Connect Stripe to keep going

When you’re ready for real revenue (or hit the cap), click Connect Stripe and complete Express onboarding (~3 minutes).
The cap meter on the Billing page shows how much managed-mode capacity you’ve used. We recommend connecting Stripe before launching publicly so customers see your business name, not GenMB, on their statements.

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.

Managed-mode revenue technically lives in GenMB’s Stripe account until you onboard. We track exactly how much each workspace is owed, but settlement is manual - connecting Stripe is the supported path to access your earnings.
  • $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 via window.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 sets error.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?
Until you connect your own Stripe account (managed mode), charges appear from GenMB’s platform with our statement descriptor. Once you connect Stripe, charges show your business name, descriptor, and dispute contact - GenMB is invisible to your customers.
How does the $500 lifetime cap work?
When you haven’t connected Stripe yet, charges flow through GenMB’s platform account up to a lifetime total of $500 per workspace. This lets you demo paid features instantly without a Stripe onboarding step. Above $500 the SDK returns a CONNECT_REQUIRED error and prompts you to onboard.
What fee does GenMB take?
5% of each transaction (Stripe Connect application fee) once you connect your own account. Below the cap (managed mode), the entire payment lands in GenMB’s platform account and is owed back to you on a manual settlement - we recommend connecting Stripe before you start charging.
Can I charge subscriptions from a generated app?
Yes, but subscriptions require Stripe Connect onboarding (no managed-mode subscriptions - they create indefinite platform liability we can’t bound by a cap). End-users must also be signed in via window.genmb.auth so we can attach a stable customer.
Where do I see transactions and manage payouts?
Once connected, all transactions appear in your own Stripe dashboard. GenMB doesn’t hold or settle funds in connected mode - Stripe pays out to your bank on the schedule you configure.
What plans is App Billing available on?
Pro and above. Free workspaces can’t enable App Billing.

Ready to build?

Create your first app for free, no credit card required.