Paddle Billing Checkout Integration
💡 Make sure your Paddle account is connected.
To track affiliate commissions properly, you need to include the Affonso referral ID in your Paddle checkout.
The referral ID is automatically made available through our tracking script as window.affonso_referral
. Simply include this value in your checkout's customData.
Implementation:
Paddle.Checkout.open({
product: 12345,
email: "customer@example.com",
customData: {
affonso_referral: window.affonso_referral
},
});
Important: This works with both Paddle.js and direct API calls. The key is to always pass the window.affonso_referral
value through the customData
parameter so Paddle includes it in transaction webhooks.
Testing
- Visit your site with
?atp=test
(our test affiliate parameter) - Check browser DevTools → Console → type
window.affonso_referral
to see the referral ID - Trigger your checkout flow locally
- Check your server logs/terminal - the Paddle checkout should show:
customData: { affonso_referral: "cmdhq6ayf..." }
- If the customData appears in your logs, you're all set!
Note: Use 100% discount codes for live testing without payments, or test locally with server logs - Paddle sandbox mode won't appear in Affonso.
Webhook Integration
Paddle will include your customData
in webhook events. Make sure to extract the affonso_referral
value from the webhook payload and include it when reporting transactions to Affonso.