Background
⌘K

Paddle Billing Checkout

Learn how to pass Affonso referral data to Paddle Billing checkout for proper commission tracking.

Silvestro
Written by Silvestro
Updated more than a month ago

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

  1. Visit your site with ?atp=test (our test affiliate parameter)
  2. Check browser DevTools → Console → type window.affonso_referral to see the referral ID
  3. Trigger your checkout flow locally
  4. Check your server logs/terminal - the Paddle checkout should show:
    customData: { affonso_referral: "cmdhq6ayf..." }
  5. 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.

Was this article helpful?

If you still need help, our support team is here for you.

Contact Support
bg

Ready to Scale Your SaaS?

Affonso is the easiest way to launch your own affiliate program. We take care of the technical stuff, so you can focus on growing your business.