Stripe Integration Setup
Connect Stripe to Metrivo using secure webhooks. By receiving successful charge signals, Metrivo matches transactions to acquisition sessions and campaigns to calculate marketing ROI.
Read-Only & Secure
Metrivo never accesses your Stripe balance, initiates transfers, or holds client credentials. Our integration works entirely by listening to signed, inbound webhook notifications verifying payment success.
How the integration works
When a payment occurs, Stripe fires a webhook to Metrivo. The attribution engine processes this event and matches it to a user visit by checking the checkout metadata or customer details.
For high-confidence session-level attribution, you must pass the Metrivo tracking identifiers to Stripe when creating Checkout Sessions or Payment Intents. If no metadata is present, Metrivo falls back to matching by the customer's email hash.
Setup steps
Generate your Metrivo webhook URL
Go to Data Connections in your Metrivo dashboard, select Stripe, enter a temporary/mode selection, and generate your endpoint URL. It will look like: https://metrivo.co/api/integrations/stripe/webhook/<YOUR_INTEGRATION_ID>.
Add Webhook Endpoint in Stripe
Log into your Stripe Dashboard and go to Developers → Webhooks → Add Endpoint. Paste your Metrivo webhook URL.
Select Stripe Events to Listen For
Configure the endpoint to listen for checkout.session.completed and invoice.paid. Add the endpoint and copy the signing secret (starts with whsec_).
Save Webhook Secret in Metrivo
Return to the Metrivo Data Connections page and paste your whsec_ signing secret. Metrivo uses this secret to verify all incoming webhook signatures.
Verify signed webhook delivery
Trigger a test charge in Stripe. Metrivo will receive the webhook, cryptographically verify its signature using your saved secret, and mark the integration active.
1. Configure Webhooks in Stripe
Create a webhook in the Stripe Developer Dashboard to notify Metrivo of billing updates.
- Open the Stripe Webhooks Dashboard.
- Click Add endpoint.
- Set the Endpoint URL to:https://metrivo.co/api/integrations/stripe/webhook/<YOUR_INTEGRATION_ID>
- Select the following events to listen to:
checkout.session.completedinvoice.paid
- Click Add endpoint.
- Locate and copy your Signing secret (e.g.
whsec_...).
2. Configure Stripe in Metrivo
Save your Stripe webhook signing secret in your Metrivo Settings:
- Navigate to your dashboard Settings > Payment Integrations.
- Under Stripe, enter your
whsec_...webhook signing secret. - Click Save changes.
Passing Tracking IDs (High-Confidence Match)
Retrieve the current attribution metadata from the browser using the Metrivo tracker, send it to your backend, then attach it as Stripe `metadata`. You can also set `client_reference_id` to `metadata.metrivo_session_id` for a second session hint:
Attaching these properties enables high-confidence session-to-payment resolution on the backend. For recurring revenue, Metrivo checks `invoice.paid` metadata first, then subscription metadata, then customer metadata, and finally the Checkout Session for the subscription when a per-integration Stripe API key is available. If the metadata is missing, Metrivo records missing-data evidence and leaves the payment unattributed instead of guessing.
