CorefinityCorefinityDocs
Open the Control PanelControl Panel
Billing · 7 of 16

List invoices

Answers the account's invoices, newest first, with total counting every invoice the filters choose; an invoice's lines are filled only with with=lines. Paged by cursor: send next_cursor back as cursor; null means the last page.

GET/api/corestack/billing/invoices

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.

statusstring

Only invoices with one of these statuses, as a comma list: open, collecting, paid, unpaid, void, refunded, written_off.

withstring

lines fills each invoice's lines.

lines
limitinteger

Items a page. Defaults to 25. 1 to 100.

cursorstring

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

overduestring

1 for only the invoices still to be paid whose due day has passed.

01truefalse
issued_fromstring

Only invoices issued on or after this day, as YYYY-MM-DD. Format: date.

issued_tostring

Only invoices issued on or before this day, as YYYY-MM-DD. Format: date.

searchstring

Only invoices whose number contains this text. Up to 100 characters.

Returns

200 A page of invoices.

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
accountobjectRequired
Fields
companyobjectRequired
Fields
idintegerRequired

At least 1.

namestringRequired
idintegerRequired

At least 1.

amount_dueobjectRequired
Fields
amountstringRequired
currencystringRequired
credit_notesarray of objectsRequired
Fields of each item
amountobjectRequired
Fields
amountstringRequired
currencystringRequired
kindstringRequired

What the credit note is for, such as applied_credit or refund.

numberstringRequired

The credit note's number, as GET /corestack/billing/invoices/{invoice}/credit-notes/{number}/pdf takes it.

pdf_hrefstring or nullRequired

The credit note's PDF for a browser that is signed in to the Control Panel, as a path; null until the PDF exists. With a token, download it from GET /corestack/billing/invoices/{invoice}/credit-notes/{number}/pdf.

credit_tax_amountobjectRequired

The VAT on the credits applied.

Fields
amountstringRequired
currencystringRequired
creditsarray of objectsRequired

The credits applied to the invoice.

Fields of each item
amountobjectRequired
Fields
amountstringRequired
currencystringRequired
creditobjectRequired
Fields
idintegerRequired

At least 1.

public_notestringRequired
credits_appliedobjectRequired
Fields
amountstringRequired
currencystringRequired
currencystringRequired
due_atstring or nullRequired

Format: date-time.

idintegerRequired

At least 1.

issued_atstring or nullRequired

Format: date-time.

linesarray of objectsRequired

The invoice's lines. In a list they are filled only with with=lines.

Fields of each item
amountobjectRequired
Fields
amountstringRequired
currencystringRequired
contract_lineobject or any or nullRequired
descriptionstringRequired
idintegerRequired

At least 1.

periodobject or any or nullRequired
quantitystringRequired

The quantity, a number as text.

unitstring or nullRequired
unit_priceobjectRequired

The price of one unit, with six decimal places.

Fields
amountstringRequired
currencystringRequired
next_collection_atstring or nullRequired

When the next automatic collection is booked, for an invoice that is open or unpaid. null when none is. Format: date-time.

numberstringRequired
paid_atstring or nullRequired

Format: date-time.

payment_terms_daysintegerRequired
paymentsarray of objectsRequired
Fields of each item
attemptobjectRequired

One attempt to collect an invoice.

Fields
action_urlstring or null

With action_required, where the cardholder confirms the payment.

amountobjectRequired
Fields
amountstringRequired
currencystringRequired
attempt_nointegerRequired
failureobject or any or nullRequired
idintegerRequired

At least 1.

mandateobject or any or nullRequired
methodobject or any or nullRequired
providerstringRequired

How the payment was made. bank_transfer is a transfer Corefinity recorded.

refundedobject or any or nullRequired

What was refunded of it, or null.

scheduled_forstring or nullRequired

Format: date-time.

settled_atstring or nullRequired

Format: date-time.

started_atstring or nullRequired

Format: date-time.

statestringRequired
pendingaction_requiredcollectingsucceededfailedcancelledrefundedpartially_refundedreversed
pdfobjectRequired
Fields
availablebooleanRequired

Whether the invoice's PDF can be downloaded.

periodobject or any or nullRequired
statusstringRequired
opencollectingpaidunpaidvoidrefundedwritten_off
status_labelstringRequired

The status as the Control Panel writes it.

subtotalobjectRequired
Fields
amountstringRequired
currencystringRequired
taxobjectRequired
Fields
amountobjectRequired
Fields
amountstringRequired
currencystringRequired
kindstringRequired
standardreverse_chargezerooutside_scope
notestring or nullRequired

The basis in a sentence, when VAT is not charged at the standard rate.

rate_percentnumberRequired
totalobjectRequired
Fields
amountstringRequired
currencystringRequired
totalintegerRequired

How many invoices the filters choose, whatever the page.

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/invoices \
  -H "Authorization: Bearer $COREFINITY_TOKEN" \
  -H "Accept: application/json"
{
  "items": [
    {
      "account": {
        "company": {
          "id": 1180,
          "name": "Northwind Digital"
        },
        "id": 3107
      },
      "amount_due": {
        "amount": "720.00",
        "currency": "GBP"
      },
      "credit_notes": [],
      "credit_tax_amount": {
        "amount": "0.00",
        "currency": "GBP"
      },
      "credits": [],
      "credits_applied": {
        "amount": "0.00",
        "currency": "GBP"
      },
      "currency": "GBP",
      "due_at": "2027-01-15T00:30:00Z",
      "id": 8140,
      "issued_at": "2027-01-01T00:30:00Z",
      "lines": [
        {
          "amount": {
            "amount": "600.00",
            "currency": "GBP"
          },
          "contract_line": {
            "id": 9001,
            "kind": "package",
            "label": "CC8 · Northwind UK 1"
          },
          "description": "CC8 · Northwind UK 1",
          "id": 61020,
          "period": {
            "end": "2027-01-01T00:00:00Z",
            "start": "2026-12-01T00:00:00Z"
          },
          "quantity": "744",
          "unit": "hour",
          "unit_price": {
            "amount": "0.806452",
            "currency": "GBP"
          }
        }
      ],
      "next_collection_at": null,
      "number": "CF-100057",
      "paid_at": null,
      "payment_terms_days": 14,
      "payments": [],
      "pdf": {
        "available": false
      },
      "period": {
        "end": "2027-01-01T00:00:00Z",
        "start": "2026-12-01T00:00:00Z"
      },
      "status": "open",
      "status_label": "Open",
      "subtotal": {
        "amount": "600.00",
        "currency": "GBP"
      },
      "tax": {
        "amount": {
          "amount": "120.00",
          "currency": "GBP"
        },
        "kind": "standard",
        "note": null,
        "rate_percent": 20
      },
      "total": {
        "amount": "720.00",
        "currency": "GBP"
      }
    },
    {
      "account": {
        "company": {
          "id": 1180,
          "name": "Northwind Digital"
        },
        "id": 3107
      },
      "amount_due": {
        "amount": "660.00",
        "currency": "GBP"
      },
      "credit_notes": [
        {
          "amount": {
            "amount": "50.00",
            "currency": "GBP"
          },
          "kind": "applied_credit",
          "number": "CN-CF-100042",
          "pdf_href": "/billing/invoices/8123/credit-notes/CN-CF-100042/pdf"
        }
      ],
      "credit_tax_amount": {
        "amount": "10.00",
        "currency": "GBP"
      },
      "credits": [
        {
          "amount": {
            "amount": "50.00",
            "currency": "GBP"
          },
          "credit": {
            "id": 310,
            "public_note": "Welcome credit"
          }
        }
      ],
      "credits_applied": {
        "amount": "50.00",
        "currency": "GBP"
      },
      "currency": "GBP",
      "due_at": "2026-12-01T00:30:00Z",
      "id": 8123,
      "issued_at": "2026-12-01T00:30:00Z",
      "lines": [
        {
          "amount": {
            "amount": "600.00",
            "currency": "GBP"
          },
          "contract_line": {
            "id": 9001,
            "kind": "package",
            "label": "CC8 · Northwind UK 1"
          },
          "description": "CC8 · Northwind UK 1",
          "id": 61020,
          "period": {
            "end": "2026-12-01T00:00:00Z",
            "start": "2026-11-01T00:00:00Z"
          },
          "quantity": "720",
          "unit": "hour",
          "unit_price": {
            "amount": "0.833333",
            "currency": "GBP"
          }
        }
      ],
      "next_collection_at": null,
      "number": "CF-100042",
      "paid_at": "2026-12-01T00:31:12Z",
      "payment_terms_days": 0,
      "payments": [
        {
          "attempt": {
            "amount": {
              "amount": "660.00",
              "currency": "GBP"
            },
            "attempt_no": 1,
            "failure": null,
            "id": 7731,
            "mandate": null,
            "method": {
              "added_at": "2026-11-01T09:05:00Z",
              "brand": "visa",
              "exp_month": 12,
              "exp_year": 2030,
              "id": 4410,
              "kind": "card",
              "label": null,
              "last4": "4242",
              "provider": "stripe",
              "role": "primary",
              "state": "active",
              "wallet": null
            },
            "provider": "stripe",
            "refunded": null,
            "scheduled_for": null,
            "settled_at": "2026-12-01T00:31:12Z",
            "started_at": "2026-12-01T00:31:00Z",
            "state": "succeeded"
          }
        }
      ],
      "pdf": {
        "available": true
      },
      "period": {
        "end": "2026-12-01T00:00:00Z",
        "start": "2026-11-01T00:00:00Z"
      },
      "status": "paid",
      "status_label": "Paid",
      "subtotal": {
        "amount": "600.00",
        "currency": "GBP"
      },
      "tax": {
        "amount": {
          "amount": "120.00",
          "currency": "GBP"
        },
        "kind": "standard",
        "note": null,
        "rate_percent": 20
      },
      "total": {
        "amount": "720.00",
        "currency": "GBP"
      }
    }
  ],
  "next_cursor": null,
  "total": 2
}
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