Introduction
Send professional transactional emails automatically when payment and subscription events occur. Deliver payment confirmations, subscription updates, and failure notifications through Keplars with no middleware server required. Dodo Payments calls the Keplars API directly using a JavaScript transformation handler.This integration requires your Keplars API Key for authentication. Find it in the Keplars dashboard under Settings β API Keys, and verify a sender domain or address under Domains.
Getting Started
1
Open the Webhook Section
In your Dodo Payments dashboard, navigate to Webhooks β + Add Endpoint and expand the integrations dropdown.
2
Select Keplars
Choose the Keplars integration card.

3
Enter API Key
Provide your Keplars API Key. It is sent as a Bearer token on every request.

4
Configure Transformation
Edit the transformation code to format emails for Keplars. Replace the placeholder sender address and template IDs with your own.
5
Test & Create
Test with sample payloads and click Create to activate email sending.
6
Done!
π Payment events will now automatically trigger transactional emails via Keplars.
Transformation Code Examples
Each handler setswebhook.url to the Keplars high-priority send endpoint and rewrites webhook.payload into a Keplars request (the API key is sent automatically as a Bearer token). Replace payments@mail.yourdomain.com with your verified sender and your-keplars-*-template-id with your actual template IDs.
Payment Confirmation Email
payment_succeeded.js
Payment Failure Notification
payment_failed.js
Subscription Welcome Email
subscription_active.js
Subscription Cancellation Email
subscription_cancelled.js
Tips
- Use a verified sender domain or address for better deliverability.
- Create a dedicated Keplars template per event type so each email stays on-brand and on-message.
- Personalize each email by passing customer data like name, amount, and payment ID through
params. - Test in sandbox mode first. Sandbox sends are captured in the Keplars Test Inbox rather than delivered.
Troubleshooting
Emails not being sent
Emails not being sent
- Verify your API key is correct and active in Keplars under Settings β API Keys.
- Verify your sender domain or address is verified.
- Dodo Payments shows the raw Keplars error response in the webhook delivery log. Check it for details.
Template not found
Template not found
- The
template_idin your handler must match an active template in your Keplars account. Verify the ID (and that itβs active) in the dashboard.
Wrong event triggered
Wrong event triggered
- Each handler checks
webhook.eventTypeand returns early if it does not match. Make sure the correct events are subscribed on the Dodo Payments webhook endpoint.