Introduction
Execute custom workflows and scripts in Windmill when payment events occur. Run database operations, send notifications, process data, and automate complex business logic with Windmill’s powerful workflow engine.This integration requires your Windmill webhook URL from your workflow configuration.
Getting Started
1
Open the Webhook Section
In your Dodo Payments dashboard, navigate to Webhooks → + Add Endpoint and expand the integrations dropdown.

2
Select Windmill
Choose the Windmill integration card.
3
Create Windmill Workflow
In Windmill, create a new workflow and copy the webhook URL from the trigger configuration.
4
Paste Webhook URL
Paste the Windmill webhook URL into the endpoint configuration.
5
Configure Transformation
Edit the transformation code to format events for your Windmill workflow.
6
Test & Create
Test with sample payloads and click Create to activate the integration.
7
Done!
🎉 Payment events will now trigger your Windmill workflows automatically.
Transformation Code Examples
Basic Workflow Payload
basic_workflow.js
Subscription Workflow Handler
subscription_workflow.js
Dispute Workflow Handler
dispute_workflow.js
Common Windmill Use Cases
Database Operations
Database Operations
- Update customer records in PostgreSQL/MySQL
- Log payment events to data warehouses
- Sync data to external systems
- Update inventory levels
- Track analytics metrics
Business Logic
Business Logic
- Calculate revenue metrics
- Process refunds and adjustments
- Handle subscription lifecycle
- Generate reports and exports
- Validate payment data
External Integrations
External Integrations
- Send data to analytics platforms
- Update CRM systems
- Trigger email campaigns
- Create calendar events
- Send SMS notifications
Tips
- Structure payload data for easy workflow processing
- Include all relevant metadata for business logic
- Use consistent field naming across events
- Include timestamps for workflow timing
- Leverage Windmill’s built-in error handling
Troubleshooting
Workflows not triggering
Workflows not triggering
- Verify webhook URL is correct and active
- Check that Windmill workflow is published and active
- Ensure payload structure matches workflow expectations
- Review Windmill execution logs for errors
Data processing issues
Data processing issues
- Check workflow input parameter mapping
- Verify data types match expected formats
- Test workflow with sample data
- Review Windmill script execution logs