Skip to main content

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.
Choose the platform that fits your program, or combine several for different use cases.

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

  1. Log in to the Dodo Payments dashboard.
  2. Go to Developer → API Keys.
  3. Click Add API key.
  4. Enter a name, for example “Affonso Integration”.
  5. Click Create, then copy your API key. The dashboard shows the key only once.

Add Your API Key to Affonso

  1. Open your Affonso dashboard at affonso.io.
  2. Go to Program Details > Connect.
  3. Click the Dodo Payments integration card.
  4. Paste your Dodo Payments API key.
  5. 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

  1. In the Dodo Payments dashboard, go to Developer → Webhooks.
  2. Click Add endpoint.
  3. Paste your Affonso webhook URL from your Affonso program settings.
  4. Click Create endpoint.

Add Webhook Secret in Affonso

  1. In Dodo Payments, open the endpoint you created and copy its Signing secret.
  2. 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 YOUR_PUBLIC_PROGRAM_ID with your Affonso program ID and YOUR_COOKIE_DURATION with how long the referral cookie lasts.
The script:
  • Tracks affiliate visits.
  • Sets a cookie with the referral ID (affonso_referral) and exposes it as window.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

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:
  1. Create an affiliate and generate a tracking link.
  2. Visit your website through the affiliate link.
  3. Check that the Affonso script loads and sets the affonso_referral cookie.
  4. Complete a signup (optional).
  5. Complete a payment through Dodo Payments.
  6. 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

  1. Enable conversion tracking in your Dub dashboard for affiliate links.
  2. Capture the Dub click ID (dub_id cookie) when you create checkout sessions.
  3. Store the click ID in payment metadata, along with customer information.
  4. Configure the webhook integration to send sale data to Dub when payments succeed.
The integration tracks these events automatically:
  • 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

  1. Create an API key in your Dodo Payments dashboard under Developer → API Keys, with Enable write access turned on.
  2. Paste the key into Rekomi, which validates it and creates the webhook endpoint automatically.
  3. Install the Rekomi tracking script on your site so affiliate clicks are captured.
  4. Pass the referral into checkout as rekomi_ref metadata, or as the metadata_rekomi_ref payment link parameter.
The integration tracks these events automatically:
  • 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

Dub Support

Rekomi Support

Dodo Payments Support

For questions about the Dodo Payments API, see the API reference or email support@dodopayments.com.
Last modified on September 25, 2026