Dunmore

Segment Integration

Track payment events in Segment for downstream analytics tools.

Connect Dunmore to Segment to pipe payment events into your analytics stack. Events flow to all your Segment destinations (Mixpanel, Amplitude, BigQuery, etc.).

Setup

  1. Get your Segment Write Key from the Segment dashboard under Sources > Your Source > Settings
  2. Add a Segment connector in the Dunmore console or via the API
  3. Events will flow to all your connected Segment destinations

Event Mapping

Dunmore events map to Segment track() calls with the payer wallet as the userId:

Dunmore EventSegment EventProperties
payment.settledPayment Settledpayment_id, amount, currency, network, endpoint, tx_hash, latency_ms, project_id
payment.verifiedPayment Verifiedpayment_id, amount, currency, network, endpoint, latency_ms, project_id
payment.failedPayment Failedpayment_id, amount, error_code, error_message, stage, endpoint, project_id
customer.first_paymentFirst Paymentamount, endpoint, project_id
customer.milestoneCustomer Milestonemilestone, total_spend, payment_count, project_id

On customer.first_payment, Segment also calls identify() with the wallet address and first_payment_at timestamp as traits.

Configuration

{
  "type": "segment",
  "config": {
    "writeKey": "your-segment-write-key"
  },
  "eventTypes": ["payment.settled", "payment.failed", "customer.first_payment"]
}
FieldRequiredDescription
writeKeyYesSegment source write key

API Example

curl -X POST https://api.dunmore.xyz/api/projects/{projectId}/connectors \
  -H "Authorization: Bearer {token}" \
  -H "Content-Type: application/json" \
  -d '{
    "type": "segment",
    "config": {
      "writeKey": "YOUR_SEGMENT_WRITE_KEY"
    },
    "eventTypes": ["payment.settled", "payment.failed", "customer.first_payment"]
  }'