Payment Flow

This guide shows the complete journey from partner link click to commission payout.


Overview

Click

Cookie set when customer clicks affiliate link

Signup

Lead tracked when customer registers

Purchase

Conversion tracked when payment completes

Validation

Check rules (attribution, no duplicate, within window)

Hold

7-21 day wait period

Payout

Partner receives commission


Step-by-Step Flow

Partner promotes your product with their unique link:

https://yoursite.com?ref=PARTNER123

2. Customer Clicks

Customer clicks the link and lands on your site.

What happens:

  • Affitor tracker detects ?ref=PARTNER123
  • Sets cookies: partner_code, customer_code
  • Click event recorded

3. Customer Browses

Customer explores your site. Cookies persist for 30 days.

Attribution window: 60 days from first click.

4. Customer Signs Up (Optional)

Customer creates an account.

Your code calls:

window.affitor.trackLead({ email: 'customer@example.com' });

What happens:

  • Lead event linked to partner via customer_code
  • Partner sees: 1 click → 1 signup

5. Customer Purchases

Customer completes payment via Stripe.

Your code includes:

metadata: {
partner_code: 'PARTNER123',
customer_code: 'cust_abc',
program_id: 'YOUR_PROGRAM_ID'
}

What happens:

  • Stripe webhook fires
  • Affitor reads metadata
  • Conversion created, linked to partner

6. Validation

Affitor validates the transaction:

| Check | Description | |-------|-------------| | Valid partner | Partner code exists and is active | | No duplicate | Customer not already attributed | | Within window | Purchase within 60 days of click | | Amount valid | Payment amount matches checkout |

If validation fails: Transaction flagged for manual review.

7. Commission Calculated

Based on your program settings:

Sale: $100
Commission rate: 30%
Partner earns: $30

Platform fee: 3.5% of $100 = $3.50
You pay: $30 (commission) + $3.50 (fee) = $33.50

8. Hold Period

Commission enters hold period (7-21 days, configurable).

During hold:

  • Commission shows as "Pending"
  • Refund → Commission cancelled
  • No refund → Proceeds to payout

9. Partner Payout

After hold period clears:

  1. Commission moves to "Withdrawable"
  2. Bi-weekly payout cycle processes
  3. Partner receives funds via Bank/Wise/Stripe

Flow by Integration Method

Affitor Pay

Customer → Affitor Checkout → Payment
  ↓
Affitor receives 100%
  ↓
Validation + Approval
  ↓
Hold period (7-21 days)
  ↓
Affitor pays you (minus commission + fee)
  ↓
Partner commission → Withdrawable → Payout

Bill Flow

Customer → Your Checkout → Payment
  ↓
You receive 100% via Stripe
  ↓
Webhook → Affitor tracks
  ↓
Validation + Approval
  ↓
Affitor sends weekly invoice
  ↓
You pay invoice
  ↓
Hold period (7-21 days)
  ↓
Partner commission → Withdrawable → Payout

Example Timeline

Scenario: $100 sale, 30% commission, Bill Flow, 14-day hold

| Day | Event | Your Balance | Partner Balance | |-----|-------|--------------|-----------------| | 0 | Customer clicks affiliate link | — | — | | 5 | Customer purchases ($100) | +$100 | Pending: $30 | | 5 | Transaction validated | — | Pending: $30 | | 12 | Affitor sends invoice ($33.50) | — | Pending: $30 | | 13 | You pay invoice | -$33.50 | Pending: $30 | | 19 | Hold period ends | — | Withdrawable: $30 | | 28 | Bi-weekly payout | — | Paid: $30 |

Net result:

  • You received: $100 - $33.50 = $66.50
  • Partner received: $30
  • Affitor received: $3.50 (platform fee)

Recurring Payments

For subscriptions with recurring commission:

| Month | Customer Pays | Partner Earns | |-------|---------------|---------------| | 1 | $100 | $30 | | 2 | $100 | $30 | | 3 | $100 | $30 | | ... | ... | ... | | 12 | $100 | $30 |

Total partner earnings: $360 over 12 months (with 12-month commission duration)


Edge Cases

Customer Refunds

| When | What happens | |------|--------------| | During hold period | Commission cancelled automatically | | After hold, before payout | Reversed from partner balance | | After payout | Deducted from next payout |

Multiple Clicks

If customer clicks multiple partner links:

  • Last click wins
  • Previous attribution overwritten
  • Only final partner gets credit

Attribution Expires

If customer purchases after 60 days:

  • No partner attribution
  • Sale counted as organic
  • No commission generated

Next Steps