# Next.js boilerplate with Dodo Payments

> Subscriptions and one-time payments on Dodo Payments, a merchant of record that sells worldwide and remits sales tax for you. Hosted checkout, the customer portal, refunds and disputes that revoke access, and a Standard Webhooks endpoint with delivery-id idempotency. Plans live in src/lib/pricing.ts and /pricing renders with no keys.

Merchant of record in 220+ countries and regions. Sales tax is Dodo's job.

- **Category:** Payments
- **Pricing:** 4% + 40c per US card or wallet payment, no monthly fee. Non-US payments add 1.5% and subscriptions add 0.5%. Standard payouts are free, with a $5 fee under $1,000. USD SWIFT payouts for non-US businesses cost $25. Sales tax is included: Dodo is the seller.
- **Best for:** Founders outside the US and EU, India especially, selling software worldwide. Dodo takes local payment methods: UPI in India, cards, Apple Pay and Google Pay. It remits sales tax as the seller, so you never register for VAT abroad.
- **Requires:** database, auth
- **Conflicts with:** stripe, polar
- **Vendor docs:** https://docs.dodopayments.com/introduction

## Trade-offs

- Dodo is the seller on the customer's statement and invoice. The tax liability moves to Dodo, which is the point, but your brand is not what shows on the card line.
- Younger than Stripe or Paddle, and the SDK changes more often. The version is pinned; read the release notes before upgrading.
- The flat rate costs more than a direct card processor because it includes the tax work. At high volume, compare it with Stripe plus a tax vendor.
- Fewer billing tools than Stripe. Failed renewals are not retried unless you turn Payment Retries on. Check that the reports and dunning you need exist before you commit.
- Payouts follow a collect-then-remit cycle, not a card processor's rolling schedule. Plan your runway on the payout date, not the charge date.

## Known fixes it ships

- [Selling software from outside the US, and why a merchant of record solves the payout problem](https://agenticboilerplate.com/cookbook/dodo/merchant-of-record-payouts-outside-the-us): If your company is registered in India, Nigeria, Brazil or most of the world, the hard part is not accepting cards. It is getting paid, and staying compliant in a hundred countries you never visit.
- [One-time payments and subscriptions on Dodo Payments, side by side](https://agenticboilerplate.com/cookbook/dodo/one-time-payments-with-dodo): Dodo decides one-time or recurring from the product, and payment.succeeded fires for both. Tell them apart by the payment's subscriptions, store purchases separately, and let a refund take access back.
- [Refunds and chargebacks on Dodo, and what they should do to access](https://agenticboilerplate.com/cookbook/dodo/refunds-and-disputes-bookkeeping): A refund or dispute webhook says which payment, not what was bought. Re-read the payment, derive the status from all its refunds and disputes, and never let a late event undo a refund.
- [Verifying Standard Webhooks signatures, the three headers and the two mistakes](https://agenticboilerplate.com/cookbook/dodo/standard-webhooks-signature-verification): Dodo signs id.timestamp.body with HMAC-SHA256. Verify the raw bytes, pass all three headers, and never write the comparison yourself.
- [The Dodo subscription lifecycle, which event means what and who keeps access](https://agenticboilerplate.com/cookbook/dodo/subscription-lifecycle-events): active, past_due, on_hold, paused, cancelled, failed, expired. Map each to access on purpose, re-read the subscription on every event, and let a grace period decide how failed renewals feel.
- [Dodo test mode and live mode are two separate worlds](https://agenticboilerplate.com/cookbook/dodo/test-mode-vs-live-mode): Different API keys, webhook keys, product ids and customers. Nothing carries over, and the mismatch that hurts most is silent.

## Generate it

[Build a repo with Dodo Payments](https://agenticboilerplate.com/build?b=dodo)

---

Agentic Boilerplate: A Next.js repo your agent already knows. Free during launch, then $99 once.

- Site map for agents: https://agenticboilerplate.com/llms.txt
- Public API: https://agenticboilerplate.com/openapi.json
- Contact: agenticstudio@gmail.com
