All docs

Dodo Payments

Connect

  1. In Dodo, create an API key under Developer → API Keys. Live and test keys both work.
  2. Paste it into Setup → Payments → Dodo Payments.

DataPenny creates the webhook and never stores the key.

By hand

Add an endpoint under Developer → Webhooks, pointing at https://YOUR-DATAPENNY-URL/api/webhooks/dodo/YOUR_SITE_ID. Subscribe to payment.succeeded and refund.succeeded, then paste the signing secret (whsec_…) under Connect by hand.

Checkouts

Static payment links (checkout.dodopayments.com/buy/…) are tagged by the script: on click, it adds the visitor and session to the link’s metadata.

Checkout sessions you create on a server need one more field:

metadata: { datapenny_visitor_id: visitorId } // from datapenny.visitorId()

Dodo adds payment_id or subscription_id to your return URL, which the script reads as a fallback, so point the return URL at a page with the script on it.

Import past sales

Use an API key from Developer → API Keys. It’s used while the import runs and isn’t stored. Make a key just for this, so you can delete it afterwards. Never delete the key your own backend uses.