Skip to content

Services

Stripe

Take a payment or start a subscription with a hosted checkout page you can share as a link.

Visit Stripe

If you’re selling seats at a pottery workshop, a whole shopping cart may be more than you need. In Stripe you can create a product for the class, set its price, and get a link to a checkout page.

Try the link in test mode first. Complete a sample purchase and look for it in your Stripe dashboard. Compare the product, currency, and amount with the workshop listing before sharing a live payment link.

When to use it
When you want people to pay you, once or every month, including for physical goods or services.
When to skip it
If you want sales tax handled for you, or you sell inside a phone app. With Stripe, sales tax is your job, though Stripe Tax can work it out for a fee. Phone app sales come with Apple and Google store rules, so read them first.
What it costs
No setup or monthly fees. In the US, 2.9% + 30¢ per card payment, plus 1.5% for cards from other countries. Checked 9 Nov 2026.

Take payments with Stripe

Add a Stripe checkout so people can pay you for one product. You practice in a sandbox with fake cards first, then switch to real payments when it works.

You’ll need

  • A website or web app you’re building with your AI tool, running on your computer.
  • PLAN.md, with what you want to sell and for how much.
  • To take real payments: your site online, plus your business and bank details.
  • Stripe account.

Your part

  • Create the Stripe account, the sandbox and the product.
  • Copy keys into your .env file.
  • Pay with Stripe’s test card, then verify your business before you take real payments.

Copy the prompt for these steps

All 6 steps, in one prompt
I’m following “Take payments with Stripe” on BuildLadder.
What the guide says I’ll end up with: A Buy button on your site that opens Stripe’s checkout, takes a test payment, and tells your site when someone has paid.
This comes from https://buildladder.com/tools/stripe#payments. If you can open web pages, read https://buildladder.com/tools/stripe.md for the current version. BuildLadder guide, tool, concept, answer and setup pages all work this way: add .md to the address.

How to work with me:
- Go through the steps below in order, one at a time.
- Do what you can yourself in this folder: write code, run commands, check settings. If a service has an official command-line tool, like the Vercel CLI, you can offer to use it. Ask me before you install anything, sign in to anything or spend money.
- When a step needs me, like making an account or clicking in a dashboard, tell me exactly what to do in small steps. Then wait until I say it’s done.
- The actions, checks and fixes in each step were written for me, the reader. Where one says “your AI tool”, that means you, and “Say:” means something I would say to you.
- Never ask me to paste passwords or secret keys into this chat. I type those into the service’s own settings.
- After each step, tell me how to check it worked. Once Git is set up, save a version each time a step works. Then ask if I’m ready for the next one.
- Use plain words. I may never have coded before.

## Step 1 of 6: Create your account and a sandbox

This step is mine to do. Walk me through it, one action at a time:
- Go to stripe.com and create an account.
- In the Dashboard, open the account picker, then Switch to sandbox, then Create sandbox. Enter a Name and click Create sandbox. A banner at the top shows you are inside it.
- Inside the sandbox, go to More, then Product catalog, and click Add product.
- Enter the Name of what you sell. For the price, pick One time or Recurring, then enter the amount.
- Click Add product to save it. Your AI tool will ask for its price ID later, and that ID is safe to share.

It worked when: Your Stripe sandbox holds one product with its price.

If something goes wrong:
- You can’t find Create sandbox. If you already have a sandbox, open the account picker, then Switch to sandbox, then Manage sandboxes, and click Open beside its name. If Switch to sandbox is missing, check your account access against docs.stripe.com/sandboxes/dashboard/manage.
- You’re not sure whether to pick One time or Recurring. Pick One time for a single payment. Pick Recurring for a monthly or yearly plan. Check PLAN.md for what you chose.

## Step 2 of 6: Save your secret key in .env

This step is mine to do. Walk me through it, one action at a time:
- Ask your AI tool: “Which file in this folder should hold secret keys, and is it ignored by Git? Don’t ask me for the key.”
- If that file isn’t ignored by Git yet, ask your AI tool to add it to .gitignore before you go on.
- In your Stripe sandbox, open the API keys page. Check the banner says you are still in the sandbox before you copy anything.
- Copy the Secret key, not the publishable key. The secret key starts with sk_test_, which means it only works in your sandbox.
- Open the file your AI tool named, such as .env. Add a line with STRIPE_SECRET_KEY= followed by your key, then save it.

It worked when: A file that Git ignores holds a line starting STRIPE_SECRET_KEY=sk_test_.

If something goes wrong:
- You pasted the key into your AI tool’s chat by mistake. On the API keys page, open the menu next to the key and rotate it. Then save the new key in your file.
- Your folder has no .env file. That’s normal. Ask your AI tool to create an empty one and add it to .gitignore. Then paste the key in yourself.

## Step 3 of 6: Add a checkout for one product

Read PLAN.md in this folder. It says what I want to sell.

I want to add Stripe payments for one product, in Stripe’s sandbox only. No real money.

Before you write code, check Stripe’s current official docs for Checkout. Then look at my code and tell me:
- whether it has a server part that can keep a secret key safe
- if it doesn’t, the simplest option, such as a Stripe Payment Link, and what adding a server would change

Wait for my answer. Then build the smallest version that works:
- a Buy button on the page where people decide to buy
- a Checkout Session that sends them to Stripe’s hosted checkout page
- a thank-you page they come back to, and a page for when they cancel

Rules:
- Read the secret key from the STRIPE_SECRET_KEY environment variable. Never put a key in code.
- Read the price ID from a STRIPE_PRICE_ID environment variable, because it changes when I take real payments. Tell me where to find it. It’s safe to share.
- Keep everything that already works. Ask before you change something big.

When you’re done, explain in plain words what you changed, and how I can see the Buy button.

It worked when: The Buy button on your site opens Stripe’s checkout page with your product and price.

Before we move on, check with me:
- Does the back link on Stripe’s page return you to your site?

If something goes wrong:
- Your AI tool says your site has no server part. Ask it to compare two choices in plain words: a Stripe Payment Link, or adding a small server. Pick one before it builds.
- You see an error about an API key. Check the key line in your file has no extra spaces. Then ask your AI tool to restart your site and try again.

## Step 4 of 6: Buy it with a test card

This step is mine to do. Walk me through it, one action at a time:
- Open your site and click your Buy button.
- On Stripe’s page, enter the card number 4242 4242 4242 4242.
- Use any future date, such as 12/34, and any three-digit CVC. Fill the other fields with anything.
- Click Pay and wait to come back to your thank-you page.
- Look for your test payment in your sandbox Dashboard.

It worked when: You land on your thank-you page, and your sandbox Dashboard shows a successful test payment.

If something goes wrong:
- Stripe says the card was declined. Check you typed 4242 4242 4242 4242 and a date in the future. Real cards don’t work in a sandbox.
- You don’t come back to your site after paying. Tell your AI tool: “After a test payment, I don’t land on my thank-you page. Please find out why.”

## Step 5 of 6: React when a payment succeeds

The test checkout works. Now I want my site to react when a payment succeeds, using a Stripe webhook.

Check Stripe’s current docs on fulfilling Checkout orders and on webhooks first. Then:
- Add a webhook route that listens for checkout.session.completed.
- Verify every event with Stripe’s official library, using the raw request body and the signing secret from the STRIPE_WEBHOOK_SECRET environment variable.
- When a payment succeeds, do this one thing: (say what should happen, like “email the download link” or “mark the order as paid”).
- Give access from the webhook, not from the thank-you page, because people can close the page before it loads.
- Make it safe if the same event arrives twice.

If my site has no server part, stop and explain my options before you build anything.

To test on my computer, tell me the Stripe CLI command that forwards events to this route. I’ll run it myself in a separate terminal and copy the signing secret it prints into my .env file. Don’t run it for me.

Keep everything that already works. When you’re done, explain what changed and how to check it worked.

It worked when: After a test payment, your site does the one thing you asked, and the terminal running the Stripe CLI shows checkout.session.completed.

If something goes wrong:
- The webhook fails with a signature error. Copy the secret the Stripe CLI printed into your .env file again, then restart your site.
- Nothing happens after a payment. Check the Stripe CLI is still running in its own terminal. Then tell your AI tool what that terminal shows.

## Step 6 of 6: Switch to real payments

This step is mine to do. Walk me through it, one action at a time:
- Complete Stripe’s live-account setup in the Dashboard. Provide the business and product details it asks for. Add a payout account so Stripe can send you the money.
- Open your product in the sandbox and click Copy to live mode. Sandbox products don’t work in live mode.
- Open the API keys page for your live account. Use a key with only the access your server needs. Your AI tool can list the permissions without seeing the key.
- In your host’s settings, set STRIPE_SECRET_KEY to the live key and STRIPE_PRICE_ID to the live price ID.
- In the Dashboard, open Workbench, then Webhooks, and click Create an event destination. Stripe asks you to pick Thin or Snapshot, two formats for the event. Ask your AI tool which one your code expects.
- Pick checkout.session.completed, choose Webhook endpoint, and enter your live site’s webhook address.
- Click Reveal secret, then save it in your host’s settings as STRIPE_WEBHOOK_SECRET.
- Don’t test with your own real card in live mode. Stripe’s rules don’t allow it.

It worked when: Your public site has a live checkout, and the live keys are only in your host’s settings.

Before we move on, check with me:
- After your first real sale, does your live webhook show a successful delivery?

If something goes wrong:
- Stripe asks for more information about your business. That’s part of Stripe’s checks. Answer in the Dashboard. Your AI tool can explain what a question means.
- Live payments fail but test ones worked. Check every setting uses live values: the secret key, the price ID and the webhook secret. Then put your site online again.

The steps

  • Steps marked AI tool are done by your AI tool when you paste the prompt. The rest are yours.
  • Save a version after every step that works.
  • If a screen looks different from a step, ask your AI tool where the setting moved.
  • Never paste a password or secret key into the chat.
  1. A test account, ready to use

    Create your account and a sandbox

    You

    A sandbox is Stripe’s practice space. Payments there use fake cards, so you can build and test without moving real money.

    1. Go to stripe.com and create an account.
    2. In the Dashboard, open the account picker, then Switch to sandbox, then Create sandbox. Enter a Name and click Create sandbox. A banner at the top shows you are inside it.
    3. Inside the sandbox, go to More, then Product catalog, and click Add product.
    4. Enter the Name of what you sell. For the price, pick One time or Recurring, then enter the amount.
    5. Click Add product to save it. Your AI tool will ask for its price ID later, and that ID is safe to share.

    It worked when: Your Stripe sandbox holds one product with its price.

    You can’t find Create sandbox.

    If you already have a sandbox, open the account picker, then Switch to sandbox, then Manage sandboxes, and click Open beside its name. If Switch to sandbox is missing, check your account access against docs.stripe.com/sandboxes/dashboard/manage.

    You’re not sure whether to pick One time or Recurring.

    Pick One time for a single payment. Pick Recurring for a monthly or yearly plan. Check PLAN.md for what you chose.

  2. Save your secret key in .env

    You

    Your code needs a secret key to talk to Stripe. You paste it into your .env file yourself, so it stays out of your AI tool’s chat and off GitHub.

    1. Ask your AI tool: “Which file in this folder should hold secret keys, and is it ignored by Git? Don’t ask me for the key.”
    2. If that file isn’t ignored by Git yet, ask your AI tool to add it to .gitignore before you go on.
    3. In your Stripe sandbox, open the API keys page. Check the banner says you are still in the sandbox before you copy anything.
    4. Copy the Secret key, not the publishable key. The secret key starts with sk_test_, which means it only works in your sandbox.
    5. Open the file your AI tool named, such as .env. Add a line with STRIPE_SECRET_KEY= followed by your key, then save it.

    It worked when: A file that Git ignores holds a line starting STRIPE_SECRET_KEY=sk_test_.

    You pasted the key into your AI tool’s chat by mistake.

    On the API keys page, open the menu next to the key and rotate it. Then save the new key in your file.

    Your folder has no .env file.

    That’s normal. Ask your AI tool to create an empty one and add it to .gitignore. Then paste the key in yourself.

  3. A working checkout

    Add a checkout for one product

    AI tool

    Your AI tool adds a Buy button that sends people to Stripe’s own checkout page. Stripe handles the card details, so your code never sees them.

    It worked when: The Buy button on your site opens Stripe’s checkout page with your product and price.

    Check this step
    • Does the back link on Stripe’s page return you to your site?
    Your AI tool says your site has no server part.

    Ask it to compare two choices in plain words: a Stripe Payment Link, or adding a small server. Pick one before it builds.

    You see an error about an API key.

    Check the key line in your file has no extra spaces. Then ask your AI tool to restart your site and try again.

  4. Buy it with a test card

    You

    Pay for your own product with Stripe’s test card. Nothing is charged, and you see exactly what a customer sees.

    1. Open your site and click your Buy button.
    2. On Stripe’s page, enter the card number 4242 4242 4242 4242.
    3. Use any future date, such as 12/34, and any three-digit CVC. Fill the other fields with anything.
    4. Click Pay and wait to come back to your thank-you page.
    5. Look for your test payment in your sandbox Dashboard.

    It worked when: You land on your thank-you page, and your sandbox Dashboard shows a successful test payment.

    Stripe says the card was declined.

    Check you typed 4242 4242 4242 4242 and a date in the future. Real cards don’t work in a sandbox.

    You don’t come back to your site after paying.

    Tell your AI tool: “After a test payment, I don’t land on my thank-you page. Please find out why.”

  5. React when a payment succeeds

    AI tool

    A webhook is a message Stripe sends your site when someone pays. Your site uses it to give buyers what they paid for, even if they close the page early.

    It worked when: After a test payment, your site does the one thing you asked, and the terminal running the Stripe CLI shows checkout.session.completed.

    The webhook fails with a signature error.

    Copy the secret the Stripe CLI printed into your .env file again, then restart your site.

    Nothing happens after a payment.

    Check the Stripe CLI is still running in its own terminal. Then tell your AI tool what that terminal shows.

  6. Switch to real payments

    You

    Real payments use real cards and real money. You make each change yourself, and your AI tool can explain any of them.

    1. Complete Stripe’s live-account setup in the Dashboard. Provide the business and product details it asks for. Add a payout account so Stripe can send you the money.
    2. Open your product in the sandbox and click Copy to live mode. Sandbox products don’t work in live mode.
    3. Open the API keys page for your live account. Use a key with only the access your server needs. Your AI tool can list the permissions without seeing the key.
    4. In your host’s settings, set STRIPE_SECRET_KEY to the live key and STRIPE_PRICE_ID to the live price ID.
    5. In the Dashboard, open Workbench, then Webhooks, and click Create an event destination. Stripe asks you to pick Thin or Snapshot, two formats for the event. Ask your AI tool which one your code expects.
    6. Pick checkout.session.completed, choose Webhook endpoint, and enter your live site’s webhook address.
    7. Click Reveal secret, then save it in your host’s settings as STRIPE_WEBHOOK_SECRET.
    8. Don’t test with your own real card in live mode. Stripe’s rules don’t allow it.

    It worked when: Your public site has a live checkout, and the live keys are only in your host’s settings.

    Check this step
    • After your first real sale, does your live webhook show a successful delivery?
    Stripe asks for more information about your business.

    That’s part of Stripe’s checks. Answer in the Dashboard. Your AI tool can explain what a question means.

    Live payments fail but test ones worked.

    Check every setting uses live values: the secret key, the price ID and the webhook secret. Then put your site online again.

Compare Stripe with the other options

Stuck? Try these, in order
  1. Stop asking it to “fix it”. Say exactly what’s wrong.

    Paste this into the same chat. It asks your AI tool to find the problem with you.

    Troubleshooting prompt
    I’m following “Stripe” on BuildLadder and something isn’t working.
    This comes from https://buildladder.com/tools/stripe. If you can open web pages, read https://buildladder.com/tools/stripe.md for the current version. BuildLadder guide, tool, concept, answer and setup pages all work this way: add .md to the address.
    
    Ask me which step I’m on, what I tried and what happened, one question at a time. Look at the files in this folder if you can. Then explain the problem in plain words and suggest the smallest fix. Don’t change anything that already works.

  2. Check the service isn’t down.

    If you use one of these, open its status page before changing any code: Supabase, Vercel, Netlify, Cloudflare, Stripe, Clerk, Firebase, Resend, GitHub, Expo, Claude, OpenAI.

  3. Go back to your last saved version.
    Troubleshooting prompt
    Take my product back to the last saved version that worked. First show me which version that is and what will change. Don’t delete anything else.

  4. Make the change smaller.
    Troubleshooting prompt
    Let’s make a smaller change. Undo what you just tried. Then do only the first part of it, and tell me how to check that part works before we go on.

  5. Ask a person.

    Copy this, fill in each line, and post it in a community like r/vibecoding. Take out any keys or passwords first.

    Problem report
    What I'm building: (one sentence)
    What I asked my AI tool to do: (the last request)
    What I expected: (what should happen)
    What happened instead: (what you see)
    The exact error, if any: (copy it here)
    What I've tried: (each attempt, in order)
    My tools: (AI tool, website or app, hosting)

Look things up

Questions people ask

Words used on this page

Test mode
Test mode is a practice space in a payment service. Stripe calls it a sandbox. You pay with fake card numbers, so you can check everything works without moving real money.
Checkout
A checkout is the page where a customer enters payment details and pays. Payment services host one for you, so card details never touch your own code.
API key
An API key is a long code that tells a service your app is allowed to use it. Many keys are secret, so treat them like passwords and keep them out of shared code.
Environment variable
An environment variable is a named setting stored outside your code, such as an API key or a database address. Your app reads it when it runs, so secrets stay out of your shared files.
Git
Git is a free tool on your computer that keeps a history of your product's files. It lets you save versions, compare them, and go back if something breaks.
Backend
The backend is the behind-the-scenes part of an app that visitors never see. It runs on a server, where it saves data and checks who is signed in.
Webhook
A webhook is a message one service sends to your app when something happens, like a payment going through. Your app listens at a web address and reacts.
Production
Production is the live version of your website or app that real people use. Changes there affect everyone, so you test them in a preview first.

Official pages

Updated · Stripe