# Dodo Payments

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

Web page: https://buildladder.com/tools/dodo-payments

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.

- Made by: Dodo Payments
- Official site: https://dodopayments.com
- Cost: 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.
- What you need first: A Dodo Payments account. To take real payments, Dodo reviews your ID, your product and your live website.
- Who it helps: 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.
- Updated: 2026-11-10

## 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.

What you’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.

### 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 (https://dodopayments.com): No monthly fee

### 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.

### 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.

Compare Dodo Payments with the other options: https://buildladder.com/concepts/payments.md
