---
title: Add Stripe to a Fabricate App in 30 Minutes
description: A practical 5-step playbook to wire Stripe checkout into a Fabricate app and start charging customers in 30 minutes. No backend code required.
image: https://fabricate.build/og-image.png
---

 

Launch Playbook

# Add Stripe to a Fabricate App in 30 Minutes

Launch Playbook · Take payments today.

Most paying SaaS apps fail at one step: hooking up payments. This playbook ships you from "deployed app" to "first dollar collected" in 30 minutes flat. No backend code, no DevOps, no broken webhooks.

Author

By Fabricate Team

Last updated

Updated April 29, 2026

Reading time

6 min read

Key takeaways
* A working Stripe checkout in 30 minutes — five steps, all from the Fabricate chat.
* Use Stripe test cards first. Switch to live keys only after a successful test charge.
* Fabricate stores your Stripe keys in the worker secrets. They never reach the client bundle.
* Webhook handling for subscriptions is one extra prompt — covered in the next playbook.

Table of contents

## What you'll ship

A "Buy" button on your Fabricate app that opens a Stripe-hosted checkout page, takes a card, and emails the customer a receipt. You can charge for a one-time purchase, a paid download, or pre-orders for a launch.

Subscriptions and recurring billing use the same flow with one extra prompt — that's the next playbook in this series.

## Before you start

You need a published Fabricate app. Stripe keys are added as environment variables in the app's settings on any plan; only the published app receives them, so run these tests against the published URL rather than the preview.

Note

If you don't have a Fabricate app yet, start with the prompt: "Build a one-page paid digital download site with email capture." That gives you exactly what you need to plug Stripe into.

## Step 1 · Stripe account (5 min)

Go to dashboard.stripe.com and sign up (or sign in). Skip the business-info wizard for now — you can complete it after your first test charge.

In the Stripe dashboard, toggle the Test mode switch in the top right. You'll work in test mode first; flipping to live is one config swap at the end.

Open Developers → API keys. Copy the Publishable key (starts with pk\_test\_) and the Secret key (starts with sk\_test\_). Keep this tab open.

### Ready to build?

Describe your app in a few sentences and Fabricate builds it. Start free, no credit card needed.

[Start building free](https://fabricate.build/sign-up)

## Step 2 · Tell Fabricate to wire Stripe (5 min)

In your Fabricate chat, paste the prompt below. Replace the product name and price with your own.

Prompt to send to Fabricate

Add a Stripe checkout button to the homepage that charges $19 USD for "Indie Founder Toolkit" (one-time purchase). Use STRIPE_SECRET_KEY and STRIPE_PUBLISHABLE_KEY from env. After successful payment, redirect to a /thank-you page with the order id.

Fabricate will scaffold a server-side checkout-session endpoint, drop a Buy button onto the homepage, and add the /thank-you route. The whole turn usually costs 3–6 credits.

## Step 3 · Drop in your test keys (5 min)

Open the Settings → Secrets panel for your project. Add two entries:

STRIPE\_SECRET\_KEY = your sk\_test\_… key

STRIPE\_PUBLISHABLE\_KEY = your pk\_test\_… key

Hit Save. Fabricate redeploys your worker with the new secrets — usually 10–15 seconds. The keys live on the server only; they're never bundled into the client.

Important

Never paste a secret key into a chat message or commit it to git. Always use the Secrets panel.

## Step 4 · Test the checkout (5 min)

Open your deployed app and click the Buy button. Stripe Checkout should open. Use one of these test cards:

• 4242 4242 4242 4242 — succeeds

• 4000 0000 0000 0002 — declines (good for testing the failure path)

• 4000 0027 6000 3184 — requires 3D Secure auth

Any future expiry date and any 3-digit CVC works. After the payment, you should land on /thank-you with the order id, and the charge should appear in the Stripe dashboard under Payments.

Tip

If the redirect fails, check the Network tab for the /api/checkout response. 99% of the time it's a missing or mistyped key in Step 3.

### Ready to build?

Describe your app in a few sentences and Fabricate builds it. Start free, no credit card needed.

[Start building free](https://fabricate.build/sign-up)

## Step 5 · Go live (10 min)

Back in the Stripe dashboard, toggle off Test mode and complete the business-info wizard (legal name, country, bank account). Stripe needs this to release real funds to you.

Once approved, copy your live keys (pk\_live\_… and sk\_live\_…) and replace them in the Fabricate Secrets panel — same field names. Save.

Click Buy on your live app and run one real $1 test purchase against your own card. Refund it from the Stripe dashboard if you don't want to keep the charge. Done — you can take payments.

## When things break

Three common failures, in order of frequency:

1\. The Buy button does nothing. → The /api/checkout endpoint is returning 500\. Open browser DevTools → Network. The most common cause is a typo in STRIPE\_SECRET\_KEY or copying the publishable key into the secret slot.

2\. Stripe says "No such price". → Fabricate creates the price object on first request. Click Buy once to trigger it; subsequent clicks will work.

3\. The /thank-you page says "Order not found". → The success\_url query string is missing the session id. Ask Fabricate: "Pass session\_id from Stripe Checkout to /thank-you and show the order id from the session." One credit, done.

Tip

If Fabricate ever "breaks" something while wiring Stripe, hit Restore in the project sidebar to go back to the last working version.

## What's next

You now have a paid app. Three obvious next moves:

• Add subscriptions — one prompt, covered in "Add Stripe Subscriptions to any Fabricate app" (next in this playbook series).

• Add an upsell on the /thank-you page — "Buy another for 50% off" usually lifts cart value 10–20%.

• Wire a webhook so you can fulfil digital downloads automatically. Prompt: "Add a Stripe webhook at /api/stripe/webhook that emails the buyer a download link via Resend on checkout.session.completed."

### Ready to build?

Describe your app in a few sentences and Fabricate builds it. Start free, no credit card needed.

[Start building free](https://fabricate.build/sign-up)

## Frequently Asked Questions

Do I need to write any code?

No. Every step is either a click in Stripe or a prompt in Fabricate. Fabricate writes the server-side checkout-session endpoint, the Buy button, and the success page for you.

Can I do this on the Free plan?

You can wire it up and test with Stripe test cards, but live keys and a custom domain need a paid plan. Most people upgrade right after their first test charge works. Current plans are on the pricing page at fabricate.build/pricing.

Where do my Stripe keys live? Are they safe?

In the Fabricate worker secrets — server-side only. They never appear in the client bundle, in your git history, or in chat. You can rotate them in the Stripe dashboard at any time.

What about EU VAT, sales tax, or invoicing?

Stripe Tax handles VAT and US sales tax automatically — enable it in the Stripe dashboard, then prompt Fabricate: "Enable Stripe Tax on the checkout session." Invoicing is one extra prompt: "Send a Stripe invoice on every successful checkout."

Will Fabricate let me export the Stripe code?

Yes, on any paid plan. Push the project to GitHub or download as a ZIP — the Stripe integration is plain TypeScript and you own all of it.

## Related guides

[Stripe Integration FeatureHow Fabricate handles Stripe under the hood.Read guide](https://fabricate.build/features/stripe-integration)[Payments Feature OverviewAll the payment flows Fabricate ships with.Read guide](https://fabricate.build/features/payments)[Build a SaaS with AIEnd-to-end guide to launching a paid SaaS on Fabricate.Read guide](https://fabricate.build/build/saas)[Best AI App Builders in 2026How Fabricate compares for full-stack apps with payments.Read guide](https://fabricate.build/blog/best-ai-app-builder-2026)

```json
{
			"@context": "https://schema.org",
			"@type": "Organization",
			"@id": "https://fabricate.build/#organization",
			"name": "Fabricate AI",
			"alternateName": ["Fabricate", "Fabricate.build"],
			"legalName": "Fabricate, LLC",
			"url": "https://fabricate.build",
			"logo": "https://fabricate.build/web-app-manifest-512x512.png",
			"description": "Maker of Fabricate AI, an AI app builder that turns a plain-English description into a working web app with sign-in and saved data, published at its own link.",
			"email": "info@fabricate.build",
			"foundingDate": "2025",
			"contactPoint": {
				"@type": "ContactPoint",
				"email": "info@fabricate.build",
				"contactType": "customer support",
				"url": "https://fabricate.build/about"
			},
			"sameAs": [
				"https://x.com/FabricateAi",
				"https://github.com/fabricatedev",
				"https://www.producthunt.com/posts/fabricate",
				"https://theresanaiforthat.com/ai/fabricate/"
			]
		}
{
				"@context": "https://schema.org",
				"@type": "WebSite",
				"@id": "https://fabricate.build/#website",
				"name": "Fabricate AI",
				"alternateName": ["Fabricate", "Fabricate.build"],
				"url": "https://fabricate.build",
				"publisher": { "@id": "https://fabricate.build/#organization" }
			}
{"@context":"https://schema.org","@type":"FAQPage","mainEntity":[{"@type":"Question","name":"Do I need to write any code?","acceptedAnswer":{"@type":"Answer","text":"No. Every step is either a click in Stripe or a prompt in Fabricate. Fabricate writes the server-side checkout-session endpoint, the Buy button, and the success page for you."}},{"@type":"Question","name":"Can I do this on the Free plan?","acceptedAnswer":{"@type":"Answer","text":"You can wire it up and test with Stripe test cards, but live keys and a custom domain need a paid plan. Most people upgrade right after their first test charge works. Current plans are on the pricing page at fabricate.build/pricing."}},{"@type":"Question","name":"Where do my Stripe keys live? Are they safe?","acceptedAnswer":{"@type":"Answer","text":"In the Fabricate worker secrets — server-side only. They never appear in the client bundle, in your git history, or in chat. You can rotate them in the Stripe dashboard at any time."}},{"@type":"Question","name":"What about EU VAT, sales tax, or invoicing?","acceptedAnswer":{"@type":"Answer","text":"Stripe Tax handles VAT and US sales tax automatically — enable it in the Stripe dashboard, then prompt Fabricate: \"Enable Stripe Tax on the checkout session.\" Invoicing is one extra prompt: \"Send a Stripe invoice on every successful checkout.\""}},{"@type":"Question","name":"Will Fabricate let me export the Stripe code?","acceptedAnswer":{"@type":"Answer","text":"Yes, on any paid plan. Push the project to GitHub or download as a ZIP — the Stripe integration is plain TypeScript and you own all of it."}}]}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://fabricate.build"},{"@type":"ListItem","position":2,"name":"Blog","item":"https://fabricate.build/blog"},{"@type":"ListItem","position":3,"name":"Add Stripe to a Fabricate App in 30 Minutes","item":"https://fabricate.build/blog/add-stripe-in-30-minutes"}]}
{"@context":"https://schema.org","@type":"BlogPosting","headline":"Add Stripe to a Fabricate App in 30 Minutes","description":"A practical 5-step playbook to wire Stripe checkout into a Fabricate app and start charging customers in 30 minutes. No backend code required.","articleSection":"Launch Playbook","author":{"@type":"Organization","name":"Fabricate Team","url":"https://fabricate.build"},"publisher":{"@type":"Organization","@id":"https://fabricate.build/#organization","name":"Fabricate AI","url":"https://fabricate.build","logo":{"@type":"ImageObject","url":"https://fabricate.build/web-app-manifest-512x512.png","width":512,"height":512}},"mainEntityOfPage":{"@type":"WebPage","@id":"https://fabricate.build/blog/add-stripe-in-30-minutes"},"image":"https://fabricate.build/og-image.png","datePublished":"2026-04-29","dateModified":"2026-04-29","wordCount":643}
{"@context":"https://schema.org","@type":"SoftwareApplication","@id":"https://fabricate.build/#software","name":"Fabricate AI","alternateName":["Fabricate","Fabricate.build"],"url":"https://fabricate.build","description":"AI app builder that turns a plain-English description into a complete, deployed full-stack web application: a React 19 and TypeScript app, published as its own Cloudflare Worker and backed by a Durable Object that stores the app's data in its built-in SQLite database, with user accounts and login built in when the app needs them.","applicationCategory":"DeveloperApplication","operatingSystem":"Web","featureList":["Generates a complete full-stack application from a plain-English description","React 19 and TypeScript frontend, styled with hand-written CSS","Each app published as its own Cloudflare Worker, backed by a Durable Object that stores the app's data in its built-in SQLite database","User accounts and login built in when an app needs them: PBKDF2 password hashing and HttpOnly cookie sessions","Stripe code written by the AI on request, using your own Stripe keys, which only the published app receives","Browser-verified publishing: an app that crashes, never mounts or renders blank is blocked from going live","Live preview and a web-based IDE","One-click deployment as an individual Cloudflare Worker into a Workers for Platforms dispatch namespace","ZIP export and GitHub export on paid plans","Custom domains on paid plans"],"screenshot":"https://fabricate.build/og-image.png","provider":{"@id":"https://fabricate.build/#organization"},"publisher":{"@id":"https://fabricate.build/#organization"},"offers":[{"@type":"Offer","name":"Free","description":"60 credits per month","price":0,"priceCurrency":"USD","url":"https://fabricate.build/pricing","availability":"https://schema.org/InStock","priceSpecification":{"@type":"UnitPriceSpecification","price":0,"priceCurrency":"USD","referenceQuantity":{"@type":"QuantitativeValue","value":1,"unitCode":"MON"}}},{"@type":"Offer","name":"Pro","description":"350 credits per month","price":25,"priceCurrency":"USD","url":"https://fabricate.build/pricing","availability":"https://schema.org/InStock","priceSpecification":{"@type":"UnitPriceSpecification","price":25,"priceCurrency":"USD","referenceQuantity":{"@type":"QuantitativeValue","value":1,"unitCode":"MON"}}},{"@type":"Offer","name":"Max","description":"1750 credits per month","price":100,"priceCurrency":"USD","url":"https://fabricate.build/pricing","availability":"https://schema.org/InStock","priceSpecification":{"@type":"UnitPriceSpecification","price":100,"priceCurrency":"USD","referenceQuantity":{"@type":"QuantitativeValue","value":1,"unitCode":"MON"}}}]}
```
