When to use CSV import
Use CSV import when:- You are onboarding your first batch of agents and want to test the program before building a technical integration.
- Your SaaS does not yet have a development resource available to instrument the API.
- You need to backfill historical customers who converted before your integration was live.
- You are running a time-limited beta and do not want to build automation for a short-lived test.
CSV format
Your file must be a plain.csv (comma-separated values) file with a header row matching the column names below. Column order does not matter—Refairn matches by header name, not position.
Column reference
Preparing your file
1
Export your customer data
Pull a list of paying customers from your billing system, CRM, or database. You need at minimum: name, email, plan, payment amount, and payment date.
2
Add agent codes
For each customer, identify which agent referred them and add that agent’s referral code in the
Agent Code column. You can find each agent’s code in Agents → [Agent Name] → Profile in your Refairn dashboard. If a customer was not referred by an agent, leave the Agent Code column blank—the row will be imported as an unattributed customer.3
Format dates
Ensure all dates in
Payment Date and Renewal Date are in YYYY-MM-DD format. For example, June 14, 2026 should be 2026-06-14. Dates in other formats (MM/DD/YYYY, DD-MM-YYYY, etc.) will fail validation.4
Format amounts
Remove currency symbols and thousand-separator commas from the
Amount Paid column. Use plain numbers: 99 or 1299.50, not $99 or 1,299.50.5
Check subscription status values
The
Subscription Status column accepts only: active, cancelled, past_due, or trialing. Correct any other values before uploading.6
Save as CSV
Save or export your file as a
.csv file encoded in UTF-8. Most spreadsheet applications (Excel, Google Sheets, LibreOffice Calc) have a “Save as CSV” or “Download as .csv” option.Uploading your file
1
Navigate to the import screen
In your Refairn business dashboard, go to Customers → Import or Settings → Import. Click Upload CSV.
2
Select your file
Click Choose file and select the
.csv file you prepared. Refairn will preview the first five rows and highlight any column mapping issues.3
Review the preview
Check that Refairn has mapped each column correctly. If any column headers are unrecognized, a warning will appear—correct the header names in your file and re-upload.
4
Confirm and import
Click Import. Refairn processes the file row by row. A progress indicator shows how many rows have been processed. When complete, a summary shows how many customers were created, updated, or skipped due to errors.
What happens after upload
For each valid row in your file, Refairn:- Creates or updates a customer record using the
Customer Emailas the unique key. If the email already exists in your program, the existing record is updated rather than duplicated. - Assigns agent attribution based on the
Agent Codecolumn. If the code matches an active agent in your program, the customer is linked to that agent. - Creates a commission record using the
Amount Paidand your program’s commission rules. The commission is created inpendingstatus and moves toapprovedafter the configured hold period passes. - Sets subscription state from the
Subscription Statuscolumn. Cancelled subscriptions do not generate recurring commissions for future renewals.
Validation errors
If any rows in your file contain errors, Refairn will flag them and skip those rows. The import still processes all valid rows. After the import, download the error report to see exactly which rows failed and why.
After fixing errors in your file, re-upload only the rows that failed—rows already imported successfully will be deduplicated by email and payment date and will not create duplicate records.
Limitations
CSV import is intentionally simple, and that simplicity comes with trade-offs:- Not real-time. Agent dashboards only reflect data as of your last upload. If you import weekly, agents see a week-old view of their commissions.
- Manual effort. Someone on your team must export data, prepare the file, and upload it on a regular cadence.
- No event history. CSV import creates snapshot records. Refairn does not receive lifecycle events (upgrades, downgrades, cancellations) between imports unless you include them in each new file.
- Attribution must be known. You must identify the correct agent for each customer yourself. With API integration, attribution is captured automatically at the moment the referral link is clicked.
When to graduate to API or webhooks
Move away from CSV import when:- You have confirmed that partner-referred customers convert and retain well enough to justify automation investment.
- You have more than a handful of active agents and manual attribution is becoming error-prone.
- Agents need real-time visibility into their commission pipeline to stay motivated.
- You want Refairn to capture customer lifecycle events (upgrades, cancellations, reactivations) automatically.