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
- Get your Segment Write Key from the Segment dashboard under Sources > Your Source > Settings
- Add a Segment connector in the Dunmore console or via the API
- 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 Event | Segment Event | Properties |
|---|---|---|
payment.settled | Payment Settled | payment_id, amount, currency, network, endpoint, tx_hash, latency_ms, project_id |
payment.verified | Payment Verified | payment_id, amount, currency, network, endpoint, latency_ms, project_id |
payment.failed | Payment Failed | payment_id, amount, error_code, error_message, stage, endpoint, project_id |
customer.first_payment | First Payment | amount, endpoint, project_id |
customer.milestone | Customer Milestone | milestone, 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"]
}
| Field | Required | Description |
|---|---|---|
writeKey | Yes | Segment 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"]
}'