Introduction

Connect your payment data directly to Close CRM for seamless lead management and sales tracking. Automatically create contacts and opportunities from successful payments, keeping your sales team informed of revenue-generating activities.
This integration requires a Close CRM API key with appropriate permissions.

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 Close CRM

Choose the Close CRM integration card.
3

Enter API Key

Provide your Close CRM API key in the configuration.
4

Configure Transformation

Edit the transformation code to map payment data to Close CRM objects.
5

Test & Create

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

Done!

🎉 Payment events will now automatically create/update records in Close CRM.

Transformation Code Examples

Create Contact from Payment

create_contact.js
function handler(webhook) {
  if (webhook.eventType === "payment.succeeded") {
    const p = webhook.payload.data;
    webhook.url = "https://api.close.com/api/v1/contact/";
    webhook.payload = {
      name: p.customer.name,
      emails: [p.customer.email],
      phones: [p.customer.phone || ''],
      custom: {
        payment_amount: p.total_amount,
        payment_method: p.payment_method || '',
        dodo_customer_id: p.customer.customer_id
      }
    };
  }
  return webhook;
}

Create Opportunity from Subscription

create_opportunity.js
function handler(webhook) {
  if (webhook.eventType === "subscription.active") {
    const s = webhook.payload.data;
    webhook.url = "https://api.close.com/api/v1/opportunity/";
    webhook.payload = {
      lead_id: s.customer.customer_id,
      value: s.recurring_pre_tax_amount,
      value_period: s.payment_frequency_interval,
      title: `Subscription - ${s.product_id}`,
      custom: {
        subscription_id: s.subscription_id,
        billing_frequency: s.payment_frequency_interval,
        next_billing: s.next_billing_date
      }
    };
  }
  return webhook;
}

Tips

  • Use Close CRM’s API documentation to understand field mappings
  • Include custom fields for payment-specific data
  • Map subscription amounts to opportunity values
  • Use customer IDs for proper lead associations

Troubleshooting