Introduction
The AutoSend and Dodo Payments integration enables you to automatically send real-time email notifications for all payment events, from successful transactions to failed attempts and refund confirmations. Send transactional emails for payment events using AutoSend’s powerful email API.This integration requires your AutoSend API Key for authentication. You can find your API key in the AutoSend dashboard under Settings > API Keys.
Getting Started
Follow these steps to integrate AutoSend with Dodo Payments:1
Open Webhook Section
Navigate to the Webhooks section in your Dodo Payments dashboard.

2
Select AutoSend Integration
Choose AutoSend from the list of available integrations.
3
Enter API Key
Provide your AutoSend API key for authentication. You can find your API key in the AutoSend dashboard under Settings > API Keys.
Learn how to create and manage API keys
Visit the AutoSend documentation for detailed instructions on creating and managing API keys.
4
Configure Transformation
Set up JavaScript transformation handlers to customize email content based on payment events.
5
Test & Create
Test your webhook configuration to ensure emails are sent correctly, then create the integration.
6
Activation Complete
🎉 Your AutoSend integration is now active and will automatically send emails for the configured payment events.
Code Examples
Payment Confirmation Email
Send a confirmation email when a payment is successfully processed:payment_confirmation.js
Subscription Welcome Email
Send a welcome email when a new subscription is created:subscription_welcome.js
Payment Failure Notification
Send a notification email when a payment fails:payment_failure.js
Best Practices
- Verify your sender domain: Ensure your sender email domain is verified in AutoSend to improve deliverability and avoid authentication issues. Verified domains help prevent emails from landing in spam folders.
-
Use dynamic data for personalization: Use the
dynamicDatafield to personalize emails with customer-specific information like names, payment amounts, and subscription details. Personalized emails have higher engagement rates. - Write clear subject lines: Write descriptive subject lines that clearly indicate the email’s purpose. Avoid spam-trigger words and keep subjects concise (under 50 characters).
- Test before production: Always test your emails before sending them in production. This ensures your email content renders correctly and all dynamic data is properly mapped.
API Reference
For complete details on the AutoSend API, including all available parameters and error codes, visit the AutoSend API Documentation.Troubleshooting
Emails not being sent
Emails not being sent
- Verify API Key is correct and active
- Check that sender domain is verified in AutoSend
- Ensure recipient email addresses are valid
- Review AutoSend sending limits and quotas
- Verify the API endpoint URL is correct:
https://api.autosend.com/v1/mails/send - Check that required parameters are present in the payload
Transformation errors
Transformation errors
- Validate JSON structure matches AutoSend API format
- Check that all required fields are present (
to,from,templateIdorhtml/text) - Ensure email addresses are properly formatted
- Verify
templateIdis valid if using templates - Check that
dynamicDatakeys match your template variables
Template issues
Template issues
- Verify your template ID is correct and active in AutoSend
- Ensure
dynamicDatakeys match the variables used in your template - Check that all required template variables are provided
- Test your template independently in the AutoSend dashboard