Built for startups,
scaled for unicorns
Successfully submitted!
Error! Please try again
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.
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.
Build a page where affiliates can sign up and connect their bank account via Stripe Connect's hosted onboarding.
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.
PUT /v2/campaign/{id}/participant/{participantId}Create server-side logic that calculates affiliate commissions based on referred revenue. Support different commission structures like flat fees, percentages, or tiered rates.
invoice.paid events for referred customersWhen commissions are ready, use the Stripe Transfers API to send funds to the affiliate's Connected Account.
stripe.transfers.create() with the affiliate's Connected Account IDGive affiliates visibility into their earnings. Use GrowSurf's participant dashboard combined with Stripe Connect's reporting.
// 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 });
});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.
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.
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.
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.
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.
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.
Trusted by marketing and product teams at fast-growing B2C, fintech, and SaaS companies
