Build apps with Stripe
Stripe handles web-based billing, subscription management, and credit top-ups in Goodspeed apps that need web payment flows. Goodspeed generates Stripe as a standard part of every app, so the output is a working codebase from day one, not a scaffold you have to finish yourself.
WHAT GETS GENERATED
Built into every Stripe build
Every app Goodspeed generates with Stripe includes these production-ready patterns, wired together from the first build.
| Item | Description | Strength |
|---|---|---|
| lib/stripe.ts conditional Stripe init | Stripe is initialized only when gasConfig.features.inAppPurchases.marketplace.enabled is true and a publishable key is present. Otherwise all exports are no-ops. | Architecture |
| Web-safe payment sheet | The @stripe/stripe-react-native PaymentSheet is wrapped in a platform guard so the module is never imported on web, where it is unavailable. | Components |
| Subscription and customer portal | A Supabase Edge Function handles Stripe subscription lifecycle events (created, updated, canceled) and writes them to the users table. | Webhooks |
| gasConfig.backend.stripe key config | The Stripe publishable key lives in gas.config.ts under backend.stripe.publishableKey and is never committed to source control. | Configuration |
Source: gas-template repository · Web Payments
REAL GENERATED CODE
A snippet from a Stripe app the studio shipped
This pattern comes directly from the gas-template codebase, the foundation every Goodspeed app is generated on. The studio generates Stripe code like this for every app in the pipeline, not just a hello-world scaffold.
Conditional Stripe init
// lib/stripe.ts: marketplace-gated Stripe init const MARKETPLACE_ENABLED = gasConfig.features.inAppPurchases.marketplace?.enabled ?? false; const STRIPE_KEY = gasConfig.backend.stripe?.publishableKey ?? ''; export async function initStripe(): Promise<void> { if (isWeb || !MARKETPLACE_ENABLED || !STRIPE_KEY) return; const { initStripe: init } = require('@stripe/stripe-react-native'); await init({ publishableKey: STRIPE_KEY }); }
GDaily Allergens
Today's log
Gluten
Tree nuts
Shellfish
Dairy
HomeScanLogProfile