إنتقل إلى المحتوى الرئيسي

List Balance Ledger

Returns cursor-paginated, append-only ledger transactions created by API keys owned by the authenticated user. Pass keyOnly=true to filter exclusively to the currently presented API key.

Each charge entry contains userId, apiKeyId, requestType, signed amount, createdAt, and balanceAfter.

GET/api/v1/ledger
Target: https://api.example.com
curl -sS -X GET "https://api.example.com/api/v1/ledger?limit=10&keyOnly=true" \
-H "x-api-key: YOUR_API_KEY" \
-H "Accept: application/json"

Query Parameters​

ParameterTypeDefaultDescription
limitinteger20Items per page (1–100).
cursorstring—Pagination cursor from nextCursor.
keyOnlybooleanfalseIf true, returns only ledger rows created by the presented API key.

Success Response (200 OK)​

{
"items": [
{
"id": "cld_mock_001",
"userId": "usr_mock_01",
"apiKeyId": "key_mock_01",
"requestType": "PRODUCT_PURCHASE",
"type": "PURCHASE",
"status": "COMPLETED",
"amount": "-12.000000",
"balanceAfter": "88.000000",
"currency": "USDT",
"referenceType": "ORDER",
"referenceId": "ord_mock_001",
"description": "Purchase: Windows 11 Pro Retail Key",
"createdAt": "2026-11-30T18:10:00.000Z"
}
],
"nextCursor": null
}

Error Responses​

HTTPerror.codeCause
400VALIDATION_ERRORInvalid query parameter
401UNAUTHORIZEDInvalid, revoked, or expired key
403FORBIDDEN / FRAUD_DETECTEDDisabled key, suspended user, or fraud block
429RATE_LIMITEDRate limit exceeded
500INTERNAL_ERRORUnexpected server error