Payment Flow
This guide shows the complete journey from partner link click to commission payout.
Overview
Section titled “Overview”
Step-by-Step Flow
Section titled “Step-by-Step Flow”1. Partner Shares Link
Section titled “1. Partner Shares Link”Partner promotes your product with their unique link:
https://yoursite.com?ref=PARTNER1232. Customer Clicks
Section titled “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
Section titled “3. Customer Browses”Customer explores your site. Cookies persist for 30 days.
Attribution window: 60 days from first click.
4. Customer Signs Up (Optional)
Section titled “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
Section titled “5. Customer Purchases”Customer completes payment via Stripe.
Your checkout includes metadata:
metadata: { partner_code: 'PARTNER123', customer_code: 'cust_xyz', program_id: 'YOUR_PROGRAM_ID'}6. Webhook Fires
Section titled “6. Webhook Fires”Stripe sends checkout.session.completed to Affitor.
What happens:
- Affitor receives payment confirmation
- Reads metadata → identifies partner
- Creates conversion record
7. Commission Calculated
Section titled “7. Commission Calculated”Based on your program settings:
| Setting | Example |
|---|---|
| Commission rate | 30% |
| Sale amount | $100 |
| Commission | $30 |
8. Transaction Validated
Section titled “8. Transaction Validated”Affitor checks:
| Check | Validation |
|---|---|
| Valid attribution | Partner code exists, within window |
| No duplicate | Customer not already attributed |
| Matching program | Program ID is valid |
9. Hold Period
Section titled “9. Hold Period”Commission enters hold period (7-21 days, configurable).
During hold:
- Commission shows as “Pending”
- If customer refunds → commission cancelled
- If no refund → commission clears
10. Partner Payout
Section titled “10. Partner Payout”After hold period clears:
- Commission moves to “Withdrawable”
- Bi-weekly payout cycle processes
- Partner receives funds via Bank/Wise/Stripe
Flow by Payment Method
Section titled “Flow by Payment Method”Affitor Pay
Section titled “Affitor Pay”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: $30Bill Flow
Section titled “Bill Flow”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: $30Subscription Flow
Section titled “Subscription Flow”For recurring payments, the flow repeats each billing cycle:
Month 1 (Initial Purchase)
Section titled “Month 1 (Initial Purchase)”Click → Signup → Subscribe $100/mo ↓ Commission: $30 Hold: 14 days Partner paid: $30Month 2+ (Renewal)
Section titled “Month 2+ (Renewal)”Subscription renews $100 ↓ Commission: $30 (if within duration) Hold: 14 days Partner paid: $30Commission Duration
Section titled “Commission Duration”| Duration Setting | Partner Earns On |
|---|---|
| One-time | First payment only |
| 3 months | Months 1-3 |
| 12 months | Months 1-12 |
| Lifetime | All future payments |
Example (12-month duration):
- Month 1: ✅ Commission paid
- Month 6: ✅ Commission paid
- Month 12: ✅ Commission paid
- Month 13: ❌ No commission (outside duration)
Refund Handling
Section titled “Refund Handling”| When Refund Happens | Commission Status |
|---|---|
| During hold period | Cancelled automatically |
| After hold, before payout | Reversed from balance |
| After payout | Deducted from next payout |
Timeline Example
Section titled “Timeline Example”Scenario: 30% commission, Bill Flow, 14-day hold, bi-weekly payout
| Day | Event |
|---|---|
| 0 | Customer clicks partner link |
| 3 | Customer signs up (lead tracked) |
| 7 | Customer purchases $100 |
| 7 | Conversion tracked, commission: $30 |
| 8 | You approve transaction |
| 14 | Weekly invoice: $33.50 |
| 15 | You pay invoice |
| 8-22 | Hold period (14 days) |
| 22 | No refund → commission clears |
| 28 | Bi-weekly payout cycle |
| 30 | Partner receives $30 |
What’s Next
Section titled “What’s Next”Verify your integration works end-to-end: