List ledger entries
curl --request GET \
--url https://roughy-api-staging.fly.dev/v1/credits/history \
--header 'Authorization: Bearer <token>'import requests
url = "https://roughy-api-staging.fly.dev/v1/credits/history"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://roughy-api-staging.fly.dev/v1/credits/history', 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://roughy-api-staging.fly.dev/v1/credits/history",
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://roughy-api-staging.fly.dev/v1/credits/history"
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://roughy-api-staging.fly.dev/v1/credits/history")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://roughy-api-staging.fly.dev/v1/credits/history")
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{
"items": [
{
"created_at": "2026-05-02T08:54:52.423000Z",
"delta": 5000,
"id": "019de7e5-d517-7461-93d3-2d7d66f52f30",
"stripe_invoice_id": "in_1NjK4lLkdIwHu7ix3sR8AbCd",
"type": "topup"
},
{
"asset_id": "019de810-1a87-72cc-b8bf-f9132aa07e91",
"created_at": "2026-05-02T08:54:55.020000Z",
"delta": -1800,
"id": "019de810-1a87-72cc-b8bf-f9132aa07e91",
"type": "consume_asset"
}
],
"limit": 50,
"next_cursor": null
}{
"error": {
"code": "rate_limited",
"message": "Per-user rate limit exceeded; honour `Retry-After`."
}
}List ledger entries
Newest-first view of every credit movement (keyset cursor pagination).
GET
/
v1
/
credits
/
history
List ledger entries
curl --request GET \
--url https://roughy-api-staging.fly.dev/v1/credits/history \
--header 'Authorization: Bearer <token>'import requests
url = "https://roughy-api-staging.fly.dev/v1/credits/history"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://roughy-api-staging.fly.dev/v1/credits/history', 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://roughy-api-staging.fly.dev/v1/credits/history",
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://roughy-api-staging.fly.dev/v1/credits/history"
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://roughy-api-staging.fly.dev/v1/credits/history")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://roughy-api-staging.fly.dev/v1/credits/history")
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{
"items": [
{
"created_at": "2026-05-02T08:54:52.423000Z",
"delta": 5000,
"id": "019de7e5-d517-7461-93d3-2d7d66f52f30",
"stripe_invoice_id": "in_1NjK4lLkdIwHu7ix3sR8AbCd",
"type": "topup"
},
{
"asset_id": "019de810-1a87-72cc-b8bf-f9132aa07e91",
"created_at": "2026-05-02T08:54:55.020000Z",
"delta": -1800,
"id": "019de810-1a87-72cc-b8bf-f9132aa07e91",
"type": "consume_asset"
}
],
"limit": 50,
"next_cursor": null
}{
"error": {
"code": "rate_limited",
"message": "Per-user rate limit exceeded; honour `Retry-After`."
}
}Authorizations
Pass your API key as Authorization: Bearer sk_…. Mint a key from your dashboard's API-keys page.
Query Parameters
Maximum number of ledger entries to return (1-200). Defaults to 50.
Required range:
1 <= x <= 200Opaque continuation token from the previous page's next_cursor. Omit for the first page.
Response
One page of ledger entries, newest first.
One ledger page, newest first (keyset cursor pagination).
One page of items, ordered by this list's sort key descending. See the endpoint description for which key that is.
Show child attributes
Show child attributes
The page-size limit this response was computed with.
Opaque continuation token. Pass as cursor on the next request to fetch the following page; null means this is the last page.