Get customer balance
curl --request GET \
--url https://api.rigaly.com/api/v1/customers/{userId}/balance \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.rigaly.com/api/v1/customers/{userId}/balance', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.rigaly.com/api/v1/customers/{userId}/balance"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.rigaly.com/api/v1/customers/{userId}/balance",
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;
}{
"success": true,
"message": "<string>",
"data": {
"user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"balance": 5600,
"points_expire_at": "2023-11-07T05:31:56Z",
"last_visit_at": "2023-11-07T05:31:56Z"
}
}{
"success": false,
"error": {
"message": "Customer not found. Check the user_id or identifier."
}
}Customers
Get customer balance
GET
/
api
/
v1
/
customers
/
{userId}
/
balance
Get customer balance
curl --request GET \
--url https://api.rigaly.com/api/v1/customers/{userId}/balance \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.rigaly.com/api/v1/customers/{userId}/balance', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.rigaly.com/api/v1/customers/{userId}/balance"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.rigaly.com/api/v1/customers/{userId}/balance",
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;
}{
"success": true,
"message": "<string>",
"data": {
"user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"balance": 5600,
"points_expire_at": "2023-11-07T05:31:56Z",
"last_visit_at": "2023-11-07T05:31:56Z"
}
}{
"success": false,
"error": {
"message": "Customer not found. Check the user_id or identifier."
}
}Authorizations
API key from the Rigaly dashboard: Authorization: Bearer rgly_sk_...
Path Parameters
The Rigaly customer ID (from lookup or previous responses).
⌘I