curl --request GET \
--url https://api.paywithlocus.com/api/credits/ledger/summary \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.paywithlocus.com/api/credits/ledger/summary"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.paywithlocus.com/api/credits/ledger/summary', 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.paywithlocus.com/api/credits/ledger/summary",
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.paywithlocus.com/api/credits/ledger/summary"
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.paywithlocus.com/api/credits/ledger/summary")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.paywithlocus.com/api/credits/ledger/summary")
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{
"success": true,
"total": 123,
"byCategory": {},
"amountUsdcByCategory": {},
"appliedFilters": [
"account"
]
}Ledger row counts for a filter
Counts the rows GET /credits/ledger would page through under the same filters. Cursor pagination can report neither a total nor a per-category split, which the Activity pager and its type chips need.
curl --request GET \
--url https://api.paywithlocus.com/api/credits/ledger/summary \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.paywithlocus.com/api/credits/ledger/summary"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.paywithlocus.com/api/credits/ledger/summary', 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.paywithlocus.com/api/credits/ledger/summary",
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.paywithlocus.com/api/credits/ledger/summary"
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.paywithlocus.com/api/credits/ledger/summary")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.paywithlocus.com/api/credits/ledger/summary")
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{
"success": true,
"total": 123,
"byCategory": {},
"amountUsdcByCategory": {},
"appliedFilters": [
"account"
]
}Authorizations
Locus Pro dashboard session (Cognito).
Query Parameters
TOPUP, BURN, REFUND, CLAWBACK, FEE, ADJUSTMENT, ALLOCATION, PROMO Case-sensitive immutable ID in the tenant namespace. Prefer an identity-provider subject, not an email address.
1 - 200^[A-Za-z0-9][A-Za-z0-9._:@/-]{0,199}$Spender reference :, matching the analytics initiator identity.
Requires provider.
Equality filter on metadata.attribution., one parameter per key. Dot form only.
platform Response
Total row count, plus per-category counts and amounts
Counts keyed by ledger category; categories with no rows are absent.
Show child attributes
Show child attributes
Unsigned USDC magnitude keyed by ledger category, over the same rows (direction carries the sign). Analytics covers BURN rows only, so a refund total for the same filters comes from here.
Show child attributes
Show child attributes
Names of the narrowing query filters this server applied. An empty array means the request did not include a narrowing filter.
account, attribution, category, createdAfter, createdBefore, endpoint, externalUserId, initiator, provider, sourceKey