Skip to main content
Connect your payment provider to see which marketing channels drive revenue, not just traffic.

Supported providers

PostMetric supports the following payment providers:
  • Stripe - Checkout API, PaymentIntent API, Payment Links
  • LemonSqueezy - Checkout API, Payment Links
  • Custom API - Record payments via our API

How it works

When a payment is completed, PostMetric links it to the visitor who made the purchase. This allows you to:
  • See which marketing channels drive revenue
  • Calculate ROI for your campaigns
  • Track conversion rates by source
  • Identify your most valuable traffic sources

Setup methods

Webhooks automatically send payment data to PostMetric when a payment is completed.

Method 2: API

Record payments manually using our API:
curl -X POST https://your-domain.com/api/v1/payment \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "provider": "stripe",
    "providerPaymentId": "pi_1234567890",
    "amount": 99.99,
    "currency": "USD",
    "visitorId": "visitor_123",
    "sessionId": "session_456",
    "customerEmail": "customer@example.com"
  }'
See our Payment API documentation for more details.

Linking payments to visitors

PostMetric uses three methods to link payments to visitors, in order of preference:
  1. Metadata method (most reliable) - Include visitorId or sessionId in your payment metadata
  2. Email matching - Match customer email to identified users
  3. Timestamp correlation - Link payments to recent sessions (fallback)
For best results, use the metadata method by including visitor/session IDs in your payment metadata.

View revenue data

Once payments are linked, you can view revenue data in your dashboard:
  • Revenue over time
  • Revenue by source/channel
  • Conversion rates
  • Average order value by source

Next steps