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

Find the post, search or AI answer behind each Paddle payment for your AI app.

For founders of AI apps and GPT wrappers who bill plans or credit packs through Paddle. Virling links every paying user to the visit that sent them, with ChatGPT, Perplexity and other assistants on a channel of their own, so you can tell where buyers come from apart from where the free-credit crowd comes from. Open source under AGPL, hosted or self-hosted.

Start free See the demo

Free credits make signing up cost nothing, so signups say little about a channel. A launch can fill the app with people who use up the free tier in an afternoon, while one ChatGPT answer sends a handful who come back for packs every month. Paddle holds the transactions and Virling holds the visits; a read-only API key and the visitor ID in checkout customData connect them.

What you get

  • A channel for every paying user. Virling matches a Paddle customer's first completed transaction to the visits before it, by default the most recent one in 90 days that was not Direct. Someone who found you through Reddit and later typed your address in still counts for Reddit.
  • Assistants kept apart from search. Referrals from ChatGPT, Perplexity, Claude, Gemini, Copilot and DeepSeek land in the AI channel. Google and Bing go to Organic search, and X, Reddit, Product Hunt and YouTube each keep a referrer row.
  • Packs and plan charges on the first channel. Every completed transaction after a customer's first is a renewal, whether Paddle bills it as a pack, a subscription_recurring charge or an upgrade, and it copies the first payment's channel, referrer, campaign and landing page.
  • Free usage left out. Only completed transactions are revenue. Signups, spent free credits and the $0 transaction that opens a subscription trial add no revenue, payment or customer.
  • Refunds and chargebacks. Approved adjustments of either kind reduce their transaction, and Virling rereads the last 60 days of transactions every 6 hours to catch them.
  • Retention by channel. Customers are grouped by the channel of their first payment. With subscription.read, Virling reads subscription status hourly; without it, Retention judges by how recently a customer paid.

See which channel brings users who pay

For AI apps that sell credits or subscriptions through Paddle. Virling is open source under AGPL: self-host it free, or use the hosted version with a 14-day free trial.

Start free trial See the demo

Set it up

  1. Create the site. Under + Add a site, give your domain, for example yourapp.com, and its timezone.
  2. Add the script to the landing page and the app. Put the tag before </head> on both. Virling sets the virling_vid cookie on the registrable domain, so yourapp.com and app.yourapp.com see the same visitor. Keep cookieless mode off.
  3. Connect Paddle. In Paddle, open Developer tools, then Authentication, and create an API key with transaction.read and adjustment.read, plus subscription.read for retention. Paste it under payments; live keys start with pdl_live_ and sandbox keys with pdl_sdbx_. The last 90 days are imported, then new transactions every minute.
  4. Link checkout to visits. Virling reads virling_vid from the transaction's custom_data. With Paddle.js, pass it as customData when you open checkout. For transactions you create on your server, set custom_data: { virling_vid: req.cookies.virling_vid }.
Paddle.Checkout.open({
  items: [{ priceId: "pri_...", quantity: 1 }],
  customData: { virling_vid: window.virling?.vid?.() },
});

window.virling?.vid?.() returns nothing when the script is blocked or not loaded yet, so check the value before using it. The Next.js walkthrough is in Next.js Paddle UTM tracking, and ChatGPT revenue tracking shows how to read which ChatGPT visits pay. The Paddle integration page lists every setting; for other providers, see Virling for AI apps.

Paddle credit packs, customData and the IDs Virling reads

  • A credit pack is a plain transaction. Paddle bills a one-time pack as a completed transaction with no subscription. Virling records its total, after discounts and including tax, before Paddle's fee. Usage you meter inside the app is never read; only what Paddle charges counts.
  • The first transaction sets the channel. Pack or plan, the customer's earliest completed transaction is credited to their visits. Each later one is a renewal that copies that channel through the ctm_ customer ID, so a customer who tops up ten times is one customer on one channel.
  • customData on top-up checkouts too. Pass virling_vid every time Paddle.js opens checkout. A later pack keeps the first channel, but when the first payment is Unattributed, the pack is credited to its own visit. Custom data on a customer, product or price is ignored.
  • Transaction IDs. Each payment is stored under its txn_ ID, so you can find any pack or charge in Paddle.
  • What the AI channel adds. Assistant referrals are visits with revenue per visitor on the Channels card. With the server snippet, the Answers tab of the AI card also counts each time ChatGPT-User, Claude-User or Perplexity-User fetched one of your pages to answer someone, next to the visitors and revenue that assistant sent. Those fetches are stored apart from visits and never count as visitors.

Example: a ChatGPT user who buys credits on Paddle

An invented user with made-up numbers, to show what each side records.

DayWhat Paddle recordsWhat Virling shows
0Nothing: the visitor clicks your app in a ChatGPT answer, signs up and spends the free creditsA visit in the AI channel, source ChatGPT. No payment and no customer
2A completed transaction of origin web for a $10 credit pack plus $2 VAT, $12 in total, with virling_vid in custom_data and a ctm_ IDA $12 payment, tax included, credited to AI with source ChatGPT. One new customer
9The same customer starts the $20 monthly plan: a transaction of $24 with VATA $24 payment marked as a renewal, credited to AI through the ctm_ ID. No new customer
39The plan renews in a $24 transaction of origin subscription_recurring, with no custom dataAnother renewal on AI. The AI row has $60 from one new customer, and Retention counts that customer as still paying

Credit packs, subscriptions, upgrades and refunds

How each Paddle transaction or adjustment is credited, and where it appears.

What happensHow Virling credits itWhere it shows
First credit packGoes to a visit of the visitor ID in the transaction's custom_data; unless you change the model, the latest visit in the past 90 days that was not DirectCounted in Channels, Payments, New customers and Retention
Later credit packAny transaction after the customer's first is a renewal, so the pack copies the first payment's channel through the ctm_ ID. With an Unattributed first payment, its own virling_vid is usedMarked as a renewal in Channels and Payments; part of net LTV on Retention
SubscriptionIts first charge is credited like a first pack, and each transaction of origin subscription_recurring keeps that channel. After a free trial, the first charge has that origin too and goes to the visits before the trialLike a first pack. Renewals show like a later pack, and so does the first charge after a trial, which is in neither New customers nor the Retention customers
UpgradeA transaction of origin subscription_update or subscription_charge keeps the channel of the customer's first paymentLike a later pack
RefundAn approved refund or chargeback adjustment reduces its transaction, dated to the transaction. Virling rereads 60 days of transactions every 6 hours, so a refund on an older one is not picked up automaticallyRefunded on Channels, the refunded filter on Payments, refund rate and net LTV on Retention

Visits from AI assistants

A click from an assistant is classed by what it carries:

  • AI. A referrer of chatgpt.com, chat.openai.com, perplexity.ai, claude.ai, gemini.google.com, copilot.microsoft.com or chat.deepseek.com, or, with no referrer, a utm_source like chatgpt, perplexity or claude.
  • Referral, Organic search or Paid. Assistants missing from that list count as Referral, and AI answers on Google or Bing as Organic search. A paid or email utm_medium overrides the referrer, so a link tagged cpc is Paid.
  • Direct. No referrer and no tag, as when an app strips the referrer or a user pastes your address from an answer. These look like typed visits, so the AI channel undercounts.

Reading them:

  1. Per assistant. Click AI on the Channels card and open Source for visitors, revenue and revenue per visitor by assistant, with a chip against the site average.
  2. New customers, not only revenue. Revenue lands on the payment date, so packs, upgrades and renewals from users an assistant sent months ago add to it. New customers excludes renewals.
  3. Direct is not AI. A buyer who came from ChatGPT and came back by typing your address is credited to AI by default; one whose only visits were Direct stays Direct.
  4. Last 90 days. On a few visitors one pack swings revenue per visitor, so read the longer range. Is AI search traffic worth anything? works through an example.

What to know

  • The backfill reads 90 days of transactions. Packs and renewals from customers whose first payment is older have nothing to inherit and show as Unattributed until newer customers take over.
  • A renewal has no custom data of its own; its channel comes from the first payment through the ctm_ ID.
  • A transaction without a customer ID cannot inherit a channel, and one without a visitor ID still adds to revenue as Unattributed.

Open source

Virling's code is on GitHub under AGPLv3. Use the hosted service, or self-host the same single binary with every feature. In a load test on 2026-10-31 limited to one vCPU and 1 GB of RAM, it took in 100,000 pageviews at 2,829 a second with no failures and a p99 of 34 ms, using 157 MB of memory afterwards.

Frequently asked questions

Which channel brings paying users to my AI app on Paddle?

Connect Paddle with a read-only API key and pass virling_vid as customData when Paddle.js opens checkout. Virling credits each customer's first completed transaction to the visits before it, so Channels shows whether a post, a search result or an AI answer sent the users who pay.

Does a later Paddle credit pack get its own channel?

No. It takes the channel of the customer's first payment, found through the Paddle customer ID, because every transaction after the first is a renewal, the same as a plan renewal or upgrade. Keep virling_vid in the pack's customData anyway: when the first payment is Unattributed, the pack is credited to its own visit.

Are free credits counted as Paddle revenue?

No. Revenue comes only from completed Paddle transactions, so a user who never leaves the free tier stays a visitor. The $0 transaction that opens a subscription trial is not revenue, a payment or a customer either.

Which assistants count as the AI channel?

Referrals from chatgpt.com, chat.openai.com, perplexity.ai, claude.ai, gemini.google.com, copilot.microsoft.com and chat.deepseek.com. Their visitors and revenue get their own rows, split by assistant on the Source tab.

Does a customer who cancels and buys again get a new channel?

Not while they return with the same Paddle customer ID: the new payment keeps the channel of their first one, however long they were away. If that first payment is Unattributed and the new one has its own visitor ID, the new visit is credited. With a new customer ID they are a new customer, credited from their own visits.

Can I count assistant visits that arrive as Direct?

Not separately. A visit with no referrer and no utm_source lands in Direct, next to typed addresses and bookmarks, so the AI channel is a minimum. A link you place yourself can carry a utm_source such as chatgpt or perplexity, which puts the visit in AI when there is no referrer.

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

Start free