Skip to main content
The Referly and Creem logos connected by sync arrows

Overview

Referly is affiliate tracking and management software with a native Creem connection. An affiliate shares a link or a discount code, Referly records the click, and when that visitor buys through your Creem checkout the sale arrives on a signed webhook and is credited to the right affiliate. Setup is one webhook in Creem, two values pasted into Referly, and one metadata field carried through your checkout. Sales, subscription renewals, trials, refunds and chargebacks all arrive through that single webhook.

What you can do with Referly

Launch an affiliate program

A branded portal where affiliates sign up and find their links, codes and earnings.

Track referrals and sales

Clicks, sign-ups, one-time sales, subscription renewals, refunds and chargebacks.

Product-based commissions

Different rates per Creem product, or rule-based plans.

Affiliate promo codes

A Creem discount code per affiliate, credited without a link. Automatic generation needs the Business plan or above.

Affiliate self-service

Affiliates create and rename their own codes, synced to your Creem store.

Flexible payouts

Bank transfer, PayPal or Wise, or discount codes and Creem customer credits instead of cash.

What you'll need

  • A Creem account (production or test mode, Referly follows the key you connect with)
  • A Referly account (start here)
  • A Creem API key, plus the signing secret of the webhook you create in step 3

How It Works

Creem hosts checkout on its own domain, so the affiliate referral needs a way to travel from your site into the sale. That is the one piece you wire up yourself, and it is a single metadata field.
  • A visitor clicks an affiliate link and lands on your site. The Referly tracking script stores the referral in their browser and exposes it as window.affiliateId.
  • They go to checkout, and you attach that referral to the Creem checkout as referly_ref metadata. For payment links, a drop-in snippet from Referly does this for you.
  • Creem processes the payment and sends a signed webhook to Referly.
  • Referly matches the referral (or the discount code used at checkout) to the affiliate, calculates the commission, and records it.
Your API key powers the optional extras: listing your Creem products for product-based commission rules, creating discount codes for coupon attribution, and crediting affiliates who are paid in Creem customer credits. Sales never come through the API; they arrive on the signed webhook.
Referly reads referly_ref from checkout metadata, not creem_ref. Creem reserves creem_ref for its own built-in affiliate feature, so the two can coexist.

Integration Steps

Eight steps, about twenty minutes including the test purchase.
1

Create your affiliate program in Referly

Sign up at referly.so and create an affiliate program for your Creem store. The setup wizard walks you through the parts that matter:
  • Reward and trigger: a cash commission (percentage or flat amount), earned when a customer makes a payment. Product-specific rates can be added later, once Creem is connected and Referly can list your products.
  • Commission frequency: choose Recurring if you want subscription renewals to pay commission. First payment only pays once per customer and ignores renewals.
  • Payout hold: how long commissions are held before payout. This is also your refund window. A refund inside the hold reverses the commission automatically; after the hold, the commission has been released for payout and is not reversed.
  • Affiliate portal: the page your affiliates sign up on and where they find their links and codes.
Referly's program setup wizard on the commission step, with Customer Makes a Payment and Recurring selected and the commission amount filled in

The commission step of the program wizard: reward type, trigger, frequency and amount.

2

Open the Creem connect dialog in Referly

In your Referly dashboard, open Settings > Integrations and choose Creem. The dialog shows your program’s unique webhook URL. Copy it and keep this dialog open; you will come back to it in step 5.
Referly's Creem connect dialog with the webhook URL, an API key field and a webhook signing secret field

The Creem dialog shows your webhook URL and the two fields you'll fill in shortly.

3

Add the webhook in Creem

In your Creem dashboard, go to Settings > Webhooks and click Add Webhook, then:
  1. Give it a name you will recognize later, for example “Referly”.
  2. Paste the webhook URL from step 2 as the endpoint URL.
  3. Check that every event type is selected. They are selected by default, so the counter should match the full list; leave it that way.
  4. Click Create webhook.
  5. Open the webhook you just created and copy its signing secret; you will paste it into Referly in step 5.
Creem's New webhook form with the Referly webhook URL pasted and every event type selected

All event types are selected by default. Check the counter matches the full list, then click Create webhook.

Keep every event type selected. Referly ignores the events it does not need, but a webhook saved with only some events is accepted without complaint and then silently drops sales or refunds. If tracking ever goes quiet, check this first.
4

Create a restricted API key

In Creem, go to Settings > API Keys and create a key. Switch Full access off and grant only the permissions Referly uses:Nothing else is required. Referly never writes customers, products or orders.Use a production key for live tracking. A creem_test_ key connects the same way and tracks Creem Test Mode purchases instead, which is how you run the test purchase in step 8.
Creem's New API key dialog with Full access switched off and read permission on Products, read and write on Discounts, read on Customers and read and write on Customer Credits

Full access switched off, with only the permissions Referly uses granted.

5

Connect in Referly

Back in the Referly dialog from step 2:
  • Paste the API key from step 4
  • Paste the webhook signing secret from step 3, including its prefix
  • Click Connect
Referly validates the key against Creem before saving, so you find out straight away if something is off. A test key shows a Test mode badge so there is no guessing which environment you are in.
Referly's Creem dialog in the connected state showing a green Connected badge and an amber Test mode badge

Connected, with the Test mode badge when a creem_test_ key is used.

6

Add the Referly tracking script to your site

Copy your program’s tracking script from the Referly dashboard (Settings > Tracking methods, or step 2 of the integration wizard) into the <head> of your marketing site. It records affiliate clicks, stores the referral for your program’s cookie window, and exposes it as window.affiliateId for the next step.
Tracking script
Replace YOUR_PROGRAM_ID with the id shown in your dashboard; the copy button in Referly fills it in for you.
Referly's tracking script step with the copyable script snippet

The tracking script step in Referly, with the copyable snippet.

7

Pass the referral into checkout

This is the step that connects a click to a sale. Without it, link-attributed sales arrive with no referral attached (discount-code sales still match through the code itself).Pick whichever matches how you sell:
Checkout API: read the referral in the browser with window.affiliateId and send it along with the rest of your checkout request; your server puts it in metadata.referly_ref.Payment links: the snippet appends metadata[referly_ref] to every <a> element on the page whose href points at creem.io/payment/ or creem.io/test/payment/. It handles links that appear after page load (it watches the DOM, so client-side rendering, modals and pricing toggles are covered), updates a link again if the referral changes from the raw ref to the click id, and decorates a link once more on click as a last resort.Links you build in JavaScript: the snippet only sees anchor elements. If a button opens Creem from code (for example window.open or location.href), append the parameter yourself as in the third tab, or use the Checkout API.
Creem carries checkout metadata onto the subscription, so renewals keep crediting the same affiliate without you doing anything extra.
8

Verify with a test purchase

Run this once in Test Mode before going live. It takes about five minutes.
  1. Visit your site through an affiliate link. Take any affiliate’s link from your Referly portal (or your own test affiliate’s) and open your site with it. The click appears on that affiliate in Referly.
  2. Check the link carries the referral. Hover a Creem payment link on the page: its address now ends in metadata[referly_ref]=.... Checkout API integrations should log the referly_ref value they send instead.
  3. Buy with a test card. Complete the checkout with card 4111 1111 1111 1111, any future expiry and any CVC. In Referly, the buyer appears as a referral and the order appears as a sale with the commission calculated for that affiliate.
  4. Refund the order in Creem (Orders, open the order, Refund). Referly marks the sale refunded and reverses the commission. This works because the sale is still inside your payout hold; a refund after the hold is not reversed automatically.
  5. Resend the webhook. In Creem, open the webhook’s deliveries and resend the checkout.completed event. Referly de-duplicates by Creem order id, so nothing changes: still one sale, no second commission.
  6. Test a coupon-only sale if you use affiliate codes. Give an affiliate a Creem discount code in Referly, open a fresh private window without any affiliate link, and check out using the code. The sale is credited to that affiliate through the code alone.
To switch to live mode:
  1. In Creem, switch out of Test Mode and repeat step 3 for the live environment: the same webhook URL, every event type selected, Create webhook, then copy the live webhook’s signing secret.
  2. Create a live API key with the same restricted permissions as step 4.
  3. In Referly, click Disconnect in the Creem dialog, then connect again with the live key and the live signing secret. The Test mode badge disappears. Test-mode sales stay in Referly as history; live sales arrive on the same webhook URL from here on.

What Gets Tracked

Once you are connected, these all happen on their own: Commissions are calculated on the pre-tax sale amount, and every sale, refund and dispute is de-duplicated by its Creem order id, so webhook retries and manual resends never count twice.

Refunds and chargebacks

A refund or chargeback reverses the commission only while the sale is inside your payout hold (the hold you set in step 1). During the hold, the sale is marked refunded and the affiliate’s commission is taken back in full. Partial refunds reverse the entire commission, not a proportional share. After the hold, the commission has already been released for payout. Referly acknowledges the refund webhook but changes nothing: the sale stays as it was, the commission is not reversed, and the dashboard’s manual mark-as-refunded action is blocked for the same reason. Settle it with the affiliate directly. If refunds are common in your business, set a payout hold that covers your refund policy.

Good to Know

  • Check the event selection first. A webhook saved with only some events ticked fails quietly.
  • Coupon attribution works without the snippet. If an affiliate’s discount code is used at checkout, the sale is credited through the code even when no referly_ref metadata is present.
  • One Creem key per Referly program. A key already connected to another Referly program is rejected.
  • Re-created the webhook? Update the signing secret. Deleting and re-creating the endpoint in Creem gives you a new secret; paste the new one into Referly’s connect dialog, or deliveries fail their signature check.

Referly documentation

Guides to commission plans, coupon rules, payouts and the affiliate portal in Referly’s own docs.