Skip to main content

Introduction

Track payment events in Segment to power your analytics, marketing automation, and customer data platform. Send payment, subscription, and customer lifecycle events to 300+ downstream tools automatically.
This integration requires a Segment Write Key from your Segment workspace.

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 Segment

Choose the Segment integration card.
3

Enter Write Key

Provide your Segment Write Key in the configuration.
4

Configure Transformation

Edit the transformation code to format events for Segment’s Track API.
5

Test & Create

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

Done!

🎉 Payment events will now be tracked in Segment and sent to your connected tools.

Transformation Code Examples

Track Payment Events

track_payments.js

Track Subscription Lifecycle

track_subscriptions.js

Identify Customer Properties

identify_customer.js

Tips

  • Use consistent event names across your integration
  • Include relevant properties for analytics and segmentation
  • Set proper timestamps for accurate event tracking
  • Use customer IDs as userId for proper user identification

Troubleshooting

  • Verify Write Key is correct and active
  • Check that event names follow Segment naming conventions
  • Ensure userId is properly set for user identification
  • Review Segment API rate limits
  • Validate JSON structure matches Segment API format
  • Check that all required fields are present
  • Ensure event names are strings, not objects
Last modified on April 8, 2026