← View All Guides
Stripe logo
Integration Guide

How to Set Up Affiliate Commission Payouts with Stripe + GrowSurf

Automate affiliate commission payments using Stripe Connect and GrowSurf's referral tracking.

For businesses running affiliate or partner referral programs, paying commissions quickly and reliably is critical to keeping affiliates motivated. By combining GrowSurf's referral attribution with Stripe Connect, you can automate the entire commission payout process β€” from tracking referral conversions to sending money directly to your affiliates' bank accounts.

This guide covers setting up Stripe Connect for affiliate payouts, configuring GrowSurf to calculate commissions based on referred revenue, and building the automation pipeline that pays affiliates when their referrals generate revenue. You'll learn how to handle percentage-based commissions, recurring commissions, and multi-tier payout structures.

Integration Steps

Step 1: Set Up Stripe Connect for Your Platform

Stripe Connect enables you to send payments to third parties (your affiliates). You'll need to set up your platform as a Connect account and onboard affiliates as Connected Accounts.

  • Enable Stripe Connect in your Stripe Dashboard under Settings > Connect
  • Choose "Express" or "Custom" account type for affiliates
  • Configure your platform's branding for the Connect onboarding flow
  • Set up your payout schedule (instant, daily, or weekly)

Step 2: Create an Affiliate Onboarding Flow

Build a page where affiliates can sign up and connect their bank account via Stripe Connect's hosted onboarding.

  • Generate a Stripe Connect Account Link for each new affiliate
  • Redirect affiliates to Stripe's hosted onboarding to collect banking details
  • Store the Connected Account ID alongside the affiliate's GrowSurf participant ID
  • Handle the return URL to confirm successful onboarding

Step 3: Configure GrowSurf for Commission Tracking

Set up your GrowSurf campaign to track revenue from referred customers. Use GrowSurf's API to pass revenue data when a referral makes a purchase.

  • In Campaign > Rewards, configure milestone or custom rewards
  • Use GrowSurf's REST API to update participant revenue: PUT /v2/campaign/{id}/participant/{participantId}
  • Pass the purchase amount as metadata to calculate commission

Step 4: Build the Commission Calculation Engine

Create server-side logic that calculates affiliate commissions based on referred revenue. Support different commission structures like flat fees, percentages, or tiered rates.

  • Define your commission rate (e.g., 20% of first purchase, 10% recurring)
  • Listen for Stripe invoice.paid events for referred customers
  • Cross-reference the paying customer with GrowSurf's referral data
  • Calculate the commission amount and queue it for payout

Step 5: Execute Payouts via Stripe Connect Transfers

When commissions are ready, use the Stripe Transfers API to send funds to the affiliate's Connected Account.

  • Call stripe.transfers.create() with the affiliate's Connected Account ID
  • Include transfer metadata with referral details for reconciliation
  • Handle insufficient balance errors gracefully
  • Log all transfers for tax reporting (1099 requirements)

Step 6: Build a Commission Dashboard for Affiliates

Give affiliates visibility into their earnings. Use GrowSurf's participant dashboard combined with Stripe Connect's reporting.

  • Use GrowSurf's embed to show referral stats (clicks, sign-ups, conversions)
  • Query Stripe's Transfer API to show payout history
  • Display pending vs. paid commissions
  • Provide downloadable reports for tax purposes

Code Snippets

// Commission payout via Stripe Connect
const stripe = require('stripe')(process.env.STRIPE_SECRET_KEY);

// Listen for paid invoices from referred customers
app.post('/api/stripe-webhook', async (req, res) => {
  const event = req.body;

  if (event.type === 'invoice.paid') {
    const invoice = event.data.object;
    const customerEmail = invoice.customer_email;

    // Check if this customer was referred via GrowSurf
    const referralData = await fetch(
      `https://api.growsurf.com/v2/campaign/${CAMPAIGN_ID}/participant?email=${customerEmail}`,
      { headers: { 'Authorization': `Bearer ${GROWSURF_API_KEY}` } }
    ).then(r => r.json());

    if (referralData.referredBy) {
      // Get the referrer's Stripe Connect account
      const affiliate = await db.affiliates.findOne({
        growsurfId: referralData.referredBy
      });

      if (affiliate && affiliate.stripeConnectId) {
        // Calculate 20% commission
        const commission = Math.round(invoice.amount_paid * 0.20);

        // Create transfer to affiliate
        await stripe.transfers.create({
          amount: commission,
          currency: 'usd',
          destination: affiliate.stripeConnectId,
          metadata: {
            referral_id: referralData.id,
            invoice_id: invoice.id,
            source: 'growsurf_affiliate'
          }
        });
      }
    }
  }
  res.json({ received: true });
});

Tips

Implement a Minimum Payout Threshold

Set a minimum commission balance (e.g., $25) before triggering payouts to reduce transaction costs. Accumulate smaller commissions and batch them into periodic payouts using Stripe's scheduled transfers.

Track Recurring Commissions Separately

If you offer recurring commissions (e.g., 10% of every monthly payment from a referred customer), track these separately from one-time commissions. This helps with financial forecasting and makes it easier to implement commission expiry periods.

Plan for Tax Reporting

In the US, you're required to issue 1099 forms for affiliates earning over $600/year. Stripe Connect handles 1099 generation for Express and Custom accounts automatically, but make sure you're collecting the required tax information during onboarding.

FAQ

Do I need Stripe Connect, or can I use regular Stripe payouts?

You need Stripe Connect to send payments to third-party affiliates. Regular Stripe payouts only go to your own bank account. Stripe Connect Express is the easiest option β€” it handles onboarding, identity verification, and tax reporting for your affiliates.

How do I handle commission disputes or refunds?

When a referred customer refunds, listen for Stripe's charge.refunded event. You can then create a Transfer Reversal using stripe.transfers.createReversal() to claw back the commission from the affiliate's Connected Account balance.

Can I set different commission rates for different affiliates?

Yes. Store commission rates per affiliate in your database and look them up during commission calculation. You can also use GrowSurf's reward tiers to assign different reward levels based on affiliate performance or partnership tier.

Set up your refer a friend program with customer referral and affiliate program software that lowers your acquisition costs, increases customer loyalty, and saves you gobs of time.

Trusted by marketing and product teams at fast-growing B2C, fintech, and SaaS companies