Skip to main content
GET
/
api
/
public
/
v1
/
credits
/
ledger
curl -sS "https://app.opentrain.ai/api/public/v1/credits/ledger?limit=25" \
  -H "Authorization: Bearer $OT_API_TOKEN"
{
  "entries": [
    {
      "id": "<ENTRY_ID>",
      "type": "TOP_UP",
      "amountCents": 10000,
      "createdAt": "2026-06-12T10:00:00.000Z",
      "holdEntryId": null,
      "jobofferId": null,
      "contractId": null,
      "milestoneId": null,
      "topUpId": "<TOP_UP_ID>",
      "note": null
    },
    {
      "id": "<ENTRY_ID_2>",
      "type": "HOLD",
      "amountCents": -2500,
      "createdAt": "2026-06-11T15:30:00.000Z",
      "holdEntryId": null,
      "jobofferId": "<PROPOSAL_ID>",
      "contractId": "<CONTRACT_ID>",
      "milestoneId": "<MILESTONE_ID>",
      "topUpId": null,
      "note": null
    }
  ],
  "nextCursor": "<CURSOR>"
}
Lists 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

typeMeaning
TOP_UPA completed top-up added funds
HOLDFunds reserved into escrow (hire or milestone funding)
HOLD_RELEASEA hold returned to the available balance (e.g. milestone cancelled)
CAPTUREHeld funds paid out (milestone released)
REFUNDFunds returned to the account
ADJUSTMENTManual correction by OpenTrain

Request

cursor
string
Opaque cursor from a previous response’s nextCursor. Omit for the first page.
limit
integer
default:"50"
Page size, 1–100. Out-of-range values return 400.

Response

entries
object[]
nextCursor
string | null
Pass as cursor to fetch older entries; null at the end of the ledger.

Errors

StatuscodeMeaning
400BAD_REQUESTlimit outside 1–100 (details: {field: "limit"})
401UNAUTHORIZEDMissing or invalid token
403FORBIDDENMissing payments:read scope, or public_api_credits disabled
curl -sS "https://app.opentrain.ai/api/public/v1/credits/ledger?limit=25" \
  -H "Authorization: Bearer $OT_API_TOKEN"
{
  "entries": [
    {
      "id": "<ENTRY_ID>",
      "type": "TOP_UP",
      "amountCents": 10000,
      "createdAt": "2026-06-12T10:00:00.000Z",
      "holdEntryId": null,
      "jobofferId": null,
      "contractId": null,
      "milestoneId": null,
      "topUpId": "<TOP_UP_ID>",
      "note": null
    },
    {
      "id": "<ENTRY_ID_2>",
      "type": "HOLD",
      "amountCents": -2500,
      "createdAt": "2026-06-11T15:30:00.000Z",
      "holdEntryId": null,
      "jobofferId": "<PROPOSAL_ID>",
      "contractId": "<CONTRACT_ID>",
      "milestoneId": "<MILESTONE_ID>",
      "topUpId": null,
      "note": null
    }
  ],
  "nextCursor": "<CURSOR>"
}