Blog/Stripe Setup Guide

How to Set Up an Affiliate Program for Stripe in 5 Minutes

Published May 21, 20264 min readBy AffiliateMango Team

Stripe is the gold standard for SaaS billing, but it doesn't track affiliate links out of the box. Setting up a custom referral loop can take weeks of developer work.

With AffiliateMango, you can hook into Stripe billing, attribute clicks to promoters, and start calculating commissions automatically in under 5 minutes.

Step 1: How do I connect Stripe checkout to the affiliate system?

AffiliateMango relies on a direct Stripe API integration to capture checkout events. You do not need to rewrite your billing database:

  • Stripe Connect Link: Log into your AffiliateMango dashboard, navigate to settings, and click "Connect with Stripe".
  • Automatic Hook Ingest: The system automatically configures the necessary webhooks inside your Stripe account to capture subscription occurrences.

Step 2: How do I drop the referral tracking script?

To attribute visitors to the correct promoter, drop our lightweight JavaScript tracking script into your site's header tag (usually `layout.tsx` or `index.html`):

<script 
  src="https://cdn.affiliatemango.com/track.js" 
  data-client-id="your_client_id" 
  async
></script>

This script looks for the `?ref=` URL query parameter, drops a cookie on the visitor's device, and correlates the session with Stripe checkout parameters automatically.

Step 3: How do I set commission rewards?

Configure how you want to pay out your affiliate partners. You have complete control over:

  • One-time vs. Recurring: Choose whether to pay a flat fee on the first checkout, or recurring monthly percentages.
  • Custom Tiers: Establish customized rates (e.g. 20% default, 30% for super affiliates) to incentivize top promoters.

Connect Stripe Instantly

Launch a zero-commission partner network directly integrated into your Stripe flow today.

Start 14-Day Free Trial