Stripe Integration Setup
Connect Stripe for confidence-labeled attribution and Revenue Assurance. Metrivo compares Stripe's restricted read evidence, signed webhook evidence, and its canonical projection to tell whether revenue changed—or measurement broke.
Restricted read access, no money movement
Signed attribution needs only the encrypted webhook secret. Revenue Assurance separately validates a read-only Stripe restricted key for required reads; it cannot create charges, refunds, transfers, or payouts. Stripe may not expose every additional grant on a manually created key, so Metrivo reports that validation limit instead of claiming cryptographic minimum privilege.
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.
Revenue Assurance independently synchronizes eight Stripe object streams, preserves provenance, and compares source, signed receipt, and materialized evidence by website, currency, and period. It never sums currencies or turns missing evidence into a business verdict.
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.
Add the restricted read key in Revenue Assurance
Open Revenue Assurance for the selected website, add an rk_test_ or rk_live_ key with the listed read permissions, then run bootstrap and shadow verification. The key is write-only in the UI and encrypted before storage.
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.
