Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.postmetric.io/llms.txt

Use this file to discover all available pages before exploring further.

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.

Stripe webhooks

Set up Stripe webhooks

LemonSqueezy webhooks

Set up LemonSqueezy webhooks

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

Stripe integration

Detailed Stripe setup guide

LemonSqueezy integration

Detailed LemonSqueezy setup guide