Skip to main content
Fabricate can add complete Stripe payment integrations to your app. Just describe the billing model you want, and the AI generates the full implementation.
You’ll need a Stripe account and API keys. Add your keys as environment secrets after Fabricate generates the payment code. See Environment Secrets.

Adding Payments

Or for one-time payments:

What Gets Generated

Stripe integration:
  • Stripe SDK configuration
  • Price IDs mapped to your plan names
  • Checkout session creation
  • Webhook handler for payment events
Database updates:
  • Subscription status stored on user records
  • Payment history table (if requested)
API routes:
  • POST /api/billing/checkout — creates Stripe checkout session
  • POST /api/billing/portal — opens Stripe customer portal
  • POST /api/webhooks/stripe — handles Stripe webhook events
Frontend:
  • Pricing page with plan comparison
  • Checkout flow with Stripe redirect
  • Billing portal link for subscription management
  • Subscription status gates for premium features

Subscription Patterns

Monthly/Annual Plans

Per-Seat Pricing

Freemium with Upgrade

Setting Up Your Stripe Keys

After Fabricate generates the payment code:
1

Get your Stripe keys

Log into your Stripe Dashboard. Go to Developers → API Keys.
2

Add keys as environment secrets

In Fabricate’s Build settings, add:
  • STRIPE_SECRET_KEY — your Stripe secret key
  • STRIPE_WEBHOOK_SECRET — your webhook signing secret
3

Set up webhooks in Stripe

In Stripe, add a webhook endpoint pointing to https://your-app.fabricate.build/api/webhooks/stripe. Listen for: checkout.session.completed, customer.subscription.updated, customer.subscription.deleted.

Frequently Asked Questions

Yes — Stripe handles all card data. Your app never sees or stores raw card numbers. Stripe is PCI DSS Level 1 certified.
Stripe supports many payment methods (cards, Apple Pay, Google Pay, etc.). Ask Fabricate to enable specific payment methods you want.
Yes: “Add a 14-day free trial before the subscription starts — no credit card required until the trial ends.”
Yes. Use Stripe’s test mode keys during development. Test with card number 4242 4242 4242 4242.