Introduction

Connect Dodo Payments to thousands of apps and services through Zapier. Automate workflows by triggering Zaps when payment events occur, from sending emails to updating spreadsheets, creating tasks, and much more.
This integration requires a Zapier webhook URL from your Zap configuration.

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 Zapier

Choose the Zapier integration card.
3

Create Zap in Zapier

In Zapier, create a new Zap with “Webhooks by Zapier” as the trigger. Copy the webhook URL.
4

Paste Webhook URL

Paste the Zapier webhook URL into the endpoint configuration.
5

Configure Transformation

Edit the transformation code to format data for your Zapier workflow.
6

Test & Create

Test with sample payloads and click Create to activate the integration.
7

Done!

🎉 Payment events will now trigger your Zapier workflows automatically.

Transformation Code Examples

Basic Webhook Payload

basic_webhook.js
function handler(webhook) {
  if (webhook.eventType === "payment.succeeded") {
    const p = webhook.payload.data;
    webhook.payload = {
      event_type: webhook.eventType,
      payment_id: p.payment_id,
      amount: p.total_amount,
      currency: p.currency || "USD",
      customer_email: p.customer.email,
      customer_name: p.customer.name,
      payment_method: p.payment_method || "unknown",
      timestamp: webhook.payload.timestamp
    };
  }
  return webhook;
}

Subscription Event Handler

subscription_webhook.js
function handler(webhook) {
  const s = webhook.payload.data;
  switch (webhook.eventType) {
    case "subscription.active":
      webhook.payload = {
        event_type: "subscription_started",
        subscription_id: s.subscription_id,
        customer_email: s.customer.email,
        customer_name: s.customer.name,
        product_id: s.product_id,
        amount: s.recurring_pre_tax_amount,
        frequency: s.payment_frequency_interval,
        next_billing: s.next_billing_date,
        timestamp: webhook.payload.timestamp
      };
      break;
    case "subscription.cancelled":
      webhook.payload = {
        event_type: "subscription_cancelled",
        subscription_id: s.subscription_id,
        customer_email: s.customer.email,
        cancelled_at: s.cancelled_at,
        cancel_at_next_billing: s.cancel_at_next_billing_date,
        timestamp: webhook.payload.timestamp
      };
      break;
  }
  return webhook;
}

Dispute Alert Handler

dispute_webhook.js
function handler(webhook) {
  if (webhook.eventType.startsWith("dispute.")) {
    const d = webhook.payload.data;
    webhook.payload = {
      event_type: webhook.eventType,
      dispute_id: d.dispute_id,
      payment_id: d.payment_id,
      amount: d.amount,
      status: d.dispute_status,
      stage: d.dispute_stage,
      remarks: d.remarks || "",
      urgent: webhook.eventType === "dispute.opened",
      timestamp: webhook.payload.timestamp
    };
  }
  return webhook;
}

Tips

  • Keep payload structure simple for easy Zapier parsing
  • Use consistent field names across all events
  • Include timestamps for workflow timing
  • Test your Zap with sample data before going live
  • Use Zapier’s built-in filters for conditional logic

Troubleshooting