List customers
curl --request GET \
--url https://api.lava.so/v1/customers \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.lava.so/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://api.lava.so/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://api.lava.so/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://api.lava.so/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://api.lava.so/v1/customers")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.lava.so/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": [
{
"customer_id": "con_test_01EXAMPLE00000000000000001",
"reference_id": "usr_abc123",
"contact": {
"phone": "+14155552671",
"email": "user@example.com",
"first_name": "Jane",
"last_name": "Smith"
},
"subscription": {
"subscription_id": "<string>",
"plan_id": "<string>",
"name": "<string>"
},
"metadata": {
"plan_tier": "enterprise",
"internal_id": "12345"
},
"created_at": "2023-05-15T08:35:42Z"
}
],
"has_more": true,
"next_cursor": "<string>"
}{
"error": {
"message": "The provided cursor is invalid. Please check that you're using a cursor returned from a previous request.",
"code": "cursor_invalid_format",
"status": 400
}
}{
"error": {
"message": "Authorization header is required. Please include an 'Authorization' header with your request.",
"code": "auth_header_missing",
"status": 401
}
}{
"error": {
"message": "An internal server error occurred while processing your request.",
"code": "rest_internal_server_error",
"status": 500
}
}Customers
List customers
List all customers for the authenticated merchant with pagination support and optional filtering
GET
/
customers
List customers
curl --request GET \
--url https://api.lava.so/v1/customers \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.lava.so/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://api.lava.so/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://api.lava.so/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://api.lava.so/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://api.lava.so/v1/customers")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.lava.so/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": [
{
"customer_id": "con_test_01EXAMPLE00000000000000001",
"reference_id": "usr_abc123",
"contact": {
"phone": "+14155552671",
"email": "user@example.com",
"first_name": "Jane",
"last_name": "Smith"
},
"subscription": {
"subscription_id": "<string>",
"plan_id": "<string>",
"name": "<string>"
},
"metadata": {
"plan_tier": "enterprise",
"internal_id": "12345"
},
"created_at": "2023-05-15T08:35:42Z"
}
],
"has_more": true,
"next_cursor": "<string>"
}{
"error": {
"message": "The provided cursor is invalid. Please check that you're using a cursor returned from a previous request.",
"code": "cursor_invalid_format",
"status": 400
}
}{
"error": {
"message": "Authorization header is required. Please include an 'Authorization' header with your request.",
"code": "auth_header_missing",
"status": 401
}
}{
"error": {
"message": "An internal server error occurred while processing your request.",
"code": "rest_internal_server_error",
"status": 500
}
}Authorizations
Bearer token authentication used for standard API calls. Format: 'Bearer YOUR_API_KEY'
Query Parameters
Pagination cursor from a previous response
Maximum number of results to return (1-100)
Required range:
1 <= x <= 100⌘I