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

Paddle revenue attribution for developer tools.

For APIs, CLIs and SDKs sold through Paddle Billing. Virling ties each Paddle transaction to the visit that brought the buyer, such as your docs, GitHub repository or package page, by passing a visitor ID to checkout in customData. You see which channel brings developers who pay, not only stars and downloads. Installs and terminal use are not tracked. The code is AGPL: use the hosted service or run your own copy.

Start free trial See the demo

A developer may find your package, read the docs, try the free tier and pay weeks later. Paddle records who paid and how much, but not the visit that brought them. Virling joins each Paddle Billing transaction to the visitor who checked out; Link checkout to visits explains how.

From docs, GitHub and package pages to checkout

  • Docs. With the same data-site, pages on yourtool.dev, docs.yourtool.dev and app.yourtool.dev count for one site and share the virling_vid cookie, so reading the docs never changes the channel the visit came from. A docs page that starts a visit is its landing page. See do your docs bring paying customers.
  • GitHub. Clicks from github.com land in Referral and show as GitHub in the Source tab. GitHub sends only its origin, so give the README, repository website field and release notes one utm_campaign each. GitHub revenue tracking has the links to copy.
  • Package pages. npmjs.com, pypi.org and crates.io are Referral rows under their own domain. Tag the README and homepage links to tell placements apart; package registry traffic covers each one.
  • Links printed by your CLI. A link opened from a terminal has no referrer. Tag it, such as ?utm_source=cli&utm_medium=referral&utm_campaign=upgrade-hint, or it is Direct. A tagged visit can take the credit from the channel that first brought the developer; switch to first touch to see that one.

By default a payment goes to the latest visit in the last 90 days that was not Direct. Virling for developer tools covers other channels, and the lookback window can be 30, 60, 90 or 365 days.

See which developers paid, and where they came from

Built for APIs, CLIs and SDKs billed by Paddle. Try the hosted version free for 14 days, or self-host the AGPL source at no cost.

Start free trial See the demo

What is not tracked

Virling does not track installs, terminal use, API calls or anything your SDK does. npm install, pip install and a command in a shell never open your site, so they are not visits. Virling sees visits to pages that run the script, and the Paddle payments that follow.

Set it up

  1. Add the site and the script. Click + Add a site, enter your domain, such as yourtool.dev, and paste the tag before </head> on the site, the docs and the app with the same data-site. The virling_vid cookie carries the visitor to checkout, so cookieless mode has to stay off.
  2. Connect Paddle. Paste a read-only Paddle API key under payments. The permissions it needs and how live and sandbox keys differ are on the Paddle docs page.
  3. Hand the visitor ID to checkout. Paddle checkouts do not get it by themselves. Give it to Paddle.js, overlay or inline, as customData; window.virling?.vid?.() returns nothing when the script is blocked or not loaded yet.
Paddle.Checkout.open({
  items: [{ priceId: "pri_...", quantity: 1 }],
  customData: { virling_vid: window.virling?.vid?.() },
});

Server-created transactions

If your backend creates the transaction, read the virling_vid cookie from the buyer's request and set it in custom_data. Use your own Paddle key here, not the read-only one you gave Virling.

const res = await fetch("https://api.paddle.com/transactions", {
  method: "POST",
  headers: { authorization: `Bearer ${process.env.PADDLE_API_KEY}`, "content-type": "application/json" },
  body: JSON.stringify({
    items: [{ price_id: "pri_...", quantity: 1 }],
    custom_data: { virling_vid: req.cookies.virling_vid },
  }),
});
// Open checkout in the browser with Paddle.Checkout.open({ transactionId })

A transaction created from a terminal command or an API call has no browser cookie, so there is no visitor ID to pass. Have the CLI open your pricing page in the browser instead and start checkout there. Custom data on a customer, product or price is not read.

Free tiers, seats and usage-based plans

  • Free tier first, payment later. Use on a free tier creates no Paddle transaction, so Virling knows nothing about it. The first paid transaction is credited to the visits before it inside the lookback window, so if developers often stay free for months, set the window to 365 days. A Paddle trial opened from Paddle.js with a $0 first transaction is not counted as revenue, and the charge after it goes to the visits from before the trial.
  • Seat-based plans. When a team adds seats mid-cycle, Paddle bills the prorated difference in a transaction of origin subscription_update. Virling adds it to the channel of the team's first payment, matched by Paddle customer ID, so seat growth raises that channel's revenue without adding a customer.
  • Usage-based plans. Usage over a plan allowance, such as extra API calls, is billed by Paddle either as a one-time charge on the subscription (origin subscription_charge) or on the next renewal. Either way it lands on the first payment's channel. Virling sees the charge, not the usage behind it.
  • MRR with seats. With subscription.read, MRR on Retention is the latest payment on a subscription spread over its billing period, so after a renewal it reflects the current seat count; a one-time usage charge or prorated seat charge counts as the latest payment until the next renewal.

An example

These numbers are made up, to show the method. Over 90 days the GitHub row has 4,000 visitors and $800, and one docs guide is the landing page for 500 visitors and $1,000. GitHub is $0.20 per visitor and the guide is $2.00, so the next guide is likely worth more of your time than the next star. Virling shows the revenue of each transaction, not your payout; the Paddle fee calculator works out the fee and what is left.

Check that it works

Connect a sandbox key, visit a page that runs the script in a private window through a tagged link, and pay with one of Paddle's test cards. Wait a minute for the next sync and open the payments list: the payment should show your test source instead of Unattributed. Use a new email address for each test, since a later payment by the same customer keeps the first payment's channel. Sandbox payments stay in your reports after you replace the key with a live one.

Every setting is on the Paddle integration page. If your pricing page runs on Next.js, Next.js Paddle UTM tracking shows where the visitor ID goes in the App Router.

What to know

  • Transactions older than the 90-day backfill are not imported, so renewals of subscriptions that started before that are usually Unattributed. Transactions from before the script was on your site count as revenue but are Unattributed.
  • A visit in one browser and a checkout in another, or on another device, cannot be tied together.
  • Payments without a customer ID cannot be linked to a first payment, and payments without a visitor ID still count toward revenue as Unattributed.

Open source

Virling is AGPLv3, so you can read how a Paddle transaction is matched in the repository instead of taking a page's word for it. Run the single binary yourself with every feature, or compare it with the hosted service.

Frequently asked questions

How do I see which channel brings my Paddle customers?

Run the Virling script on your site, docs and app, then hand the visitor ID to Paddle checkout in customData. Every paying developer is then credited to the visits before the payment, and the Channels card with its Source and Campaign tabs shows whether GitHub, a docs page, a package registry or a search brought them.

Does Virling track installs or CLI use?

No. Virling does not see package installs, terminal commands, API calls or SDK use. It sees visits to pages that run the script and the Paddle transactions that follow.

Can a checkout created on my server be credited?

Yes, when the request comes from the buyer's browser on your domain. Read the virling_vid cookie from that request and set custom_data: { virling_vid } on the transaction you create. A transaction created from a terminal or an API call has no cookie, so it counts toward revenue as Unattributed, unless the customer already has an attributed first payment.

How are extra seats and usage charges credited?

Both go to the channel of the team's first payment. A prorated charge for added seats has origin subscription_update and a one-time usage charge has origin subscription_charge, and Virling counts either as revenue from an existing customer, not a new one. Virling sees the charge, never the API calls or seats behind it.

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

Start free trial