curl --request GET \
--url https://api.paywithlocus.com/api/credits/me/ledger \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.paywithlocus.com/api/credits/me/ledger"
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/me/ledger', 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/me/ledger",
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/me/ledger"
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/me/ledger")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.paywithlocus.com/api/credits/me/ledger")
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,
"entries": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"direction": "DEBIT",
"category": "<string>",
"amountUsdc": "<string>",
"amountCredits": "<string>",
"balanceAfterUsdc": "<string>",
"baseUsdc": "<string>",
"marginUsdc": "<string>",
"markupBps": 123,
"sourceKey": "<string>",
"externalReference": "<string>",
"externalUserId": "<string>",
"metadata": "<unknown>",
"createdAt": "2023-11-07T05:31:56Z"
}
],
"nextCursor": "<string>"
}Own ledger (end-user)
Returns newest-first transaction history for the end user encoded in the bearer token. The caller cannot select another externalUserId. Entries include charges, top-ups, allocations, refunds, and other posted balance movements. End-user responses redact base cost, markup, margin, tenant identifiers, and internal pricing configuration.
curl --request GET \
--url https://api.paywithlocus.com/api/credits/me/ledger \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.paywithlocus.com/api/credits/me/ledger"
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/me/ledger', 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/me/ledger",
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/me/ledger"
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/me/ledger")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.paywithlocus.com/api/credits/me/ledger")
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,
"entries": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"direction": "DEBIT",
"category": "<string>",
"amountUsdc": "<string>",
"amountCredits": "<string>",
"balanceAfterUsdc": "<string>",
"baseUsdc": "<string>",
"marginUsdc": "<string>",
"markupBps": 123,
"sourceKey": "<string>",
"externalReference": "<string>",
"externalUserId": "<string>",
"metadata": "<unknown>",
"createdAt": "2023-11-07T05:31:56Z"
}
],
"nextCursor": "<string>"
}Authorizations
60-3600 second end-user JWT minted via /credits/end-users/{id}/token. If the JWT has sid, send the original session value in X-Locus-Session-Id; sid contains only its SHA-256 fingerprint. Bearer tokens are replayable until expiry; use short TTLs, optional session binding, and Idempotency-Key on operations.
Headers
Required only when the end-user JWT carries sid. Send the original high-entropy session value; sid is its SHA-256 fingerprint. Ignored for secret-key authentication.
16 - 128^[A-Za-z0-9][A-Za-z0-9._:-]{15,127}$Query Parameters
Opaque nextCursor from the previous page.
Number of transaction-history entries to return.
1 <= x <= 200