
What the Creem integration can and can’t do
Before you start
You’ll need:- Admin access to your Creem account, so you can create a webhook and an API key.
- The ability to add code to your website, or someone who can. Every setup needs the tracking script, and payment-link setups need one extra line.
- Your Referly program open. Go to your program, then Settings, then Integrations, and choose Creem. Your webhook address is shown there, already filled in with your program’s details.
Step 1: Set your commission structure
Before you connect anything, decide what an affiliate earns. In your program setup, open the commission step and set a percentage or a flat amount, paid on purchase.
- Commission structure — a percentage or a fixed amount per sale. You can add rates for individual Creem products later, once Creem is connected and Referly can read your product list.
- Payout hold — how long a commission is held before it can be paid out. This doubles as your refund window: a refund inside that window claws the commission back automatically.
Step 2: Open the Creem integration in Referly
In Referly, open your program, go to Settings, then Integrations, and choose Creem. The dialog shows your program’s own Webhook URL at the top, plus the two fields you’ll fill in shortly. Copy the webhook URL and keep this dialog open — you’ll come back to it in Step 4.
Step 3: Add the webhook in Creem
This is what tells Referly that a payment happened.Open your webhook settings
Name it and paste the URL
Select every event
Create it and copy the signing secret

Step 4: Create an API key and connect
Referly uses an API key to check the connection is valid, read your product list for product-based commission rules, and manage discount codes for affiliates.Create the key in Creem
In Creem, go to Settings, then API Keys, and create a key. Grant it:
creem_test_ connects the same way and tracks Creem test-mode purchases instead.
Paste both values into Referly
Back in the Creem dialog from Step 2:- Paste the API key you just created.
- Paste the Webhook signing secret from Step 3, including its prefix.
- Click Connect.

Step 5: Install the tracking script on your site
The tracking script recognises visitors who arrived from an affiliate link, records the click, and remembers who referred them until they buy. Copy the snippet from your Referly dashboard — it comes pre-filled with your program ID — and paste it inside thehead section of your website, on every page.

window.affiliateId, which is what the next step uses.
Step 6: Carry the referral into the Creem checkout
This is the step that connects a click to a sale. Skip it and link-based sales arrive with no affiliate attached — though discount code sales still work, because the code identifies the affiliate on its own. Referly reads the referral from a checkout field calledreferly_ref. Pick whichever method matches how you sell.
- Payment links
- Checkout API
body tag. It finds Creem payment links on the page and attaches the referral to them once it’s known.referly_ref, not creem_ref. Creem reserves creem_ref for its own built-in affiliate feature, so the two can run side by side without clashing.How Referly decides who gets credit
When a payment arrives, Referly looks for the affiliate in this order:- The referral in the checkout — the
referly_refvalue carried in from Step 6. - The discount code used at checkout — if the code belongs to one of your affiliates, that affiliate is credited.
- Neither — the customer and the revenue are still recorded so your Referly numbers match Creem, but no affiliate is credited and no commission is created.
Step 7: Test it end to end
Do this once before you go live. It takes a few minutes and it’s the only way to be sure every piece is connected.Connect with a test key
creem_test_ API key so you’re working in Creem’s test mode. Referly shows the amber Test mode badge when you are.Visit your site through an affiliate link
Buy something through your Creem checkout
4111 1111 1111 1111, with any future expiry date.Check the sale in Referly
Refund it in Creem
Swap in your live key
What gets tracked automatically
Once you’re connected, all of this happens without any further work:Affiliate discount codes
If you granted Discounts: Read & Write on your API key, Referly can give each affiliate their own Creem discount code. A customer who types that code at checkout is credited to that affiliate, which is useful for affiliates who promote on video or in person where links are awkward. Codes are created in Creem when an affiliate joins your program, and automatic code generation is available on Business plans and up. See Coupons and promo codes for the full picture.Refunds and chargebacks
When an order is refunded in Creem, Referly finds the matching sale, marks it refunded, and takes the commission back off, so you don’t pay out on money you returned. A chargeback is handled the same way. Two things to know:- A partial refund reverses the whole commission, not a proportional slice of it.
- This applies while the commission is still on hold. Once your payout hold period has passed and the affiliate has been cleared for payout, the sale is left alone — adjust it by hand if you want it reversed.
Disconnecting
There are two parts, and you usually want both:- To stop tracking, delete the Referly webhook in your Creem dashboard under Settings, then Webhooks. Nothing reaches Referly after that.
- To remove your key, open the Creem dialog in Referly and choose Disconnect.
Troubleshooting
Nothing is appearing in Referly
Nothing is appearing in Referly
Sales are tracked but no affiliate is credited
Sales are tracked but no affiliate is credited
referly_ref in its metadata. If it’s missing, the problem is Step 6: check that both the tracking script and the payment-link snippet are on the page where people click your payment links, and that you tested through a real affiliate link.The referral isn't on my payment links
The referral isn't on my payment links
Connecting fails or the key is rejected
Connecting fails or the key is rejected
Everything stopped working after I changed the webhook
Everything stopped working after I changed the webhook
Discount code sales aren't being credited
Discount code sales aren't being credited
I'm seeing test purchases in my live numbers
I'm seeing test purchases in my live numbers
creem_test_ key. Referly shows the amber Test mode badge when that’s the case — disconnect and reconnect with your live key.