Affiliate Attribution from Free Trial to Paid SaaS

Keep the original referral tied to a stable customer identity through the trial, then credit a commission only after the agreed paid conversion event.

Official sources checked 30 October 2026 ยท Documentation-based guide

How do you attribute an affiliate referral after a free trial?

Short answer: Capture the affiliate referral when a prospect signs up, store the attribution against an internal user or organization ID, map that record to the billing customer and subscription, and award commission only when the agreed qualifying payment is confirmed. A trial signup and a paid conversion are different events. Treating both as commissionable without an explicit program policy creates double counting.

For SaaS teams, the difficult part is usually not the referral link. It is preserving identity across a seven or fourteen day trial, another device, a changed email address, an upgrade, or an invoice paid later than expected. A durable server-side attribution record matters more than a browser cookie surviving until checkout. See our SaaS affiliate tracking setup guide for the wider architecture.

Create an attribution record before billing begins

At registration, validate the referral token, associate it with a real affiliate and campaign, and create a server-side record keyed by your own immutable account ID. Keep the referral's original timestamp, attribution model, landing page, consent context where relevant and source event. Do not make an email address the primary key; emails can change or be shared across seats.

When the customer creates a Stripe subscription, persist the Stripe customer ID and subscription ID in a separate mapping table. A trial can begin without an immediately paid invoice. Your referral record should survive even when a user closes the browser, changes devices or signs in with SSO. Only your program's documented attribution window should determine whether the referral is still eligible.

Recommended minimum fields

FieldWhy it matters
internal_account_idStable SaaS identity across login and email changes
affiliate_id, referral_idPartner and click or invitation provenance
attributed_at, attribution_rule_versionWindow enforcement and reproducible decisions
stripe_customer_id, subscription_idConnects the account to later billing activity
first_paid_invoice_idPrevents a second signup commission on renewal
commission_statusSeparates candidate, pending, approved, reversed and paid

Use paid billing events, not trial status alone

Stripe documents customer.subscription.created, customer.subscription.updated and invoice.paid as different subscription lifecycle events. A subscription can be created while trialing; a status change alone is not proof of collected revenue. For a first-paid-invoice commission, process a verified invoice.paid event, retrieve the associated customer and subscription, and evaluate the invoice against your eligibility policy.

Some trials have zero-value invoices, promotions or credits. Decide whether a qualifying event must have positive collected revenue, exclude taxes, or meet a minimum net amount. Document the rule rather than assuming every paid-status invoice represents a new cash receipt. Stripe's subscription webhook documentation is the source for event semantics.

Suggested conversion state machine

  1. Referral captured: save affiliate and attribution window on account creation.
  2. Trial started: map billing customer and subscription IDs; no revenue commission yet.
  3. Invoice paid: verify webhook signature, match account, inspect invoice and create a pending commission if eligible.
  4. Review period: apply fraud, refund and self-referral rules before approval.
  5. Approved or reversed: settle or reverse the commission against the original invoice, with an audit trail.

Make event processing idempotent and auditable

Webhook delivery can be retried, and events may arrive in a different order than your application expects. Store the provider event ID for delivery deduplication, and enforce a unique business key such as (program_id, invoice_id, commission_type) for commission creation. These protect against different duplicate paths. Verify signatures using Stripe's documented procedure and return a successful response promptly after durable receipt, then process asynchronously.

If an invoice.paid event arrives before the account mapping has been committed, queue a retry and fetch the canonical Stripe object instead of crediting an unknown affiliate. Never assign a commission solely from an untrusted query parameter in a browser callback. See our recurring commission tracking guide for invoice-level renewal rules.

Example: a 14-day trial that converts later

On 1 November, a partner sends a prospect who creates Account A. The program uses a 30-day first-touch window. On 2 November, Account A starts a 14-day free trial. On 16 November, the first eligible invoice for $80 is paid. The policy awards 20% of qualifying net subscription revenue on the first payment, so the pending commission is $16 if all $80 is eligible. A $0 trial invoice generates no payout. A duplicate webhook generates no second $16 entry.

If the customer later receives a $20 refund and the policy prorates commissions, the finance ledger can calculate a $4 adjustment against that same original commission. The exact reversal rule must be disclosed in the affiliate agreement. This is an illustrative calculation, not a claim about Stripe or any affiliate platform's default policy.

Handle edge cases before launch

Cross-device sign-in and identity merging

Associate attribution with an authenticated account, not the last browser. When accounts merge, keep both source records and apply a documented precedence rule. Do not overwrite historical referral ownership silently.

Trials that never convert

Mark the referral as expired or unconverted after the permitted window. Preserve enough event history for support without retaining personal data longer than justified by your privacy policy.

Upgrades, cancellations and retries

Determine whether an upgrade creates incremental commission or only renewals qualify. Payment failures should not produce revenue commissions. For recovered payments, inspect the final paid invoice and ensure the same invoice has not already been credited.

Production acceptance checklist

  1. Capture a referral before account creation and validate the affiliate's status.
  2. Start a trial with no immediate charge and confirm no commission is approved.
  3. Complete the trial on another device, then pay the first invoice.
  4. Replay the same webhook twice and confirm exactly one commission.
  5. Send an invoice event before the customer mapping exists and confirm a safe retry.
  6. Apply a refund and inspect the original invoice and adjustment links.
  7. Test trial expiration, an email change, account merge and a disallowed self-referral.
  8. Reconcile approved commissions to paid invoices for a reporting period.

Frequently asked questions

Should affiliates be paid for free trial signups?

Only if the program explicitly offers a separate qualified-trial bounty. Label it separately from paid conversion commissions and apply abuse controls.

Does a Stripe trial automatically remember the affiliate?

Not by itself. Your application or affiliate platform must preserve the referral identity and connect it to the customer and subscription.

What if the paid conversion happens after the cookie expires?

A server-side attribution record can preserve the original eligible referral, subject to the program's agreed attribution window and privacy requirements.

Sources and editorial disclosure

Official documentation reviewed 30 October 2026. This is implementation guidance based on published documentation, not a report of an independently tested integration. Confirm API version, billing policy and program terms in your own sandbox.