Vol. 01 · Setup

Wire up the product ID & webhook.

The checkout demo needs two things from your Dodo dashboard: a product to sell, and a webhook endpoint to hear back from. Five minutes, no code.

01

Create a product, copy the ID.

  1. Open app.dodopayments.com/products ↗ and hit New product.
  2. Pick a one-time product, set the price (the demo assumes $9), save it.
  3. Copy the ID from the product page — it starts with pdt_.
  4. Paste it into the DODO_PRODUCT_ID secret in Lovable under Settings → Secrets.
Heads up

Products created in Dodo test mode only work while the app runs in test mode (the default). Recreate the product in live mode before flipping DODO_MODE=live.

In this deployment the demo product is IKF 14 Krump Workshop ($9).

02

Register the webhook endpoint.

Dodo posts payment.succeeded to your app. Our route verifies the Svix signature and flips an httpOnly cookie so the return page can reveal the download.

Endpoint path
https://<your-app>.lovable.app/api/public/dodo-webhook

Replace <your-app> with your published or preview hostname (both work — the /api/public/* prefix bypasses auth).

  1. Open app.dodopayments.com/webhooks ↗ and hit Add endpoint.
  2. Paste the URL above.
  3. Subscribe to payment.succeeded (add subscription.active later if you build a subscription flow).
  4. Copy the signing secret Dodo shows you — it looks like whsec_….
  5. Paste it into the DODO_WEBHOOK_SECRET secret in Lovable.
Recap

Three secrets, one endpoint.

DODO_API_KEYRequired

Dashboard → Developers → API Keys

DODO_WEBHOOK_SECRETRequired

Shown once when you create the webhook

DODO_PRODUCT_IDRequired

Product page — starts with pdt_

DODO_MODEOptional

Set to `live` to charge real cards. Defaults to test.