Documentation
Reporting revenue
Stripe by webhook, everything else by one POST from your server.
Stripe
Add the endpoint below in your Stripe dashboard and paste the signing secret into Setup → Revenue.
https://api.roassensor.com/api/tracking/webhooks/stripe/YOUR_PUBLIC_KEYAttribution runs inside the webhook, so your dashboard is correct the moment Stripe gets its 200 back, and a Stripe retry re-runs attribution too.
Conversions API
For any other processor, or revenue only your server knows about. Authenticated with your secret API key, which must never reach a browser.
curl -X POST https://api.roassensor.com/api/tracking/conversions \
-H "X-Api-Key: $ROAS_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"external_id": "order_10184",
"amount": "149.00",
"currency": "USD",
"event_type": "purchase",
"email": "[email protected]",
"vid": "the roas_vid cookie, if you have it",
"product_id": "growth-annual"
}'Fields
external_id and amount are required; every optional field you add makes the match stronger.
event_type:purchase,subscribe,leadorrefund.vid: theroas_vidcookie. The single strongest signal you can pass.email/phone: matched against the identity graph, hashed on arrival.click_id: the ad click ID, if your checkout carried it through.occurred_at: when the sale actually happened, for backfills.product_id: the join key between atrack()funnel event and the sale.is_test: a sandbox sale. Stored and attributed, then left out of reported revenue.
Refunds
amount is always positive. A refund is a separate call with event_type: "refund" and refund_of_external_id naming the original sale. The sign is applied server-side.
A refund mirrors the original's attribution with negative amounts, so net ROAS stays a plain sum. It works even if the original touchpoint has since been pruned.

