Attribute revenue with Stripe Payment Links
No-code attribution for Stripe Payment Links: redirect buyers to your site with the Checkout Session ID.
Make sure you've connected your Stripe account first.
Nothing to do. The script adds the visit to every Stripe payment link on your pages (as client_reference_id) as soon as the link appears, and Stripe sends it back with the payment. It works even when the buyer pays on another device or never comes back to your site.
Optional backup: the success page
In Stripe Payment Links, select a link and open After payment. Under Confirmation page, redirect customers to your website and add ?session_id={CHECKOUT_SESSION_ID} to the URL:
text
https://example.com/thanks?session_id={CHECKOUT_SESSION_ID}When the buyer lands there, the script reports session_id and Datasense ties that payment to the visit, whether the webhook arrived before or after.
Important notes
- Reloads and repeat redirects are fine: it's the same payment, recorded once.
- If you set
client_reference_idyourself, the script leaves it alone; add the success page or metadata instead.