A discounted Checkout Session doesn’t prove that the right affiliate earned commission. The buyer may receive the discount while your affiliate system has no valid referral record.
For Stripe affiliate coupons, the trackable asset is the affiliate-linked promotion code, not the coupon alone. Set up the correct objects, use the right Checkout flow, then test the full payment path before you approve a payout.
How Stripe affiliate coupons work in Rewardful
Stripe uses separate objects for the discount and the code your customer enters. Mixing them up causes most attribution failures.
A Stripe coupon is not the customer code
A Stripe coupon defines the discount. It can set a percentage or fixed amount, plus a duration such as once, repeating, or forever. Review Stripe’s Coupon API when you need to confirm the coupon fields in your account.
A promotion code is the customer-facing value, such as MAYA20. It points to a coupon and can carry extra restrictions. The Stripe promotion code API shows the difference between the discount rule and the redeemable code.
Rewardful’s affiliate coupon model connects an affiliate to the promotion code used at checkout. That connection is what gives Rewardful an attribution record.
Keep these identifiers separate in your records:
- The Stripe coupon ID defines the discount terms.
- The Stripe promotion code ID identifies the redeemable code.
- The visible code is what the buyer enters.
- The Rewardful affiliate ID identifies who receives credit.
Don’t give two affiliates the same public promotion code. One redemption needs one affiliate owner.
Attribution happens when the code is redeemed
Rewardful can attribute a customer when that customer checks out with an affiliate’s promotion code. This works without a prior affiliate-link visit or a browser cookie.
A coupon applied by your backend is different. It may reduce the price correctly, but it doesn’t automatically prove that an affiliate referred the buyer. If the customer never redeems an affiliate-linked promotion code, verify the attribution result before you pay commission.
Configure the Rewardful campaign first
Set the campaign rules before you issue codes. A discount and a commission are separate settings.
Enable affiliate discounts in the campaign
Open the correct Rewardful campaign and select Edit campaign. Open Advanced settings, choose Affiliate Discounts and Promo codes, then enable affiliate discounts.
Rewardful asks you to configure the discount that affiliates can share. Its current promotion-code tracking instructions cover the same setup flow.
Set the following values with intent:
- Name the discount so your finance and support teams can identify it in Stripe.
- Choose either a percentage discount or a fixed amount.
- Select a duration of once, repeating, or forever.
- Confirm the campaign’s affiliate commission rule separately.
Rewardful creates new Stripe coupons and promotion codes for this affiliate discount flow. Record the assigned code beside the affiliate’s name before you publish it.
Start in a test campaign or a controlled affiliate group. Don’t issue hundreds of codes before a buyer has completed a verified checkout.
Keep discount terms separate from commission terms
A 20% buyer discount doesn’t mean the affiliate receives 20%. The customer discount controls what Stripe charges. The campaign commission rule controls what Rewardful credits.
Write both rules in your affiliate program terms. Include the promotion code, discount duration, commission percentage or flat amount, and refund policy.
This prevents a common dispute. An affiliate may expect lifetime commission because a buyer’s discount lasts forever. Those are separate business rules and need separate approval.
Use the right Stripe Checkout configuration
Your Checkout Session must allow the customer to redeem the affiliate promotion code. That is the cleanest path for code-based attribution.
Let the buyer enter the promotion code
For a subscription Checkout Session, your Node configuration needs mode: 'subscription', a recurring Price ID in line_items, and allow_promotion_codes: true.
The key settings look like this:
mode: 'subscription'line_items: [{ price: 'price_pro_monthly', quantity: 1 }]allow_promotion_codes: true
Stripe then shows a promotion-code field in Checkout. The buyer enters the affiliate’s code, Stripe applies the connected coupon, and Rewardful can associate the customer with the affiliate.
Use a real recurring Stripe Price ID. Don’t test with a one-time price if your live offer is a subscription. You need the same billing behavior in the test.
Don’t mix pre-applied discounts with code entry
Stripe lets you pre-apply a coupon with discounts: [{ coupon: 'coupon_...' }]. That works when you already know the discount that should apply.
However, don’t combine discounts with allow_promotion_codes: true in the same Checkout Session. Use one approach per session.
A pre-applied coupon is useful for a private offer, a customer-service adjustment, or a controlled upgrade flow. It is not the standard setup for affiliate code attribution.
For Stripe affiliate coupons, let the buyer enter the unique affiliate promotion code. That gives Stripe, Rewardful, and your support team a clear record of what happened.
What Rewardful tracks natively and what needs custom work
Rewardful handles the standard promotion-code attribution flow. Custom code is only needed when your payment flow or reporting requirements go beyond that setup.
The standard code flow needs no custom webhook
When an affiliate has an assigned promotion code and the buyer enters it at Stripe Checkout, Rewardful tracks that referral at checkout. You don’t need a cookie, a referral URL, or a custom webhook just to create the initial attribution.
Rewardful’s two-way Stripe sync can keep affiliate data, coupon codes, and transaction details aligned between the two systems. That reduces manual code management.
Still, check the real outcome. A successful sync is not proof that every affiliate code has the intended owner.
A completed Checkout Session proves payment processing. It does not prove the correct affiliate received commission.
Build custom tracking for non-standard flows
Use a custom implementation when you create promotion codes outside Rewardful, apply discounts in a custom payment page, or need a separate commission ledger in your CRM or warehouse.
Your webhook process should validate Stripe’s event signature before it reads event data. Store the Stripe event ID so retries don’t create duplicate records.
Capture checkout.session.completed for the first purchase. Use invoice.paid to reconcile recurring subscription invoices. Review refund-related events and subscription cancellations if your payout policy changes commission after refunds.
A simple internal record can store stripe_session_id, stripe_customer_id, promotion_code_id, coupon_id, rewardful_affiliate_id, campaign_id, and the event timestamp.
That record is for reconciliation. It does not make an arbitrary Stripe coupon eligible for Rewardful attribution. Your code still needs a valid, maintained mapping between the promotion code and the affiliate.
Verify how commissions behave on subscription invoices
The first payment is only one part of a subscription affiliate program. Test the discount and the commission across the billing lifecycle.
Check the discount duration on real invoices
Stripe applies coupon duration rules to billing. A one-time discount affects the first eligible charge. A repeating discount applies for its configured number of billing periods. A forever discount continues until the subscription or discount changes.
The Stripe Discount object records the actual discount application, including its start and end details. Inspect this record when the checkout price doesn’t match your expected invoice total.
Don’t assume a forever customer discount means a forever affiliate commission. Check the Rewardful campaign rule and test a renewal invoice.
Reconcile the commission amount before payout
For each test transaction, compare the gross product price, buyer discount, amount Stripe collected, Rewardful affiliate, and commission credited.
Don’t calculate the expected commission from memory. Your campaign may calculate against a different revenue basis than your finance team expects. Confirm the displayed Rewardful result against the written campaign rule.
If the amount is wrong, pause payout for that transaction. Fix the campaign setting or code mapping first. Manual commission adjustments should be the exception, not the operating process.
Test attribution from checkout to commission
Run the test as a buyer would. A dashboard-only check isn’t enough.
Run a clean first-purchase test
- Create or select one test affiliate with a known Rewardful promotion code.
- Open Checkout in a private browser window. Don’t rely on an existing referral cookie.
- Enter the affiliate’s promotion code and complete payment in your Stripe test environment.
- Confirm that Checkout displays the discount before payment.
- In Stripe, inspect the Checkout Session, customer, subscription, and first invoice.
- In Rewardful, confirm the customer belongs to the intended affiliate and that the campaign created the expected commission record.
Save the session ID, customer ID, subscription ID, invoice ID, promotion code, affiliate ID, and timestamp. These fields give support a usable trail when something fails later.
Test renewals, refunds, and exceptions
Complete a recurring invoice test if your product pays recurring commissions. Confirm whether the discount remains active and whether Rewardful credits the next invoice under your campaign rules.
Then run a controlled refund or cancellation test. Check what changes in Stripe and what changes in Rewardful before your first affiliate payout cycle.
Measure accepted affiliate transactions, not promotion-code shares or completed browser sessions. A code can be shared widely and still produce no valid paid subscription.
Keep the last trusted code-to-affiliate mapping. If a campaign setting changes, compare the new result with that approved record before you release more codes.
Build a reliable affiliate coupon process
Stripe affiliate coupons work when every promotion code has one owner, every Checkout flow accepts that code, and every commission is checked against a real Stripe payment.
Rewardful handles standard code-based attribution without a cookie or custom webhook. Custom work begins when you bypass that flow or need separate reporting controls.
The safest process is simple: configure the campaign, issue unique codes, test a clean checkout, reconcile the first invoice, then pay only verified commissions.
