Referrals
List Referrals
Retrieve a paginated list of all referrals in your organization.
GET
/
v1
/
referrals
List referrals
curl --request GET \
--url https://billing.example.com/v1/referrals \
--header 'Authorization: Bearer <token>'import requests
url = "https://billing.example.com/v1/referrals"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://billing.example.com/v1/referrals', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://billing.example.com/v1/referrals",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://billing.example.com/v1/referrals"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://billing.example.com/v1/referrals")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://billing.example.com/v1/referrals")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"tenant_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"referrer_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"referred_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"code": "<string>",
"status": "pending",
"reward_amount": 123,
"currency": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"qualified_at": "2023-11-07T05:31:56Z"
}
],
"meta": {
"page": 123,
"per_page": 123,
"total": 123
}
}{
"error": {
"code": "validation_failed",
"message": "<string>"
}
}Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
limit | integer | No | Maximum number of referrals to return. Defaults to 10, max 100. |
offset | integer | No | Number of records to skip for pagination. Defaults to 0. |
status | string | No | Filter by referral status. One of: pending, completed, expired, canceled. |
referrer_id | string | No | Filter referrals by the referrer’s customer ID. |
Example Request
curl -X GET "https://api.recurso.dev/v1/referrals?limit=5&offset=0&status=completed" \
-H "Authorization: Bearer rsk_live_7f3a9b2c1d4e8f0a"
Response
{
"data": [
{
"id": "ref_Kp8mN2xLvQ",
"referrer_id": "d4e5f6a7-b8c9-4d0e-a1f2-b3c4d5e6f7a8",
"referred_id": "f7a8b9c0-d1e2-4f3a-b4c5-d6e7f8a9b0c1",
"reward_amount": 1000,
"currency": "USD",
"status": "completed",
"reward_credited": true,
"created_at": "2026-05-10T09:30:00Z",
"completed_at": "2026-05-15T14:22:00Z"
},
{
"id": "ref_Wn3jT9rPkM",
"referrer_id": "d4e5f6a7-b8c9-4d0e-a1f2-b3c4d5e6f7a8",
"referred_id": "a2b3c4d5-e6f7-4a8b-c9d0-e1f2a3b4c5d6",
"reward_amount": 500,
"currency": "USD",
"status": "completed",
"reward_credited": true,
"created_at": "2026-06-01T11:15:00Z",
"completed_at": "2026-06-05T08:45:00Z"
}
],
"meta": {
"page": 1,
"per_page": 5,
"total": 23,
"total_pages": 5
}
}
Notes
- Results are ordered by
created_atin descending order (newest first). - Use the
referrer_idfilter to build a referral dashboard for a specific customer. - Referrals with status
expiredare those where the referred customer did not complete a payment within the referral window (default 30 days). - The
metaobject provides pagination details to help you iterate through all results.
Combine
status=pending with referrer_id to show a customer how many of their referrals are awaiting completion.Authorizations
Tenant API key obtained from POST /auth/register or POST /v1/developer/keys.
Query Parameters
Page size (default 50, capped at 250). Also accepts page/per_page.
Required range:
x <= 250Rows to skip (overrides page-derived offset).
Required range:
x >= 01-based page number.
Required range:
x >= 1Records per page (capped at 250).
Required range:
1 <= x <= 250⌘I
List referrals
curl --request GET \
--url https://billing.example.com/v1/referrals \
--header 'Authorization: Bearer <token>'import requests
url = "https://billing.example.com/v1/referrals"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://billing.example.com/v1/referrals', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://billing.example.com/v1/referrals",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://billing.example.com/v1/referrals"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://billing.example.com/v1/referrals")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://billing.example.com/v1/referrals")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"tenant_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"referrer_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"referred_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"code": "<string>",
"status": "pending",
"reward_amount": 123,
"currency": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"qualified_at": "2023-11-07T05:31:56Z"
}
],
"meta": {
"page": 123,
"per_page": 123,
"total": 123
}
}{
"error": {
"code": "validation_failed",
"message": "<string>"
}
}