> For the complete documentation index, see [llms.txt](https://docs.humblytics.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.humblytics.com/how-to-track-purchase-events/stripe/stripe-payment-links.md).

# Stripe Payment Links

Track Stripe Payment Link purchases by adding one parameter to the link's redirect URL. No code needed.

{% hint style="info" %}
[Connect Stripe](/how-to-track-purchase-events/stripe.md) first.
{% endhint %}

## How it works

After someone pays, Stripe sends them back to your site with the checkout session ID in the URL. The Humblytics tracking script reads that ID and matches the payment to the visitor's journey.

## Set it up

1. In Stripe, open your Payment Link and go to the **After payment** tab.
2. Choose **Don't show confirmation page** and redirect customers to your website instead.
3. Enter a page on your site that loads the Humblytics script, and add this to the end of the URL:

   ```
   ?stripe_session_id={CHECKOUT_SESSION_ID}
   ```

   For example: `https://yoursite.com/thank-you?stripe_session_id={CHECKOUT_SESSION_ID}`
4. Save the link. Repeat for each Payment Link you want to track.

<mark style="background-color:pink;">ADD GIF HERE</mark>

Type `{CHECKOUT_SESSION_ID}` exactly as shown, including the curly braces. Stripe replaces it with the real ID when the customer pays.

## Good to know

* **Repeat visits are safe.** If the buyer reloads the thank-you page, the payment still counts only once.
* **The purchase must finish on the same device and browser** where the visit started. Otherwise Humblytics can't link the two.

## Troubleshooting

* **No revenue at all:** check that Stripe shows **Connected** in **Connect → Connectors**.
* **Revenue, but no attribution:** after a test purchase, check the thank-you page URL for `stripe_session_id=cs_...`. If it isn't there, fix the redirect URL in Stripe.
* **Still stuck?** Email **<support@humblytics.com>**.
