Set up the endpoints
An app has one endpoint for live installs (webhook_url) and one for test installs (webhook_url_test). Set them in the wizard, or on the Configuration tab of the app page. Test events go out only if you set webhook_url_test. Without it, the app page shows a warning. Both URLs must use https.
Which events your app gets
An app gets a merchant event only if both of these are true:- The app subscribed to the event type.
- The install granted the read scope of the resource of the event.
The app always gets its own app events, with no scope check. The app also gets the privacy events (see below).
Payload
Every webhook has these fields at the top level:Verify the signature
Dodo Payments signs each message with the Standard Webhooks headerswebhook-id, webhook-timestamp, and webhook-signature. Verify them against the raw request body with the signing secret of the endpoint.
To get the secret, open your app under Apps, Created, and read the Webhook signing secret card. The card shows the secret of the current mode. Set the webhook URL for a mode before you read its secret. Only a member of the owner business with write access to API keys can see it.
TypeScript
Respond and retry
Return a2xx response quickly. Use webhook-id to ignore a message that you already processed. If your endpoint does not return 2xx, Dodo Payments sends the message again. See Webhooks for the retry schedule.
App event types
An app gets these events for its own installs.data has payload_type set to AppInstallation, except for app.settings.updated.
Example: app.installed
app.installation.updated and app.uninstalled have the same shape. On app.uninstalled, status is uninstalled and uninstalled_at has a value.
Privacy webhooks
The three privacy events arecustomer.data_request, customer.redact, and business.redact.
- A public app that has
customersscopes must handle all three events before it can be listed. - Return a
2xxresponse when you receive an event. Finish the request within 30 days. business.redactis not sent if the business installs the app again in the same mode within the 48 hours.business.redactandapp.uninstalledgo to your lastwebhook_url, also when the app is suspended or deleted.
Test the webhooks
Install your own app in test mode withwebhook_url_test set. You get app.installed when the install is active. Uninstall it to get app.uninstalled. See Test your app.