Skip to main content

Documentation Index

Fetch the complete documentation index at: https://fabricate.build/docs/llms.txt

Use this file to discover all available pages before exploring further.

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

"Add Stripe subscription billing with monthly and annual plans:
- Basic: $9/month
- Pro: $29/month  
- Add a billing page where users can manage their subscription"
Or for one-time payments:
"Add a one-time payment flow — users pay $49 to unlock premium features permanently"

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

"Add Pro ($19/mo or $190/yr) and Team ($49/mo or $490/yr) subscription tiers with annual discount"

Per-Seat Pricing

"Add usage-based billing — $10 per user per month, manage seats from the account settings"

Freemium with Upgrade

"Add a premium upgrade button. Free users get 3 projects, paid users ($12/month) get unlimited"

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.