Customers
List Customers
Retrieve a list of customers
GET
/
v1
/
customers
List customers
curl --request GET \
--url https://billing.example.com/v1/customers \
--header 'Authorization: Bearer <token>'import requests
url = "https://billing.example.com/v1/customers"
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/customers', 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/customers",
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/customers"
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/customers")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://billing.example.com/v1/customers")
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",
"email": "jsmith@example.com",
"name": "<string>",
"phone": "<string>",
"tax_id": "<string>",
"billing_address": {
"line1": "<string>",
"line2": "<string>",
"postal_code": "<string>",
"city": "<string>",
"state": "<string>",
"zip": "<string>",
"country": "<string>"
},
"ledger_account_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"gstin": "<string>",
"tax_type": "<string>",
"place_of_supply": "<string>",
"tax_exempt": true,
"tax_exemption_number": "<string>",
"tax_exemption_code": "<string>",
"tax_exemption_expires_at": "2023-12-25",
"referral_code": "<string>",
"risk_score": 50,
"risk_factors": {},
"card_brand": "<string>",
"card_last4": "<string>",
"card_exp_month": 123,
"card_exp_year": 123,
"card_token_id": "<string>",
"card_fingerprint": "<string>",
"created_at": "2023-11-07T05:31:56Z"
}
]
}{
"error": {
"code": "BAD_REQUEST",
"message": "<string>"
}
}Query Parameters
| Parameter | Type | Description |
|---|---|---|
email | string | Filter by email |
limit | integer | Max results (default: 50, capped at 1000) |
offset | integer | Pagination offset |
Example Request
curl https://api.recurso.dev/v1/customers?limit=20 \
-H "Authorization: Bearer $API_KEY"
Response
{
"object": "list",
"data": [
{
"id": "cust_abc123",
"object": "customer",
"name": "Acme Corporation",
"email": "billing@acme.com",
"created_at": "2024-01-15T10:30:00Z"
},
{
"id": "cust_def456",
"object": "customer",
"name": "TechCorp",
"email": "accounts@techcorp.com",
"created_at": "2024-01-14T09:00:00Z"
}
],
"has_more": true,
"total_count": 150
}
Authorizations
Tenant API key obtained from POST /auth/register or POST /v1/developer/keys.
Query Parameters
Free-text search filter.
Filter by ISO 3166-1 alpha-2 country code.
Filter by customer status.
Available options:
active, inactive Maximum records to return. Defaults to 50 when omitted and is capped at 1000 (a larger request returns the cap, not an error). Pass an explicit limit when you need the full set — omitting it silently returns only the first page.
Required range:
1 <= x <= 10001-based page number.
Required range:
x >= 1Response
Customers for the tenant.
Show child attributes
Show child attributes
⌘I
List customers
curl --request GET \
--url https://billing.example.com/v1/customers \
--header 'Authorization: Bearer <token>'import requests
url = "https://billing.example.com/v1/customers"
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/customers', 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/customers",
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/customers"
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/customers")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://billing.example.com/v1/customers")
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",
"email": "jsmith@example.com",
"name": "<string>",
"phone": "<string>",
"tax_id": "<string>",
"billing_address": {
"line1": "<string>",
"line2": "<string>",
"postal_code": "<string>",
"city": "<string>",
"state": "<string>",
"zip": "<string>",
"country": "<string>"
},
"ledger_account_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"gstin": "<string>",
"tax_type": "<string>",
"place_of_supply": "<string>",
"tax_exempt": true,
"tax_exemption_number": "<string>",
"tax_exemption_code": "<string>",
"tax_exemption_expires_at": "2023-12-25",
"referral_code": "<string>",
"risk_score": 50,
"risk_factors": {},
"card_brand": "<string>",
"card_last4": "<string>",
"card_exp_month": 123,
"card_exp_year": 123,
"card_token_id": "<string>",
"card_fingerprint": "<string>",
"created_at": "2023-11-07T05:31:56Z"
}
]
}{
"error": {
"code": "BAD_REQUEST",
"message": "<string>"
}
}