virling Pricing Self-host Demo Changelog Agencies GitHub Start free trial
integrations / creem for ai apps

See which post, search or AI answer sends the users who pay you through Creem.

For founders of AI apps and AI wrappers who charge through Creem. Virling finds the visit before each customer's first payment and carries that channel onto every payment after it, so you learn whether X, Reddit, Google or ChatGPT brings buyers, not just signups who use the free credits and go. Open source under AGPL, hosted or self-hosted.

Start free trial See the demo

Most AI apps hand out free credits first and charge later, for a plan or a pack. That makes a busy launch day easy to misread: many signups can mean few buyers, and a quiet assistant referral can turn into a customer who tops up every month. Creem records the payment, not the visit. Virling connects them with a scoped Creem API key and a webhook it adds for you.

What you get

  • Buyers matched to channels. Each customer's first payment goes to the visits before it: unless you change the model, the latest visit in the last 90 days that was not Direct. Arrive from Reddit, return by typing the address, and Reddit keeps the credit.
  • Assistants as a channel. The AI channel collects referrals from ChatGPT, Perplexity, Claude, Gemini, Copilot and DeepSeek. Organic search, X, Reddit, Product Hunt and YouTube stay separate.
  • One channel per customer. On Creem, payments after the first, packs and plan charges alike, are renewals. They copy the first payment's channel, referrer, campaign and landing page through the Creem customer ID.
  • Free usage and trials out of revenue. Spent free credits are not payments. A checkout that completes with nothing to pay is a trial start, never revenue, a payment or a customer, and the first paid transaction afterwards goes to the visits before the trial.
  • Refunds and chargebacks. Virling rereads 60 days of transactions every 6 hours, so later refunds update them, and a chargeback counts as a full refund.
  • Retention by channel. Customers sit under the channel of their first payment. With subscriptions:read, subscription status is checked hourly; otherwise Retention goes by how recently each customer paid.

Set it up

  1. Register your domain. Choose + Add a site, type the domain, say yourapp.com, and pick its timezone.
  2. Load the script wherever a buyer goes. The tag goes before </head> on the landing page and in the app. Because the virling_vid cookie lives on the registrable domain, a visitor keeps one ID across yourapp.com and app.yourapp.com. Do not turn on cookieless mode.
  3. Connect Creem. In Creem, open Developers, then API keys, and create a key with transactions:read, plus subscriptions:read for retention and webhooks:write so Virling can add its webhook. Paste it under payments; live and test mode keys both work. The last 90 days are imported, then new transactions every minute.
  4. Link checkout to visits. Read the virling_vid cookie on your server and set it in metadata when you create the checkout. Virling's webhook picks it up from there.
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://yourapp.com/thanks",
    metadata: { virling_vid: req.cookies.virling_vid },
  }),
});
// Send the customer to (await res.json()).checkout_url

The full walkthrough is in how to track Creem revenue by traffic source, and Creem UTM tracking covers carrying source data through checkout. If you built the app with an AI coding tool, tracking revenue in an AI-built app walks through the same idea with Stripe. Settings are listed on the Creem integration page, and other payment providers are on Virling for AI apps.

Creem top-ups, the webhook and the IDs Virling joins on

  • The webhook carries the visitor ID. Creem returns checkout metadata only in webhooks, not on transactions, so the sync alone cannot tie a pack to a visit. When you connect, Virling adds one checkout.completed webhook; each delivery brings virling_vid and the order's transaction ID, which Virling matches to the transaction the sync imports.
  • Where virling_vid is read. The checkout's metadata first, then the subscription's, then the customer's. Set it on every checkout your server creates, top-ups included: when the first payment is Unattributed, a later one falls back to its own visitor ID.
  • Transaction and order IDs. A paid pack or plan charge is stored under its Creem transaction ID, which starts with tran_. A $0 checkout that starts a trial has no transaction, so it is kept under its ord_ order ID as a trial, not a payment.
  • Customer IDs. The cust_ ID ties each later payment to the first, so ten top-ups from one user are one customer on one channel. Usage inside your app is never read; only what Creem charges counts.
  • What the AI channel adds. The AI card sets assistants' share of your visitors beside their share of revenue. With the server snippet it also lists the pages each AI company's crawlers read and, on the Answers tab, how often ChatGPT, Claude or Perplexity opened a page to answer someone. Crawler hits never count as visitors, so they do not dilute revenue per visitor.

Example: a Perplexity user who tops up on Creem

A made-up user with invented numbers, as an example of what Virling shows at each step.

DayWhat Creem recordsWhat Virling shows
0Nothing: the visitor follows a link to your app in a Perplexity answer and tries the free creditsA visit in AI, source Perplexity. No payment
1The visitor comes back by typing your address and buys a $15 pack at a checkout your server created with virling_vid in metadata. A paid tran_ transaction for a new cust_ customer, and a checkout.completed webhookA $15 payment credited to AI, source Perplexity, because the typed visit is Direct. One new customer
6A second $15 pack for the same customerA $15 renewal on AI through the cust_ ID. No new customer
8You refund the day 6 packWithin 6 hours the day 6 payment shows as refunded, on day 6. AI has $30 of payments, $15 refunded

Credit packs, subscriptions, upgrades and refunds

Creem sends each of these as a transaction, and Virling handles them as follows.

What happensHow Virling credits itWhere it shows
First credit packTo a visit of the virling_vid the webhook found in the checkout's metadata; by default the most recent visit in 90 days that was not DirectNew customers, Retention, Channels and Payments
Later credit packA renewal, because it is not the customer's first payment. It inherits that payment's channel, pack or plan, and falls back to its own visitor ID if the first is UnattributedPayments and Channels as a renewal; adds to net LTV on Retention
SubscriptionThe first charge is credited like a first pack, and renewals inherit it. A checkout that completes at $0 is a trial start, and the first paid transaction after it goes to the visits before the trialThe same places as a first pack, with renewals shown like a later pack. The trial start is not a payment
UpgradeAnother payment by the same customer, so it inherits the first payment's channelShown like a later pack
RefundComes off its transaction on that transaction's date, and a chargeback is a full refund. Rereads cover 60 days every 6 hours; a refund on an older transaction is not picked up automaticallyThe Refunded figure on Channels, the refunded filter on Payments, and refund rate and net LTV on Retention

Reading assistant traffic

A user can find your app in an assistant and buy a pack that day or weeks later. The visit counts as AI when the referrer is chatgpt.com, chat.openai.com, perplexity.ai, claude.ai, gemini.google.com, copilot.microsoft.com or chat.deepseek.com, or when there is no referrer and utm_source names an assistant, such as chatgpt. Other assistants arrive as Referral, AI answers inside Google or Bing as Organic search, and a link with a paid or email utm_medium goes to that channel whatever the referrer. When an assistant's app drops the referrer, or someone copies your address out of an answer, the visit is Direct and looks typed, so treat the AI number as a floor.

  1. Open AI on the Channels card, then the Source tab, to compare assistants by visitors, revenue and revenue per visitor against your site average.
  2. Count new customers. Top-ups from users an assistant sent earlier land in revenue on the day they are paid; New customers leaves those renewals out.
  3. Leave Direct alone. It holds bookmarks and typed visits too. With the default model, a buyer who arrived from Perplexity and returned directly stays in AI.
  4. Use a longer range. On small numbers one $15 pack moves revenue per visitor a lot, and Last 90 days is steadier. Is AI search traffic worth anything? has a worked example.

What to know

  • Only 90 days of transactions are imported at first. Renewals and top-ups from customers who first paid before that are Unattributed, and channel numbers fill in as new customers arrive.
  • The webhook needs Virling to be reachable over https. A self-hosted server on plain http still imports payments, but they stay Unattributed.
  • A payment with no visitor ID is still revenue, shown as Unattributed.

Open source

Virling is AGPLv3 software, with its code on GitHub. Pick the hosted service or self-host one binary that has every feature. Load-tested on 2026-10-31 in a container held to one vCPU and 1 GB of RAM, it ingested 100,000 pageviews at 2,829 per second, with zero failures, a p99 of 34 ms and 157 MB of memory in use afterwards.

Frequently asked questions

Which channel brings my paying users on Creem?

Give Virling a scoped Creem API key and put virling_vid in the metadata of each checkout your server creates. Virling's checkout.completed webhook reads that metadata, and the customer's first payment is credited to the visits before it, so Channels compares posts, searches and AI answers by the users who pay.

Which channel gets credit for a credit top-up on Creem?

The first payment's. Creem payments after a customer's first are renewals, later packs included, and copy that payment's channel, referrer, campaign and landing page through the Creem customer ID.

Are free credits or Creem trials revenue?

No. Only paid Creem transactions are revenue, so a user who stays on free credits is a visitor. A checkout that completes with nothing to pay opens a trial, which is not revenue, a payment or a customer.

Does Virling see ChatGPT reading my pages?

With the server snippet, yes. When ChatGPT, Claude or Perplexity opens one of your pages to answer someone, the Answers tab of the AI card counts it, beside the visitors and revenue that assistant sent. These fetches never count as visitors.

Does a refunded credit pack still decide the channel on Creem?

Yes. The first payment is the customer's earliest one that did not fail, and a refunded payment did not fail, so later payments keep its channel. The refund lowers the revenue of its transaction, on that transaction's date, and a chargeback counts as a full refund.

Why does a visit from an assistant show as Direct or Referral?

Direct means the visit had no referrer and no utm_source, so nothing names the assistant. Referral means it came from a site that is not a known AI, search, community or social host. Both can be real visits from an assistant, so the AI channel is a minimum.

Full guides: Creem in the docs, Link checkout to visits and Renewals.

Start free trial