Moving off Lemon Squeezy
Keep your ?aff= affiliate links working after Lemon Squeezy
When Lemon Squeezy Affiliates closes on 31 March 2027, some of your affiliates’ links stop and some can keep working. This guide shows which is which, and the short script your site needs to pass the ?aff= code to Stripe.
Published by Affiliate Manager. Lemon Squeezy facts checked December 2026.
What stops working on 31 March 2027?
Every affiliate link hosted on *.lemonsqueezy.com stops, and Lemon Squeezy says none of its links redirect. Referrals after that date are not tracked or honored, whichever tool you move to.
Lemon Squeezy checkout overlays and custom checkouts also have to change, because Managed Payments works with Stripe Checkout and Payment Links. Sources: migration guide and affiliates page, checked December 2026.
Which links can keep working?
Links that point at your own site, such as https://yourapp.com/?aff=jane42, can keep working. Two things must be true: your site reads the code from the link, and your new checkout is one your affiliate tool tracks.
Nothing on your domain changes on 31 March, so those links still load your page. What ends is Lemon Squeezy’s tracking behind them. Import each affiliate with the same code (see moving affiliates by CSV) and the old links credit the same person in Affiliate Manager, if the code is free: the import preview flags any code that another program or one of your coupon codes already uses.
How does your site read the ?aff= code?
A few lines of script on your landing pages save the code when a visitor arrives, so it is still there when they reach checkout. The saved code is ignored after 30 days, the same last-click window Affiliate Manager uses. This version also reads ?ref=, the parameter Affiliate Manager’s own tracking links add, so old and new links work the same way.
<script>
// Old Lemon Squeezy links carry ?aff=CODE; Affiliate Manager links carry ?ref=CODE.
var params = new URLSearchParams(location.search);
var code = params.get('aff') || params.get('ref');
if (code) localStorage.setItem('affiliateCode', JSON.stringify({ code: code, ts: Date.now() }));
// The saved code, or null once it is older than 30 days (last click wins).
function savedAffiliateCode() {
try {
var saved = JSON.parse(localStorage.getItem('affiliateCode'));
return saved && Date.now() - saved.ts < 30 * 86400000 ? saved.code : null;
} catch (e) {
return null;
}
}
</script>How does the code reach Stripe?
Send the saved code with your checkout request and put it in the Checkout Session’s metadata under the key affiliateCode. Use that exact key: a code stored under aff in metadata is not read.
// Send savedAffiliateCode() with your checkout request, then where you
// create the Stripe Checkout Session, pass it on:
stripe.checkout.sessions.create({
// ...your existing options...
metadata: { affiliateCode: codeFromTheBrowser },
});Selling through Stripe Payment Links? They cannot take metadata from a URL, so the script below adds the code as client_reference_id=am_CODE. The am_ prefix keeps it apart from IDs other tools put there.
<!-- Selling through Stripe Payment Links? Add this after the script above.
Using a custom domain for Payment Links? Put it in place of buy.stripe.com. -->
<script>
// Listens on the whole page, so links added after it loads are covered too.
document.addEventListener('click', function (event) {
var link = event.target.closest && event.target.closest('a[href*="buy.stripe.com"]');
var code = link && savedAffiliateCode();
if (!code) return;
var url = new URL(link.href);
if (!url.searchParams.has('client_reference_id')) {
url.searchParams.set('client_reference_id', 'am_' + code);
link.href = url.toString();
}
}, true);
</script>Then connect Stripe in Affiliate Manager and add the webhook it shows you. For subscriptions, the code is read from the checkout that started the subscription. Renewals earn commission only if you set Recurring Commission (months) in your program settings, and they are credited to the original affiliate by matching the buyer’s billing email to their first referred sale, not by the code, so you do not pass it again.
Does this work on Stripe Managed Payments?
We do not know yet: we are verifying Managed Payments tracking and will not claim it until a test sale passes. If you are moving to Managed Payments, email support@affiliatemanager.us and we will confirm it with a test sale before you move. The steps above are for a Stripe account you run yourself.
How do you check it before telling affiliates?
Run one test purchase through your own link with a test affiliate and watch the sale arrive. Test sales are marked Test and never count toward commissions owed, payouts or revenue.
- On your Stripe platform page in Affiliate Manager, choose Run a test purchase and create the test affiliate.
- Open
https://yourapp.com/?aff=CODEwith the test affiliate’s code. - Connected with a test key? Pay with a Stripe test card. With a live key, make a small real purchase and refund it in Stripe.
- Check that the sale shows under the test affiliate, marked Test.
- Then email your affiliates which links keep working and send new ones for anything on
lemonsqueezy.com.
Still picking a tool? See the shortlist of Lemon Squeezy affiliate alternatives.
Frequently asked questions
Do my affiliates need new links?
Only for links hosted on lemonsqueezy.com. Links to your own site with ?aff=CODE can stay, once your site reads the code and passes it to a checkout your affiliate tool tracks.
Can Lemon Squeezy redirect old links for me?
No. Lemon Squeezy says none of its links redirect after the shutdown.
What metadata key does Affiliate Manager read?
affiliateCode on the Checkout Session, or client_reference_id=am_CODE on a Payment Link.
Does this work with Stripe Managed Payments?
We are still verifying it. Email support@affiliatemanager.us and we will confirm with a test sale before you move.
More on moving off Lemon Squeezy
- Lemon Squeezy affiliate alternatives (2027)
- How to move Lemon Squeezy affiliates by CSV
- Affiliate software for Lemon Squeezy
Switching from another tool gets a 30-day trial. Start it here, or email support@affiliatemanager.us and we will help you move.