Introduction
Run Inngest functions and background jobs when payment events occur. Dodo Payments sends each event to Inngest, where your functions can send notifications, update databases, and run multi-step workflows with Inngest’s retries and error handling.You need an Inngest webhook URL. You create it in the Inngest dashboard under Manage → Webhooks.
Getting Started
1
Open the Webhook Section
In the Dodo Payments dashboard, go to Developer → Webhooks and click Add endpoint.

2
Select Inngest
In Integration, select Inngest. Under Subscribed events, select the events that should trigger your functions.
3
Create an Inngest Webhook
In the Inngest dashboard, open the Manage tab and select Webhooks. Create a webhook and copy its URL. Inngest runs the webhook’s transform function on each request, so check that it keeps the
name and data fields your functions expect.4
Paste Webhook URL
Paste the Inngest webhook URL into Endpoint URL.
5
Configure Transformation
In Transformation code, edit the code to format events for your Inngest functions. See the examples below.
6
Test & Create
Under Test this code, select an event type and click Simulate to run the transformation against a sample payload. Then click Create endpoint to activate the integration.
7
Done
Dodo Payments events now trigger your Inngest functions.
Transformation Code Examples
Each example rewriteswebhook.payload into an Inngest event. name is the event your function triggers on, data holds the event details, user holds the customer, and ts is the event time in milliseconds, which Inngest’s event format requires.
Basic Event Payload
basic_event.js
Subscription Event Handler
subscription_event.js
Dispute Event Handler
This handler forwards everydispute.* event and marks dispute.opened as urgent. Dispute payloads don’t include customer details, so it sends no user object.
dispute_event.js
Common Inngest Use Cases
Payment Processing
Payment Processing
- Send confirmation emails
- Update customer records
- Process refunds
- Generate invoices
- Update inventory
Subscription Management
Subscription Management
- Welcome new subscribers
- Process cancellations
- Send renewal reminders
- Update billing cycles
- Handle failed payments
Analytics & Reporting
Analytics & Reporting
- Update revenue metrics
- Track customer behavior
- Generate reports
- Sync data to analytics platforms
- Calculate churn rates
Tips
- Use descriptive event names. Inngest recommends prefixing them with the source, such as
dodo/payment.succeeded. - Put customer details in
user, which Inngest encrypts at rest. - Set
tsfrom the webhook’stimestamp, in milliseconds, so events keep their original order and time. - Use the same data structure across events.
- Use Inngest’s retry and error handling features.
Troubleshooting
Functions not triggering
Functions not triggering
- Check that the endpoint URL matches your Inngest webhook URL and that the webhook is active.
- Check that your Inngest function is deployed and active.
- Check that the event names match your function triggers.
- Review the Inngest function logs for errors.
Data not received correctly
Data not received correctly
- Check that the payload structure matches the Inngest event format.
- Check that the event names are formatted correctly.
- Check that the Inngest webhook’s transform function keeps the fields that the Dodo Payments transformation sets.
- Check that all required fields are included.
- Test with Inngest’s webhook testing tool.