Skip to main content

Introduction

Automatically sync your paying customers to MailerLite subscriber lists when payment events occur. Add customers to specific groups, trigger automation workflows, and keep your email marketing lists up-to-date with real payment data. MailerLite is a powerful email marketing platform for newsletters, campaigns, and automations. This integration helps you automatically manage subscribers based on payment activity - perfect for onboarding sequences, customer segmentation, and targeted marketing campaigns.
This integration requires your MailerLite API Key for authentication. You can generate one from your MailerLite Integrations page.

Getting Started

1

Open the Webhook Section

In your Dodo Payments dashboard, navigate to Webhooks + Add Endpoint and expand the integrations dropdown.
Add Endpoint and integrations dropdown
2

Select MailerLite

Choose the MailerLite integration card.
3

Enter API Key

Provide your MailerLite API Key in the configuration.
4

Configure Transformation

Edit the transformation code to format subscriber data for MailerLite’s API.
5

Test & Create

Test with sample payloads and click Create to activate the subscriber sync.
6

Done!

Payment events will now automatically sync customers to your MailerLite lists.

Transformation Code Examples

Add Customer on Successful Payment

add_customer.js

Add Subscriber to Multiple Groups Based on Product

product_segmentation.js

Add New Subscriber on Subscription Activation

subscription_subscriber.js

Update Subscriber on Subscription Cancellation

subscription_cancelled.js

Add Customer with Custom Fields

custom_fields.js

Trigger Automation via Event

trigger_automation.js

Tips

  • Create custom fields in MailerLite before using them in your transformations
  • Use groups to segment customers by product, plan tier, or purchase behavior
  • Set up automation workflows in MailerLite that trigger on field updates
  • Use the upsert behavior (POST to /subscribers) to avoid duplicate subscriber errors
  • Store payment metadata in custom fields for better customer insights
  • Test with a small group before enabling for all payments

Custom Fields Setup

Before using custom fields, you need to create them in MailerLite:
  1. Go to your MailerLite dashboard
  2. Navigate to Subscribers Fields
  3. Click Create field and add fields like:
    • total_spent (Number)
    • customer_since (Date)
    • subscription_plan (Text)
    • payment_method (Text)
    • last_payment_amount (Number)

Troubleshooting

  • Verify API Key is correct and active
  • Check that the email address is valid (RFC 2821 compliant)
  • Ensure group IDs are correct and exist in your account
  • Note: Unsubscribed, bounced, or junk subscribers cannot be reactivated via API
  • Verify custom fields exist in MailerLite before using them
  • Check that field names match exactly (case-sensitive)
  • Ensure field values match the expected type (text, number, date)
  • MailerLite API has a rate limit of 120 requests per minute
  • Use batch endpoints if processing many subscribers
  • Implement backoff strategies for high-volume scenarios
  • Verify group IDs are numeric strings
  • Check that groups exist in your MailerLite account
  • Note: Using PUT with groups will remove subscriber from unlisted groups

API Reference

MailerLite Subscribers API accepts the following key parameters: For complete API documentation, visit MailerLite Developers.
Last modified on April 8, 2026