Introduction
Run an affiliate program while Dodo Payments processes your sales. An affiliate platform tracks referral visits, receives payment events from Dodo Payments through webhooks, and credits each sale to the affiliate who referred it. Dodo Payments integrates with three affiliate platforms: Affonso, Dub Partners, and Rekomi.Key Features
Automated Commission Attribution
Referrals are attributed and logged automatically when a purchase is made, with no spreadsheets or manual tracking.
Real-Time Reporting
You and your affiliates can monitor performance and leads from dedicated dashboards.
Flexible Tracking Options
Use tracking scripts, metadata fields, and webhook events to capture referral data across signups and transactions.
Encrypted Credentials and Signed Webhooks
Affonso encrypts the API key you give it, and every webhook event is signed so the platform can verify that it came from Dodo Payments.
Quick Setup
Setup takes an API key, a webhook, and a tracking script. The only code you add is the script snippet and the referral metadata at checkout.
Checkout Integration
Add affiliate tracking to your checkout flows with the Affonso, Dub Partners, and Rekomi integrations.
Integration Options
Dodo Payments integrates with these affiliate management platforms:- Affonso: An affiliate management platform with automated commission tracking, real-time reporting, and dedicated affiliate dashboards.
- Dub Partners: Dub’s link management and conversion tracking, with attribution analytics for each affiliate link.
- Rekomi: An affiliate tracking and management platform with a one-paste Dodo Payments connection. Rekomi also pays your affiliates and handles their tax forms.
Affonso Integration
Affonso is an affiliate management platform that partners with Dodo Payments. To connect your Dodo Payments account to Affonso and start tracking affiliate-driven sales, follow these steps.1
Connect with Dodo Payments
To connect your Dodo Payments account, add a Dodo Payments API key to Affonso.
How to Get Your Dodo Payments API Key
- Log in to the Dodo Payments dashboard.
- Go to Developer → API Keys.
- Click Add API key.
- Enter a name, for example “Affonso Integration”.
- Click Create, then copy your API key. The dashboard shows the key only once.
Add Your API Key to Affonso
- Open your Affonso dashboard at affonso.io.
- Go to Program Details > Connect.
- Click the Dodo Payments integration card.
- Paste your Dodo Payments API key.
- Click Connect.
Affonso encrypts your API key.
2
Add Webhook to Dodo Payments
After you connect, Affonso gives you a unique webhook URL. Dodo Payments sends payment events to this URL, and Affonso uses them to track payments and trigger affiliate commissions.
Add Webhook URL in Dodo Payments
- In the Dodo Payments dashboard, go to Developer → Webhooks.
- Click Add endpoint.
- Paste your Affonso webhook URL from your Affonso program settings.
- Click Create endpoint.
Add Webhook Secret in Affonso
- In Dodo Payments, open the endpoint you created and copy its Signing secret.
- Paste it into Affonso under the Dodo Payments webhook settings.
Affonso uses the signing secret to verify that incoming events come from Dodo Payments.
3
Add the Tracking Script
To track affiliate visits and conversions, add the Affonso pixel to your site. Replace The script:
YOUR_PUBLIC_PROGRAM_ID with your Affonso program ID and YOUR_COOKIE_DURATION with how long the referral cookie lasts.- Tracks affiliate visits.
- Sets a cookie with the referral ID (
affonso_referral) and exposes it aswindow.affonso_referral. - Enables signup and payment tracking.
Add the script to every domain where users visit or convert, such as your marketing site and your app.
4
Track User Signups
To see your full funnel and improve affiliate performance, track user signups as leads.This call:
- Logs a new referral as a LEAD if the user came through an affiliate link.
- Shows the lead in your dashboard and in the affiliate’s stats.
Call it after a successful registration or after double opt-in (DOI).
5
Pass Referral Data to Dodo Payments
To attribute commissions correctly, pass the Affonso referral ID to Dodo Payments at checkout as
affonso_referral metadata. Read window.affonso_referral in the browser, then send it to your server, where your API key is available.Payments Integration
Subscription Integration
Payment Links
For more details, see the Dodo Payments API documentation.
6
Testing Your Integration
Before you launch publicly, test your setup with live affiliate links and test transactions. Work through this checklist:
- Create an affiliate and generate a tracking link.
- Visit your website through the affiliate link.
- Check that the Affonso script loads and sets the
affonso_referralcookie. - Complete a signup (optional).
- Complete a payment through Dodo Payments.
- Confirm the tracking and attribution in your Affonso dashboard.
Dub Partners Integration
You can also use Dub Partners to track affiliate referrals and conversions. Dub’s conversion tracking attributes sales to your affiliate links, so you can see which partners drive the most revenue.For detailed setup instructions, see the Dub integration guide. It covers how to track sale conversion events and attribute revenue to your affiliate links.
Quick Setup with Dub Partners
- Enable conversion tracking in your Dub dashboard for affiliate links.
- Capture the Dub click ID (
dub_idcookie) when you create checkout sessions. - Store the click ID in payment metadata, along with customer information.
- Configure the webhook integration to send sale data to Dub when payments succeed.
- One-time payments
- Subscription activations
- Recurring subscription payments
Learn More
The complete Dub integration guide, with code examples and transformation templates.
Rekomi Integration
You can also use Rekomi to run your affiliate program end to end. Rekomi tracks clicks and conversions, calculates commissions on the pre-tax sale amount, and pays your affiliates in 130+ countries, including their tax forms.For detailed setup instructions, see the Rekomi integration guide. The connection is a single pasted API key: Rekomi creates the webhook endpoint in your Dodo Payments account itself, so there is no manual webhook setup.
Quick Setup with Rekomi
- Create an API key in your Dodo Payments dashboard under Developer → API Keys, with Enable write access turned on.
- Paste the key into Rekomi, which validates it and creates the webhook endpoint automatically.
- Install the Rekomi tracking script on your site so affiliate clicks are captured.
- Pass the referral into checkout as
rekomi_refmetadata, or as themetadata_rekomi_refpayment link parameter.
- One-time payments
- Subscription activations and renewals
- Refunds and disputes, with automatic commission clawback
Learn More
The complete Rekomi integration guide, with code examples for checkout sessions and payment links.
Need Help?
If you run into issues during integration, contact the platform involved:Affonso Support
- Use the live chat on affonso.io.
- Email support@affonso.io.
Dub Support
- Read the Dub documentation for conversion tracking guides.
- Contact Dub support through the Dub dashboard.
Rekomi Support
- Read the Rekomi documentation for setup and troubleshooting guides.
- Email support@rekomi.com, or use the live chat in the Rekomi dashboard.
Dodo Payments Support
For questions about the Dodo Payments API, see the API reference or email support@dodopayments.com.
Integration Guides
- Affonso Integration (on this page)
- Dub Partners Integration
- Rekomi Integration