Find the channel behind each Creem subscription.
For software founders who bill subscriptions through Creem as their merchant of record. Virling credits the first paid transaction, the charge that ends a trial and each seat or plan change to the visit that brought the customer, then keeps that channel on every renewal through the Creem customer ID. Self-host it free under AGPL, or let us host it.
Creem is the seller of record, so a Creem transaction tells you the customer, the amount and the plan, and nothing about the page they came from. Virling closes that gap with a scoped Creem API key and one checkout.completed webhook it registers for you. How the credited visit is chosen is in the attribution model.
Subscriptions, trials and seat upgrades on Creem
Creem lists every charge as a transaction and marks none of them as a renewal, so Virling decides by order: the earliest paid transaction of a Creem customer is their first payment, and each one after it is a renewal.
- Subscriptions. The first paid transaction is credited to a visit of the visitor ID the webhook delivered. Daily, monthly, three-month, six-month and yearly Creem billing periods are all read, so Retention knows how often each subscriber should pay.
- Trials. A Creem checkout that completes with nothing charged is a trial start. It reaches Virling only by webhook, never as a transaction, and is kept apart from revenue. The charge when the trial ends is credited to the visits before the trial, and Creem's
trialingstatus counts as still paying on Retention but stays out of MRR. - Seat and plan upgrades. A charge for more seats or a bigger plan is another transaction of the same customer, so it keeps the first channel and never adds a customer. When Virling reads a subscription, its price is the product price times the units on it, so a plan sold per seat is priced for every seat.
- Cancellations. With
subscriptions:read, status is read once an hour, andscheduled_cancelcounts as paying until its period ends. Without that scope, Retention falls back to how recently the customer paid.
The Creem customer ID carries the channel
Creem charges renewals off-session, months after the visit, so they carry no visitor ID. Virling copies the first payment's channel, referrer, campaign, landing page, country and device onto each of them by matching the customer on the transaction, which holds the Creem customer ID.
That makes the customer ID the link to keep. A subscriber who returns under the same Creem customer ID keeps their original channel, however long they were away; under a new customer ID they are a new customer, credited from their own visits. A transaction with no customer cannot be matched and stands alone. Because the match needs the first transaction in Virling, renewals of subscriptions that began before the 90-day import have nothing to copy and show as Unattributed.
The webhook Virling adds, and why
The Creem API returns transactions without the virling_vid you set on the checkout. Only the checkout.completed webhook carries it, along with trial starts, so Virling asks for that one event and no other.
- Created for you. With the
webhooks:writescope, Virling registers it when you connect, pointing athttps://<your Virling>/api/webhooks/creem/<site ID>, and keeps its signing secret encrypted. - Checked on every delivery. Each request is verified against the
creem-signatureheader, an HMAC-SHA256 of the body. - Where the ID is looked for.
virling_vidis read from the checkout'smetadata, then the subscription's, then the customer's. - Needs public https. The hosted service has it. On your own server, set
VIRLING_BASE_URLto your https address before you connect, or use Replace key afterwards to add the webhook. Over plain http, transactions still import but stay Unattributed. - Left in place on disconnect. Disconnecting deletes the stored key and stops syncing; delete the key and the webhook in Creem yourself.
Credit Creem renewals to the channel that started them
Self-host Virling free under AGPL, or start the hosted version with a 14-day trial and connect a scoped Creem key.
Connect Creem
First add the site and put the script on your marketing site and your app, so both share one virling_vid cookie. Then:
- Create a scoped key. In Creem, open Developers, then API keys, and give the key
transactions:read,subscriptions:readfor Retention andwebhooks:writefor the webhook. Paste it under payments in Virling. The last 90 days of transactions are imported, then new ones every minute. - Put the cookie in checkout metadata. When your server creates the checkout, set
virling_vidinmetadata. With a test key, send the request tohttps://test-api.creem.io.
const res = await fetch("https://api.creem.io/v1/checkouts", {
method: "POST",
headers: { "x-api-key": process.env.CREEM_API_KEY, "content-type": "application/json" },
body: JSON.stringify({
product_id: "prod_...",
success_url: "https://yourproduct.com/thanks",
metadata: { virling_vid: req.cookies.virling_vid },
}),
});
// Send the customer to (await res.json()).checkout_urlStep by step: how to track Creem revenue by traffic source. Carrying UTM data through checkout: Creem UTM tracking. All settings: the Creem integration page. The cost of selling through a merchant of record: the merchant of record fee calculator.
What each Creem event does in your reports
| What happens | How Virling credits it | Where it shows |
|---|---|---|
| First payment | To a visit of the visitor ID in the metadata of the checkout, subscription or customer, which arrives by webhook, by default the latest visit in the last 90 days that was not Direct | Channels, Payments, New customers and Retention, and Time to pay once the channel has three first payments |
| Payment after a free trial | To the visits before the trial, when its checkout carried the visitor ID and reached the webhook. It is the customer's first transaction, so it is not marked as a renewal | Same as a first payment. The trial itself is never a payment or a customer |
| Renewal | Every later payment of the same customer keeps the channel of the first payment. Creem marks none itself, so the first payment must be in Virling | Channels and Payments, marked as a renewal, and in net LTV on Retention |
| Upgrade | A charge for a plan change is a later payment, so it keeps the channel of the first payment | Same as a renewal |
| Refund | Lowers its transaction, on that transaction's date, and a chargeback counts as a full refund. The last 60 days are read again every 6 hours; one on an older transaction is not picked up automatically | Refunded on the Channels card, the refunded filter on Payments, and refund rate and net LTV on Retention |
| Cancelled customer | Credits nothing. Past payments keep their channel, and a customer who returns with the same customer ID keeps the first one | Leaves Still paying on Retention, and MRR. With subscriptions:, status is read once an hour, and scheduled_ counts as paying until its period ends |
Your first week on Creem
- Day one: check the webhook. After connecting, look in Creem for Virling's
checkout.completedwebhook in the same mode as your key. If it is missing, Virling was not on https when you connected: fix that, then use Replace key. - Day one: buy once in test mode. With a key that starts with
creem_test_, follow the check in the Creem docs on a plan with no trial, since a trial start brings no transaction to read. Test payments stay in your reports after you switch keys, so to keep them out, test with a small live payment that you refund. - Day two: go live. Replace the test key with the live one, which adds the webhook in live mode, and point your server back at
https://api.creem.io. - After the first few sales: open Payments, then Channels. Payments splits revenue into new customers and renewals at the top; open a new payment to see the visits before it, with the credited one marked. Most payments in the first week can be renewals of customers from before the webhook, so expect a lot of Unattributed, and subscribers still in a trial appear once Creem charges them.
A channel example
These numbers are made up, to show how to read the report. They are not from a real product and not a benchmark. A product with a 14-day trial and one $40 monthly plan, over 30 days, with the payments counted on the Payments page:
| Channel | Visitors | First payments | Renewals | Revenue | Revenue per visitor |
|---|---|---|---|---|---|
| Organic search | 2,000 | 10 | 30 | $1,600 | $0.80 |
| 500 | 3 | 9 | $480 | $0.96 | |
| Direct | 1,000 | 4 | 6 | $400 | $0.40 |
| Paid | 1,000 | 8 | 2 | $400 | $0.40 |
| Social | 3,500 | 5 | 5 | $400 | $0.11 |
| Unattributed | - | 0 | 18 | $720 | - |
| Total | 8,000 | 30 | 70 | $4,000 | $0.50 |
Each visitor is counted under one channel here and nothing is refunded, so the rows add up. Paid, Direct and Social earned the same, but Paid brought eight of the 30 new customers, and its customers have hardly had time to renew. People still in a trial are visitors in these rows and nothing else yet, so a campaign from the last two weeks looks worse than it is. The 18 Unattributed renewals belong to subscriptions that started before the 90-day backfill, and that row shrinks as new customers arrive.
Open source
The code is on GitHub under AGPLv3. Run it on your own server as a single binary with every feature, or let us host it. A load test on 2026-10-31, in a container limited to one vCPU and 1 GB of RAM, ingested 100,000 pageviews at 2,829 a second with none failed and a p99 of 34 ms, using 157 MB of memory afterwards.
Frequently asked questions
How does Virling know which channel brought a Creem subscriber?
From the visit before their first paid transaction. Set virling_vid in the metadata of the checkout you create, and the checkout.completed webhook Virling adds brings it in. That transaction is credited to the visits before it, and later Creem charges of the same customer keep its channel, so Channels and Retention compare channels by subscribers who pay.
Why does Virling need a webhook for Creem?
Creem returns checkout metadata only in webhooks, not on transactions, so the visitor ID you set on a checkout and the start of a free trial reach Virling only through checkout.completed. Virling adds that one webhook when you connect and checks each delivery against the creem-signature header.
Is a Creem trial counted as a customer?
No. A checkout that completes with nothing charged is stored as a trial start, never as revenue, a payment or a customer, and subscriptions in Creem's trialing status are left out of MRR. The charge when the trial ends is credited to the visits before the trial started.
Which scopes does the Creem API key need?
transactions:read, plus subscriptions:read so Retention can tell who still pays, and webhooks:write so Virling can add its one checkout.completed webhook. No other scopes are needed.
Does adding seats to a Creem subscription count as a new customer?
No. The charge for the extra seats is another transaction of the same Creem customer, so it is a renewal that keeps the first channel. When Virling reads the subscription, its price is the product price times its units, so a plan sold per seat is priced for every seat.
Full guides: Set up Virling for a SaaS product, Creem in the docs and Renewals.