# Stripe Payment Links Track affiliate sales through an ordinary link or a button styled as a link to Stripe. ## Add the Payment Link to your page Complete Connect the Stripe account and Install the browser script on the Stripe Payment Links and embeds overview. Keep the same workspace ID on the referred landing page and on the page containing the checkout control. 1. In the Stripe Dashboard, open Payment Links and create or select the link for your product. Copy its payment URL. 2. Use that URL as the href of an anchor on your page. You can style the anchor as a button. 3. For a one-time payment, configure the Payment Link to create a Stripe customer. ```html Buy now ``` ## See what gets passed to Stripe Monok adds client\_reference\_id to eligible HTTPS links when a referral is active. It keeps existing query parameters and fragments. If Stripe uses a custom checkout domain, add its exact HTTPS origin to the Monok script tag. Keep the payment link’s full URL in the anchor. ```html ``` For a JavaScript redirect to a Payment Link, await getReferral and add the reference before navigating. Use your own trusted Stripe payment URL. If your backend creates Checkout Sessions, follow Stripe Checkout from your server. ```javascript const url = new URL("https://buy.stripe.com/YOUR_PAYMENT_LINK"); const referral = await window.Monok?.getReferral(); if (referral && !url.searchParams.get("client_reference_id")) { url.searchParams.set("client_reference_id", referral); } window.location.assign(url); ``` ## Verify the link and payment In the offer’s Affiliate integration setup, run Test browser script. This verifies that the page can capture attribution without creating an affiliate click or referral. Then open a valid affiliate link in a fresh browser session and complete the method-specific checks below. A Stripe sandbox payment does not earn a commission. 1. After visiting through an affiliate link, inspect the rendered anchor in DevTools. Its href should contain client\_reference\_id with an mk2\_ value. Check that your other query parameters are still present. 2. Open the link and complete checkout. Check the completed Stripe session’s client\_reference\_id, then confirm the referral and successful eligible payment in Monok. 3. If the reference is missing, check the exact origin, the hosted tracking attribute, and whether the link already carries a non-empty client\_reference\_id. ## Related guides - [Stripe Payment Links and embeds](https://docs.monok.com/affiliate-program/stripe-payment-links) — Track affiliate referrals through Stripe Payment Links, Buy Buttons, and Pricing Tables with one Monok script. - [Stripe Buy Button](https://docs.monok.com/affiliate-program/stripe-payment-links/buy-button) — Track affiliate referrals through an embedded Stripe Buy Button. - [Stripe Checkout from your server](https://docs.monok.com/affiliate-program/stripe-checkout) — Pass a captured referral into the Stripe Checkout Session your application creates.