Segment

Fan out events through your Segment sources. Every server-verified purchase, renewal, cancellation, and refund reaches Segment the moment it happens.

Segment is a CashSDK Marketplace data warehouse integration. Once connected, every server-verified revenue event (purchases, renewals, cancellations, and refunds) is delivered to Segment the moment it happens.

Connect#

Connect with your destination URL and a write key as the credential.

1
Add Segment

Connect it from the dashboard under Settings → Marketplace → Segment, or with the MCP server:

text
connect_marketplace_app(provider="segment", credential="<write key>", config={ url: "https://api.segment.io/v1/track" })
2
Activate
text
activate_marketplace_connection(provider="segment")
3
Test the delivery
text
test_marketplace_dispatch(type="purchase.completed", data={ userId: "u_812", productIdentifier: "pro_monthly", priceMinor: 999, currency: "usd" })

What Segment receives#

  • purchase.completed: a new purchase or first subscription payment
  • subscription.renewed: a recurring renewal
  • subscription.canceled / subscription.expired: churn
  • refund.issued: a refund or chargeback

Each event carries the customer, product, entitlement, amount, and currency. See Webhooks for the full event catalog and payload shape.

Next steps#