Skip to content

Payment Flow

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


Payment Flow


Partner promotes your product with their unique link:

https://yoursite.com?ref=PARTNER123

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

Customer explores your site. Cookies persist for 30 days.

Attribution window: 60 days from first click.

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

Customer completes payment via Stripe.

Your checkout includes metadata:

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

Stripe sends checkout.session.completed to Affitor.

What happens:

  • Affitor receives payment confirmation
  • Reads metadata → identifies partner
  • Creates conversion record

Based on your program settings:

SettingExample
Commission rate30%
Sale amount$100
Commission$30

Affitor checks:

CheckValidation
Valid attributionPartner code exists, within window
No duplicateCustomer not already attributed
Matching programProgram ID is valid

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

During hold:

  • Commission shows as “Pending”
  • If customer refunds → commission cancelled
  • If no refund → commission clears

After hold period clears:

  • Commission moves to “Withdrawable”
  • Bi-weekly payout cycle processes
  • Partner receives funds via Bank/Wise/Stripe

Customer → Affitor checkout → Affitor collects $100
Stripe fees: -$3.20
Commission (30%): -$30
Platform fee (3.5%): -$3.50
You receive: $63.30
Hold period (14 days)
Partner receives: $30
Customer → Your checkout → You collect $100
Stripe fees: -$3.20
You keep: $96.80
Affitor tracks conversion
Weekly invoice: $33.50
(Commission $30 + Fee $3.50)
You pay invoice
Hold period (14 days)
Partner receives: $30

For recurring payments, the flow repeats each billing cycle:

Click → Signup → Subscribe $100/mo
Commission: $30
Hold: 14 days
Partner paid: $30
Subscription renews $100
Commission: $30 (if within duration)
Hold: 14 days
Partner paid: $30
Duration SettingPartner Earns On
One-timeFirst payment only
3 monthsMonths 1-3
12 monthsMonths 1-12
LifetimeAll future payments

Example (12-month duration):

  • Month 1: ✅ Commission paid
  • Month 6: ✅ Commission paid
  • Month 12: ✅ Commission paid
  • Month 13: ❌ No commission (outside duration)

When Refund HappensCommission Status
During hold periodCancelled automatically
After hold, before payoutReversed from balance
After payoutDeducted from next payout

Scenario: 30% commission, Bill Flow, 14-day hold, bi-weekly payout

DayEvent
0Customer clicks partner link
3Customer signs up (lead tracked)
7Customer purchases $100
7Conversion tracked, commission: $30
8You approve transaction
14Weekly invoice: $33.50
15You pay invoice
8-22Hold period (14 days)
22No refund → commission clears
28Bi-weekly payout cycle
30Partner receives $30

Verify your integration works end-to-end:

Test Your Integration →