DEVELOPER DOCUMENTATION
List Credit Ledger
Page through the credit transaction history: top-ups, escrow holds, hold releases, captures, refunds, and adjustments.
/api/public/v1/credits/ledgerLists every credit ledger entry on your account, newest first, with cursor pagination. Each entry links the related top-up, proposal, contract, or milestone so you can reconcile balance changes against the actions that caused them.
amountCents is signed: positive entries add to the available balance, negative entries draw from it. Accounts that have never used credits get an empty page (not a 404).
Requirements: payments:read scope + the public_api_credits feature. Works pre-claim.
Entry types
Section titled “Entry types”type | Meaning |
|---|---|
TOP_UP | A completed top-up added funds |
HOLD | Funds reserved into escrow (hire or milestone funding) |
HOLD_RELEASE | A hold returned to the available balance (e.g. milestone cancelled) |
CAPTURE | Held funds paid out (milestone released) |
REFUND | Funds returned to the account |
ADJUSTMENT | Manual correction by OpenTrain |
Request
Section titled “Request”cursorstringqueryOpaque cursor from a previous response’s nextCursor. Omit for the first page.
limitintegerquery50Page size, 1–100. Out-of-range values return 400.
Response
Section titled “Response”entriesobject[]nextCursorstring | nullPass as cursor to fetch older entries; null at the end of the ledger.
Errors
Section titled “Errors”| Status | code | Meaning |
|---|---|---|
400 | BAD_REQUEST | limit outside 1–100 (details: {field: "limit"}) |
401 | UNAUTHORIZED | Missing or invalid token |
403 | FORBIDDEN | Missing payments:read scope, or public_api_credits disabled |