> ## Documentation Index
> Fetch the complete documentation index at: https://docs.sequenzy.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Dodo Payments Integration

> Sync revenue data from Dodo Payments to power segments and automations

Connect your Dodo Payments account to automatically sync revenue metrics for all your subscribers. This enables powerful segmentation based on MRR and LTV.

![Sequenzy Dodo Payments connection dialog with callouts showing the required setup fields](https://mintcdn.com/sequenzy/UoccyscJ76RRpcV3/images/integrations/dodo.png?fit=max\&auto=format\&n=UoccyscJ76RRpcV3\&q=85\&s=79b82581811656822aa85d725ddc83d7)

## What is Dodo Payments?

[Dodo Payments](https://dodopayments.com) is a simple payments platform designed for indie developers and small businesses. It offers straightforward pricing, easy integration, and handles payments globally with minimal setup.

## Connecting Dodo Payments

Dodo Payments requires manual API key and webhook setup. Here's how to connect:

### Step 1: Get Your Dodo API Key

1. Go to your [Dodo Payments Dashboard](https://dashboard.dodopayments.com)
2. Navigate to **Settings → API Keys & SMTP**
3. Create a new API key or copy an existing one
4. Copy the API key

> [!WARNING]
>
> Your API key is only shown once. Store it securely before closing the dialog.

### Step 2: Find Your Business ID

1. In the Dodo Payments Dashboard, go to **Settings**
2. Your **Business ID** is displayed in your account settings (format: `bus_xxxxxxxxx`)
3. Copy this ID for later

### Step 3: Set Up Webhooks in Dodo Payments

1. In Dodo Payments, go to **Settings → Webhooks**
2. Click **Add Endpoint**
3. Enter your Sequenzy webhook URL:
   ```
   https://api.sequenzy.com/api/webhooks/dodo/{your-company-id}
   ```
   > [!NOTE]
   >
   > You can find this URL in Sequenzy when connecting Dodo Payments - it's
   > automatically shown in the connection modal.
4. Select these events to listen for:
   * `payment.succeeded`
   * `payment.failed`
   * `payment.cancelled`
   * `subscription.active`
   * `subscription.updated`
   * `subscription.renewed`
   * `subscription.plan_changed`
   * `subscription.cancelled`
   * `subscription.expired`
   * `subscription.on_hold`
   * `subscription.failed`
   * `refund.succeeded`
5. Click **Create** to save the webhook endpoint
6. Copy the **Webhook Secret** (format: `whsec_xxxxxxxxx`)

### Step 4: Connect in Sequenzy

1. Go to **Settings → Integrations** in Sequenzy
2. Click **Connect** next to Dodo Payments
3. Enter your:
   * **Business ID** (from Step 2)
   * **API Key** (from Step 1)
   * **Webhook Secret** (from Step 3)
4. Click **Connect Dodo Payments**

Sequenzy will immediately begin receiving webhook events from Dodo Payments.

## Synced Attributes

When connected, Sequenzy adds these attributes to each subscriber matched by email:

| Attribute | Type | Description |
| - | - | - |
| `mrr` | Number | Monthly Recurring Revenue in dollars (normalized from any billing interval) |
| `ltv` | Number | Lifetime Value - total payments minus refunds |

### MRR Calculation

MRR is normalized from any billing interval:

* **Monthly**: Used as-is
* **Yearly**: Divided by 12
* **Weekly**: Multiplied by 52, then divided by 12
* **Daily**: Multiplied by 365, then divided by 12

Only `active` subscriptions count toward MRR.

## Automatic Tags

Sequenzy automatically applies tags to subscribers based on their Dodo Payments subscription status:

| Tag | Applied When |
| - | - |
| `customer` | Has an active subscription |
| `cancelled` | A live subscription is scheduled to end at its next billing date (`cancel_at_next_billing_date`) |
| `churned` | The subscription has ended: `subscription.cancelled` with status `cancelled`, or `subscription.expired` |
| `saas.monthly` | On a monthly billing interval |
| `saas.yearly` | On a yearly billing interval |

These tags update automatically whenever subscription status changes via webhooks.
Dodo sends `subscription.cancelled` when a subscription actually ends, whether
the customer cancelled immediately or a scheduled cancellation reached its
billing date. A scheduled cancellation arrives as `subscription.updated` with
`cancel_at_next_billing_date` set, and un-scheduling it removes the
`cancelled` tag again. Both paths match what a manual **Sync revenue** run
produces from the Dodo API.

## Tracked Events

When you connect Dodo Payments, these events are automatically tracked for use in automations:

| Event | Triggered When |
| - | - |
| `saas.purchase` | Payment succeeded (`payment.succeeded`) |
| `saas.purchase.monthly` | Monthly subscription purchase |
| `saas.purchase.yearly` | Yearly subscription purchase |
| `saas.cancelled` | Live subscription scheduled to end at its next billing date |
| `saas.churn` | Subscription ended (`subscription.cancelled` or `subscription.expired`) |
| `saas.payment_failed` | Payment failed or subscription on hold/failed |
| `saas.refund` | Refund succeeded |
| `saas.checkout_expired` | Payment cancelled (abandoned checkout) |

> [!NOTE]
>
> Subscription lifecycle events keep subscription attributes up to date without
> firing a separate purchase event. `subscription.plan_changed` also updates MRR
> without increasing LTV. Dodo's `payment.succeeded` event updates
> payment-driven MRR and LTV and triggers `saas.purchase`.

## Using Revenue Data

### Building Segments

With MRR and LTV synced as numeric attributes, you can create sophisticated segments:

**Revenue-based segments:**

* `mrr >= 100`: High MRR customers
* `ltv > 1000`: Lifetime high-value customers
* `mrr >= 50 AND mrr < 200`: Mid-tier customers

**Combining with tags:**

* `tag = churned AND ltv > 500`: High-value churned customers (win-back targets)
* `tag = cancelled AND mrr >= 100`: At-risk high-value customers needing attention
* `tag = saas.yearly AND mrr >= 100`: Yearly enterprise customers

### Automations

Trigger automations when revenue attributes change:

* Send a thank-you email when `ltv` exceeds a threshold
* Trigger a win-back sequence when a subscriber gets the `churned` tag
* Notify your team when a high-value customer cancels

## Which Lists Contacts Join

Dodo Payments has no per-integration list targeting. Customers it creates,
including the initial revenue backfill, join your workspace
[Default Lists](https://docs.sequenzy.com/concepts/subscribers.md#default-lists).

A JSON `null` on that setting means **every current and future list**, not "no
lists". `[]` is the value that joins nothing. Check it before connecting, and
set it to specific lists (or to none) if you do not want paying customers in
every marketing list:

```bash theme={null}
sequenzy companies get comp_abc123
sequenzy companies update comp_abc123 --default-list list_customers
```

Over MCP the same field is `defaultSubscriberListIds` on `get_company` /
`update_company`. Changing the default only affects later writes and also
repoints forms, imports, and every other untargeted source. Stripe can be
pointed at its own lists with `set_integration_list_targeting`; Dodo cannot.

## How Matching Works

Subscribers are matched by email address (case-insensitive). A Dodo Payments
customer with email `User@Example.com` will match a subscriber with email
`user@example.com`.

A customer with an email that is not already in Sequenzy is created as a new
subscriber and joined to the workspace Default Lists. Events with no email are
acknowledged and skipped.

## Troubleshooting

### Webhooks Not Arriving

1. Verify your webhook URL is correct in Dodo Payments settings
2. Check that you've selected the correct events
3. Check Dodo Payments webhook logs for failed delivery attempts
4. Ensure your Sequenzy webhook endpoint is accessible

### Invalid Webhook Signature

If webhooks are failing with signature errors:

1. Verify you copied the complete webhook secret from Dodo Payments
2. Re-create the webhook endpoint in Dodo Payments and update the secret in Sequenzy
3. Ensure you're using the correct secret format

### Customer Email Not Found

Dodo Payments webhooks include customer data with email addresses. A customer
with a valid email is created if they are not already a subscriber. If events
are acknowledged but nobody appears:

1. Confirm the webhook payload includes a customer email - events without one are skipped
2. Check that the address in Dodo Payments is a valid email
3. Read workspace [Default Lists](https://docs.sequenzy.com/concepts/subscribers.md#default-lists) if the
   contact exists but is missing from the lists your segments use - a JSON
   `null` there means every list, `[]` means none


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.