Metrivo
Docs/Lemon Squeezy

Lemon Squeezy integration setup

Use signed Lemon Squeezy webhooks to send order and subscription events into Metrivo. Payment attribution stays confidence-labeled and does not invent matches.

Signed inbound webhooks

Metrivo only needs the webhook signing secret. It is encrypted before storage and never rendered back after save.

Setup steps

  1. 1. Open Metrivo Data Connections and generate the Lemon Squeezy webhook URL.
  2. 2. In Lemon Squeezy, create a webhook and paste the Metrivo URL.
  3. 3. Select these events: order_created, order_refunded, subscription_created, subscription_payment_success, subscription_payment_failed, subscription_payment_recovered.
  4. 4. Copy or create the signing secret and save it in Metrivo.
  5. 5. Send a simulated or test order webhook. Metrivo marks the provider active only after signature verification succeeds.

Metadata for attribution

Pass Metrivo visitor/session identifiers through Lemon Squeezy checkout metadata. Without these fields, Metrivo may fall back to customer email or leave the payment unattributed.

// Client: send this object to your checkout endpoint
const metadata = window.Metrivo.getAttributionMetadata()

// Server: include it in Lemon Squeezy checkout custom data
await createLemonSqueezyCheckout({
  variant_id: "123456",
  checkout_data: {
    email: "customer@example.com",
    custom: {
      ...metadata,
      plan: "growth"
    }
  }
})