Paddle Revenue Webhook
Connect Paddle Billing webhooks and custom_data attribution to track SaaS subscriptions and one-time payments in TrimStats.
How do you connect Paddle Billing webhooks to TrimStats?
Attach window.trimstats.attribution() inside Paddle customData.trimstats during checkout open, configure a Paddle notification destination pointing to /v1/webhooks/paddle/{siteId} for transaction.completed, adjustment.created, and adjustment.updated, and save your pdl_ntfset_ signing secret in TrimStats Site settings.
Pass attribution in Paddle customData
When opening a Paddle Billing checkout overlay or creating a transaction via the Paddle API, pass the window.trimstats?.attribution?.() object inside customData (delivered as data.custom_data on Paddle webhooks).
1const attribution = window.trimstats?.attribution?.() ?? {};23window.Paddle?.Checkout.open({4 items: [{ priceId: 'pri_01hxyz...', quantity: 1 }],5 customData: {6 trimstats: JSON.stringify(attribution),7 },8});Register the Paddle notification destination
/v1/webhooks/paddle/{siteId} URL, and save your pdl_ntfset_... secret.- 1
Add a Webhook destination in Paddle
In Paddle Billing under Developer Tools -> Notifications -> New destination, set the URL to
https://collect.trimstats.com/v1/webhooks/paddle/{siteId}and subscribe to `transaction.completed`. Add `adjustment.created` and `adjustment.updated` so approved refunds are recorded as negative transactions. - 2
Save the Paddle secret key in TrimStats
Copy the notification secret key (
pdl_ntfset_...) from Paddle and save it under Site settings -> Revenue Attribution Webhooks with provider set to Paddle.
TrimStats verifies the paddle-signature (ts=...;h1=...) HMAC-SHA256 header with a 5-minute replay window. Transactions with origin === "subscription_recurring" are tagged as subscription_renewal, other transactions with a subscription_id as subscription_new, and single purchases as one_time.
Common technical questions
How does TrimStats classify Paddle one-time payments, new subscriptions, and renewals?
How does TrimStats verify Paddle Billing webhook signatures?
Related guides
Connect payment provider webhooks directly to TrimStats to attribute one-time orders, subscriptions, renewals, and refunds to referrers, UTM campaigns, and landing pages.
Step-by-step guide to forwarding Stripe checkout sessions, subscription invoices, and refunds to TrimStats with HMAC verification.
Attribute Polar.sh orders, subscription renewals, and refunds using Standard Webhooks signature verification.