Documentation Index Fetch the complete documentation index at: https://docs.partnero.com/llms.txt
Use this file to discover all available pages before exploring further.
Overview
Customer referrals allow your existing customers to become advocates for your product. Each customer gets a unique referral link they can share with friends.
Setting Up Customer Referrals
Step 1: Create a Referral Program
Go to Programs → Create Program
Select Referral Program
Configure basic settings
Step 2: Define Rewards
Configure what customers earn for successful referrals:
Add credits to the customer’s account balance. {
"reward_type" : "credit" ,
"amount" : 10 ,
"currency" : "USD"
}
Provide discount codes for future purchases. {
"reward_type" : "discount" ,
"amount" : 20 ,
"unit" : "percentage"
}
Pay customers directly via PayPal or Wise. {
"reward_type" : "cash" ,
"amount" : 25 ,
"currency" : "USD"
}
Step 3: Set Triggers
Define when rewards are granted:
Trigger Description signup When referred friend creates an account purchase When referred friend makes first purchase subscription When referred friend subscribes
Creating Customers
Customers are created when they sign up for your product. Sync them with Partnero:
Automatic Sync (Recommended)
Use integrations to sync customers automatically:
API Sync
Create customers via the API:
curl -X POST https://api.partnero.com/v1/customers \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"email": "[email protected] ",
"name": "Jane Doe",
"key": "cust_123"
}'
JavaScript SDK
Create customers from your frontend:
po ( 'createCustomer' , {
email: '[email protected] ' ,
name: 'Jane Doe' ,
key: 'cust_123'
});
Customer Referral Links
Each customer automatically receives a referral link:
{
"customer" : {
"key" : "cust_123" ,
"referral_code" : "JANE20" ,
"referral_url" : "https://yoursite.com/?ref=JANE20"
}
}
Get Customer’s Referral Link
curl -X GET https://api.partnero.com/v1/customers/cust_123/referral_links \
-H "Authorization: Bearer YOUR_API_KEY"
Create Custom Referral Link
curl -X POST https://api.partnero.com/v1/customer_referral_links \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"customer_key": "cust_123",
"destination_url": "https://yoursite.com/signup"
}'
Displaying Referral Info
Get Customer Stats
Retrieve referral statistics to display in your app:
curl -X GET https://api.partnero.com/v1/customers/cust_123/stats \
-H "Authorization: Bearer YOUR_API_KEY"
Response:
{
"total_referrals" : 5 ,
"successful_referrals" : 3 ,
"pending_referrals" : 2 ,
"total_rewards" : 30.00 ,
"currency" : "USD"
}
Get Customer Balance
curl -X GET https://api.partnero.com/v1/customers/cust_123/balance \
-H "Authorization: Bearer YOUR_API_KEY"
Response:
{
"balance" : 45.00 ,
"currency" : "USD" ,
"pending" : 10.00
}
Add a referral widget to your customer dashboard:
< div id = "referral-widget" ></ div >
< script >
po ( 'renderReferralWidget' , {
container: '#referral-widget' ,
customer_key: 'cust_123' ,
theme: 'light' ,
show_stats: true
});
</ script >
Managing Customers
List Customers
curl -X GET https://api.partnero.com/v1/customers \
-H "Authorization: Bearer YOUR_API_KEY"
Update Customer
curl -X PUT https://api.partnero.com/v1/customers/cust_123 \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Jane Smith",
"metadata": {"plan": "premium"}
}'
Credit Customer Balance
Add credits to a customer’s account:
curl -X POST https://api.partnero.com/v1/customers/cust_123/balance/credit \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"amount": 10,
"currency": "USD",
"note": "Referral bonus"
}'
Next Steps
Refer-a-Friend Set up refer-a-friend campaigns
Customers API Full customers API reference