Skip to content

Services

Dodo Payments

Charge for a digital product or a recurring plan while Dodo Payments handles checkout and applicable sales tax as the seller.

Imagine selling monthly access to a writing app. Dodo Payments collects the customer’s payment as the merchant of record, meaning it is the seller named on the transaction. Your app uses the payment result to decide when the customer gets access.

Set up one plan in the test environment and buy it with a test account. Check that the amount matches the advertised price and that the right account can open the paid feature once the purchase completes.

When to use it
When you sell something digital to people in many countries.
When to skip it
When you sell physical goods, in-person services or custom work like consulting. Dodo doesn’t support them.
What it costs
No monthly fee. 4% + 40¢ per sale for US cards, plus 1.5% for cards from other countries and 0.5% for subscriptions. Checked 9 Nov 2026.

Take payments with Dodo Payments

Add a Dodo Payments checkout for one digital product. You test with fake cards first, then take real payments after Dodo’s review.

You’ll need

  • A website or web app you’re building with your AI tool, running on your computer.
  • PLAN.md, with the digital product you want to sell and its price.
  • For real payments: your site online with pricing, terms, privacy and refund pages, plus a government ID.
  • Dodo Payments account.

Your part

  • Create the account, the test product and the API key.
  • Copy keys into your .env file.
  • Pay with Dodo’s test card, then pass Dodo’s review.

Copy the prompt for these steps

All 6 steps, in one prompt
I’m following “Take payments with Dodo Payments” on BuildLadder.
What the guide says I’ll end up with: A Buy button on your site that opens Dodo’s checkout, takes a test payment, and tells your app when someone has paid.
This comes from https://buildladder.com/tools/dodo-payments#payments. If you can open web pages, read https://buildladder.com/tools/dodo-payments.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 test product

This step is mine to do. Walk me through it, one action at a time:
- Go to dodopayments.com and sign up. You can test before Dodo checks your details.
- In the dashboard sidebar, find the Live Mode switch. Turn it off to work in test mode.
- Open Products and create a new product. Choose One Time for a single payment, or Subscription for a plan.
- Fill in the Product Name, the Price and the Tax Category. The tax category tells Dodo which tax rules apply.
- Save the product. Your AI tool will ask for its product ID later, and that ID is safe to share.

It worked when: Your Dodo account is in test mode, and Products lists your product with the right price.

If something goes wrong:
- You’re not sure which tax category to pick. Pick the one closest to what you sell. If none fits, email support@dodopayments.com before you take real payments.
- You don’t know if Dodo allows what you sell. Read Dodo’s Merchant Acceptance Policy before you build.

## Step 2 of 6: Save your API 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 product should hold secret keys, and is it ignored by Git?”
- If that file isn’t ignored by Git yet, ask your AI tool to add it to .gitignore before you go on.
- Keep Dodo in test mode. Open Developer, then API Keys.
- Create a key for testing and name it. If it asks for permissions, ask your AI tool which ones a checkout needs.
- Copy the key straight away. It starts with dodo_test_.
- Open the file your AI tool named, such as .env. Add a line with DODO_PAYMENTS_API_KEY= followed by your key.
- Add a second line, DODO_PAYMENTS_ENVIRONMENT=test_mode, then save the file.

It worked when: Your .env file holds DODO_PAYMENTS_API_KEY and DODO_PAYMENTS_ENVIRONMENT=test_mode, and Git ignores it.

Before we move on, check with me:
- Does the key you saved start with dodo_test_, not dodo_live_?

If something goes wrong:
- You pasted the key into the chat by mistake. In Developer, then API Keys, create a new key and remove the old one. Save the new key in your file.

## 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 Dodo Payments for one product, in test mode only. No real money.

Before you write code, check Dodo Payments’ current official docs at docs.dodopayments.com for checkout sessions. Then look at my product and tell me:
- whether it has server code that can keep a secret key safe
- if it doesn’t, the simplest option, such as a Dodo 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 Dodo’s hosted checkout page
- a page they come back to after paying

Rules:
- Read the API key from DODO_PAYMENTS_API_KEY and the mode from DODO_PAYMENTS_ENVIRONMENT. Never put a key in code.
- Read the product ID from a DODO_PRODUCT_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.

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

Before we move on, check with me:
- Do the product name and price match what PLAN.md says you’ll sell?

If something goes wrong:
- Your AI tool says your site has no server code. Ask it to compare two choices in plain words: a Dodo payment link, or adding a small server. Pick one before it builds.
- You see a 401 error. Your key and mode don’t match. A test key only works when DODO_PAYMENTS_ENVIRONMENT says test_mode. Fix that line, then ask your AI tool to restart your product.

## 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 Dodo’s page, enter the card number 4242 4242 4242 4242, expiry 06/32 and CVV 123.
- Fill the other fields, then pay. Wait to come back to your site.
- Try once more with the card 4000 0000 0000 0002. Dodo’s checkout should show that the card was declined.
- With Live Mode off, look for your test payments in the dashboard.

It worked when: One test payment succeeds, one is declined, and both show in your dashboard.

Before we move on, check with me:
- After the 4242 payment, did you come back to your site?

If something goes wrong:
- The 4242 card is declined. Check the Live Mode switch is off. Test cards only work in test mode.
- You don’t come back to your site after paying. Tell your AI tool: “After a test payment, I don’t land back on my site. Please find out why.”

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

The test checkout works. Now I want my app to react when a payment succeeds, using a Dodo Payments webhook.

Check Dodo Payments’ current docs on webhooks first. Then:
- Add a webhook route that listens for payment.succeeded.
- Verify every event with Dodo’s official SDK or the Standard Webhooks library their docs name, using the raw request body and the signing secret from the DODO_PAYMENTS_WEBHOOK_KEY environment variable.
- When a payment succeeds, give the buyer what PLAN.md says they paid for, like a download link or an order marked as paid. If the plan doesn’t say, ask me.
- Give access from the webhook, not from the page they come back to, because people can close that page before it loads.
- Make it safe if the same event arrives twice.

If my product has no server code, stop and explain my options before you build anything.

To test on my computer, check Dodo’s docs for their CLI webhook listener. Tell me the exact command, and I’ll run it myself in a separate terminal. Tell me where to find the signing secret, and I’ll put it in my .env file myself.

It worked when: A test payment makes your app give the buyer what they paid for.

Before we move on, check with me:
- Does the terminal running Dodo’s listener show payment.succeeded?

If something goes wrong:
- The webhook fails with a signature error. Check DODO_PAYMENTS_WEBHOOK_KEY matches the secret for this listener or endpoint. Tell your AI tool the error, never the secret.
- Nothing happens after a payment. Check the listener is still running in its own terminal. Then tell your AI tool what that terminal shows.

## Step 6 of 6: Pass the review and switch to live

This step is mine to do. Walk me through it, one action at a time:
- Put your site online first. Dodo compares your live website with what you tell them.
- Make sure anyone can find your pricing, terms of service, privacy policy, refund policy and a contact address. Link them in your footer.
- In the dashboard, open Verification. Choose Individual or Registered Entity, then fill in the product form.
- Verify your identity with a government ID, then add your bank details. Most reviews take 1 to 3 business days.
- Turn the Live Mode switch on. Open your product in test mode and copy it to live mode.
- Create a live API key in Developer, then API Keys. It starts with dodo_live_.
- In your host’s settings, set DODO_PAYMENTS_API_KEY to the live key, DODO_PAYMENTS_ENVIRONMENT to live_mode and DODO_PRODUCT_ID to the live product ID.
- In Developer, then Webhooks, click Add endpoint. Enter your live webhook address, pick payment.succeeded, then click Create endpoint.
- Copy the signing secret from the endpoint’s Overview tab into your host’s settings as DODO_PAYMENTS_WEBHOOK_KEY.

It worked when: Your account is approved, and your live checkout uses live keys that sit only in your host’s settings.

If something goes wrong:
- Your review is on hold. Check the reason in Verification. A site the team can’t open, or one that doesn’t match your form, are common causes.
- Live payments work, but no money has reached your bank. Payouts turn on separately, after a compliance review. Payouts under $1,000 also cost $5.

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, with its key in your .env file

    Create your account and a test product

    You

    Test mode is Dodo’s practice space. Payments there are simulated with fake cards, so no money moves while you build.

    1. Go to dodopayments.com and sign up. You can test before Dodo checks your details.
    2. In the dashboard sidebar, find the Live Mode switch. Turn it off to work in test mode.
    3. Open Products and create a new product. Choose One Time for a single payment, or Subscription for a plan.
    4. Fill in the Product Name, the Price and the Tax Category. The tax category tells Dodo which tax rules apply.
    5. Save the product. Your AI tool will ask for its product ID later, and that ID is safe to share.

    It worked when: Your Dodo account is in test mode, and Products lists your product with the right price.

    You’re not sure which tax category to pick.

    Pick the one closest to what you sell. If none fits, email support@dodopayments.com before you take real payments.

    You don’t know if Dodo allows what you sell.

    Read Dodo’s Merchant Acceptance Policy before you build.

  2. Save your API key in .env

    You

    Your code needs a secret API key to talk to Dodo. You paste it into your .env file yourself, so it never goes into the chat or onto GitHub.

    1. Ask your AI tool: “Which file in this product should hold secret keys, and is it ignored by Git?”
    2. If that file isn’t ignored by Git yet, ask your AI tool to add it to .gitignore before you go on.
    3. Keep Dodo in test mode. Open Developer, then API Keys.
    4. Create a key for testing and name it. If it asks for permissions, ask your AI tool which ones a checkout needs.
    5. Copy the key straight away. It starts with dodo_test_.
    6. Open the file your AI tool named, such as .env. Add a line with DODO_PAYMENTS_API_KEY= followed by your key.
    7. Add a second line, DODO_PAYMENTS_ENVIRONMENT=test_mode, then save the file.

    It worked when: Your .env file holds DODO_PAYMENTS_API_KEY and DODO_PAYMENTS_ENVIRONMENT=test_mode, and Git ignores it.

    Check this step
    • Does the key you saved start with dodo_test_, not dodo_live_?
    You pasted the key into the chat by mistake.

    In Developer, then API Keys, create a new key and remove the old one. Save the new key in your file.

  3. A checkout that takes test payments, then real ones

    Add a checkout for one product

    AI tool

    A Buy button sends people to Dodo’s own checkout page, so your product never handles card details.

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

    Check this step
    • Do the product name and price match what PLAN.md says you’ll sell?
    Your AI tool says your site has no server code.

    Ask it to compare two choices in plain words: a Dodo payment link, or adding a small server. Pick one before it builds.

    You see a 401 error.

    Your key and mode don’t match. A test key only works when DODO_PAYMENTS_ENVIRONMENT says test_mode. Fix that line, then ask your AI tool to restart your product.

  4. Buy it with a test card

    You

    Paying for your own product with Dodo’s test card shows you exactly what a customer sees.

    1. Open your site and click your Buy button.
    2. On Dodo’s page, enter the card number 4242 4242 4242 4242, expiry 06/32 and CVV 123.
    3. Fill the other fields, then pay. Wait to come back to your site.
    4. Try once more with the card 4000 0000 0000 0002. Dodo’s checkout should show that the card was declined.
    5. With Live Mode off, look for your test payments in the dashboard.

    It worked when: One test payment succeeds, one is declined, and both show in your dashboard.

    Check this step
    • After the 4242 payment, did you come back to your site?
    The 4242 card is declined.

    Check the Live Mode switch is off. Test cards only work in test mode.

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

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

  5. React when a payment succeeds

    AI tool

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

    It worked when: A test payment makes your app give the buyer what they paid for.

    Check this step
    • Does the terminal running Dodo’s listener show payment.succeeded?
    The webhook fails with a signature error.

    Check DODO_PAYMENTS_WEBHOOK_KEY matches the secret for this listener or endpoint. Tell your AI tool the error, never the secret.

    Nothing happens after a payment.

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

  6. Pass the review and switch to live

    You

    Dodo checks your identity, your product and your live website before real payments start. Do this step when you’re ready for real customers.

    1. Put your site online first. Dodo compares your live website with what you tell them.
    2. Make sure anyone can find your pricing, terms of service, privacy policy, refund policy and a contact address. Link them in your footer.
    3. In the dashboard, open Verification. Choose Individual or Registered Entity, then fill in the product form.
    4. Verify your identity with a government ID, then add your bank details. Most reviews take 1 to 3 business days.
    5. Turn the Live Mode switch on. Open your product in test mode and copy it to live mode.
    6. Create a live API key in Developer, then API Keys. It starts with dodo_live_.
    7. In your host’s settings, set DODO_PAYMENTS_API_KEY to the live key, DODO_PAYMENTS_ENVIRONMENT to live_mode and DODO_PRODUCT_ID to the live product ID.
    8. In Developer, then Webhooks, click Add endpoint. Enter your live webhook address, pick payment.succeeded, then click Create endpoint.
    9. Copy the signing secret from the endpoint’s Overview tab into your host’s settings as DODO_PAYMENTS_WEBHOOK_KEY.

    It worked when: Your account is approved, and your live checkout uses live keys that sit only in your host’s settings.

    Your review is on hold.

    Check the reason in Verification. A site the team can’t open, or one that doesn’t match your form, are common causes.

    Live payments work, but no money has reached your bank.

    Payouts turn on separately, after a compliance review. Payouts under $1,000 also cost $5.

Compare Dodo Payments 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 “Dodo Payments” on BuildLadder and something isn’t working.
    This comes from https://buildladder.com/tools/dodo-payments. If you can open web pages, read https://buildladder.com/tools/dodo-payments.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.
Merchant of record
A merchant of record is the company that legally sells to your customer. It collects and pays sales tax and VAT for you, and its name can appear on the buyer’s card statement.
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.
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.
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 · Dodo Payments