CorefinityCorefinityDocs
Open the Control PanelControl Panel
Billing · 11 of 16

List the ledger

Answers the account's ledger, newest first, 50 entries a page: each hour's accrual, each invoice, payment, refund, credit applied and adjustment, with amounts to six decimal places. Paged by cursor: send next_cursor back as cursor; null means the last page.

GET/api/corestack/billing/ledger

Query parameters

accountinteger

The billing account to read, by its id (see GET /corestack/billing/account). Left out, the request acts on your company's default billing account. An account that does not exist and one that is not your company's answer the same 404. At least 1.

account_idinteger

The same as account, under the name the MCP tools use. Send one of the two: when they name different accounts the request is refused 422 invalid on account_id. At least 1.

typestring

Only entries of this type.

accrualcredit_appliedinvoicepaymentrefundadjustmentwrite_off
fromstring

Only entries at or after this moment (UTC), as a date or a date and time.

tostring

Only entries before this moment (UTC). It must be after from.

cursorstring

The next_cursor of the previous answer. Anything that is not a whole number is refused 422 on cursor.

Returns

200 A page of the ledger.

Fields of the 200 answer
next_cursorstring or nullRequired

Send as cursor to read the next page. Null on the last page.

itemsarray of objectsRequired
Fields of each item
amountobjectRequired

The entry's amount, with six decimal places.

Fields
amountstringRequired
currencystringRequired
contract_lineobject or any or nullRequired
creditobject or any or nullRequired
descriptionstringRequired
idintegerRequired

At least 1.

invoiceobject or any or nullRequired
occurred_atstring or nullRequired

Format: date-time.

periodobject or any or nullRequired
typestringRequired
accrualcredit_appliedinvoicepaymentrefundadjustmentwrite_off

If it is refused

StatusReasonWhat to do
401noneSend a valid token as Authorization: Bearer <token>.
403billing_forbiddenBilling is for the organisation's owner and billing contacts. Ask one of them to do this.
403company_unavailableYour company is unavailable.
403scope_requiredUse a token with the scope named in scope.
403two_factor_requiredTurn on two-factor on your account, then send again.
404feature_offThis feature is not on for your organisation yet.
422invalidFix the field named in field; errors says why.
429rate_limitedWait for the seconds in Retry-After.

Reasons are listed by name in Errors and refusals.

The same task elsewhere

curl https://manage.corefinity.com/api/corestack/billing/ledger \
  -H "Authorization: Bearer $COREFINITY_TOKEN" \
  -H "Accept: application/json"
{
  "items": [
    {
      "amount": {
        "amount": "720.000000",
        "currency": "GBP"
      },
      "contract_line": null,
      "credit": null,
      "description": "Invoice CF-100057",
      "id": 88410,
      "invoice": {
        "id": 8140,
        "number": "CF-100057"
      },
      "occurred_at": "2027-01-01T00:30:00Z",
      "period": null,
      "type": "invoice"
    },
    {
      "amount": {
        "amount": "720.000000",
        "currency": "GBP"
      },
      "contract_line": null,
      "credit": null,
      "description": "Invoice CF-100042",
      "id": 88403,
      "invoice": {
        "id": 8123,
        "number": "CF-100042"
      },
      "occurred_at": "2026-12-01T00:30:00Z",
      "period": null,
      "type": "invoice"
    }
  ],
  "next_cursor": null
}
Try it
Held in this tab's memory only. Never stored or sent to us.

Use a token with only the read scope. How to make one

Was this helpful?
Open in ClaudeOpen in ChatGPT