Skip to content

Payment providers

Paddle revenue attribution with CrispStats

Connect Paddle Billing in CrispStats with a read-only API key, choose which products count for this site, and pass the visitor id in the checkout's customData as crispstats_visitor_id. CrispStats imports your past transactions and refunds, reads each new one back from Paddle's API, and credits transactions, renewals, refunds and chargebacks to the visit that led to them.

Updated

Set up CrispStats on Paddle

  1. 01

    Step 1: Open the Paddle panel

    The CrispStats script must already run on your site. Open the site’s Settings, select Integrations, choose Connect a payment provider and pick Paddle. You need permission to manage the site’s settings.

  2. 02

    Step 2: Create an API key in Paddle

    Select Create an API key in Paddle. Choose New API key, leave Expires empty so the key never expires, and turn on the permissions below. Notification settings: Write is optional: with it, sales show up the moment they happen. Copy the key: it starts with pdl_live_apikey_, or pdl_sdbx_apikey_ in the sandbox. Use Paddle Billing, not Paddle Classic.

    Transactions: ReadAdjustments: ReadProducts: ReadNotification settings: Write   (optional: sales the moment they happen)
  3. 03

    Step 3: Paste the key and choose products

    Paste the key. CrispStats checks it with Paddle and lists your active products under Products that count, all ticked. Untick the ones sold on another site, then select Connect Paddle. CrispStats saves the key encrypted, creates its notification destination when the key allows it, and starts importing past transactions and refunds.

  4. 04

    Step 4: Pass the visitor id at checkout

    Call crispstats.id() in the browser before the checkout opens and put the id in customData. If you create transactions on your server instead, put the same key in the transaction’s custom_data. Call it in the click handler, not on your server: the id belongs to the browser that asks.

    checkout.js
    // In the browser, before you open the checkoutconst visitorId = await crispstats.id();Paddle.Checkout.open({// ...your itemscustomData: { crispstats_visitor_id: visitorId },});

Check that it works

The Paddle row in Settings, Integrations shows Connected, whether it is live, and when it last updated. Make a purchase from a page with the script: it appears under Payments on the Revenue screen with the source of that visit. If the key stops working or loses a permission, the row says so and names the way out.

Payments through Paddle on the demo site, Quillbook, on generated traffic. Prices are the demo company's. Open it in the demo 
  • What you get

    • Paddle transactions by source, channel, campaign and landing page, credited to the first touch known for the visitor.
    • Each transaction read back from Paddle’s API before it counts as verified revenue, and sorted by kind: renewals, new subscriptions and one-time payments.
    • Refunds and chargebacks recorded as negative payments once Paddle approves the adjustment, each adjustment once.
    • Only the products you chose count, so one Paddle account can serve several sites.
    • Past transactions and refunds imported when you connect, so revenue and MRR cover your whole Paddle history.
  • Notes and limits

    • With Notification settings: Write, Paddle sends each transaction within seconds and CrispStats checks every 30 minutes as a safety net. Without it, CrispStats reads new transactions and adjustments every 5 minutes, so a sale appears within 5 minutes.
    • Paddle limits API calls per IP address. If Paddle asks to slow down, checks pause for a minute, so a check can occasionally run late. The row’s Updated time always shows the last successful check.
    • Paddle’s transactions carry no customer email, so Paddle payments show No e-mail in the payments table. A renewal or refund is attributed only when its own custom_data carries the visitor id or a user id.
    • For renewals, pass your own user id as crispstats_user_id next to the visitor id, and call crispstats.identify() after sign-in. The first touch is then taken from that user’s earliest session, whichever day it was.
    • A test key connects in test mode once you choose Connect in test mode. Test payments show with a Test tag on the Revenue screen and are kept out of revenue, MRR and every total.
    • A payment without a visitor id is still recorded and counted in revenue, MRR and every total. It is left out of the source, campaign and channel breakdowns rather than filed under Direct.
    • Connections made earlier with a webhook you added by hand keep working, but cannot import history or verify payments. Connect again with a key to add both.
    • If RevenueCat bills through the same Paddle account, its Paddle purchases are counted through Paddle, so nothing counts twice.
    • CrispStats does not calculate churn or expansion. Paddle, as merchant of record, stays the source of truth for billing, tax and invoices.

The docs page covers the optional steps this guide leaves out.

Setup questions. Straight answers.

What people ask before they connect it.

  • Transactions: Read, Adjustments: Read and Products: Read. Notification settings: Write is optional and lets the destination be created and deleted for you, so sales arrive the moment they happen. The key cannot move money, and it is never shown again.

  • No. The connection reads Paddle Billing's API. A Paddle Classic vendor ID or auth code is refused with a message asking for a Paddle Billing key.

  • Paddle transactions carry no customer email, so a renewal cannot borrow the attribution of the first payment by email. Pass a user id in custom_data at checkout and call identify after sign-in, and renewals reach the right first visit.

  • The notification destination is deleted in Paddle while the key still works, then the saved key is destroyed. Payments already recorded stay.

  • Yes, history import included. Every feature is on every plan and in the 14-day free trial.

Not answered here? Write to hello@crispstats.com

Go further

Related

  • Revenue attribution: which traffic pays

    See which source, page and campaign each payment came from.

  • Stripe revenue attribution

    Connect Stripe to CrispStats with a restricted key and pass the visitor id at checkout, so every payment, renewal and refund is tied to the visit behind it.

  • First touch vs last touch attribution

    First touch, last touch and multi-touch attribution in plain terms, with a worked example and how to join a payment to the visit that caused it.

  • RevenueCat revenue attribution

    Connect RevenueCat to CrispStats with a v2 secret key and sign customers in with one id in your app and site, so App Store and Play purchases meet their visit.

  • Web analytics for SaaS products

    See which channels bring paying customers, where trials stall in the funnel, and how your app performs for real users, from one cookieless script.

Guides

Your traffic, crisp and clear

One script, no cookies, and every feature from the first day. Set up takes about as long as pasting a snippet.