# List payments

`GET https://evohub.io/api/v1/billing/payments`

Part of the [Billing API](https://docs.evohub.io/billing.md) reference · operationId `listPayments`.

Everything charged to the organization, newest first: credit bundles
bought (`bundle`), monthly usage bills that raised money (`usage`),
and early-termination charges for a commitment (`commitment_clawback`).
A month covered entirely by the free allowance is not a payment and
is not listed.

Requires the `billing:payment:read` scope.

## Authorization

Any one of:

- `bearerKey`
- `headerKey`

Where:

- `bearerKey`: HTTP Bearer — An EvoHub API key (`evohub_…`) as a bearer token.
- `headerKey`: API key in the header `X-API-Key` — An EvoHub API key (`evohub_…`).

## Responses

### 200 — The payments.

Content type: `application/json`

Type: `object`

- `data` (object)
  - `payments` (array of Payment)
    - `kind` (string, one of `bundle`, `usage`, `commitment_clawback`)
    - `at` (string (date-time))
    - `usd` (number)
    - `ehu` (number): EHU bought, for a bundle. Left out otherwise.
    - `period` (string): The month a usage bill covers, `YYYY-MM`. Left out otherwise.
    - `status` (string): `paid` for a bundle, `invoiced` for an early-termination charge, the statement's `charge_status` for a usage bill.
    - `invoice_url` (string (uri))
    - `receipt_url` (string (uri))

### 401 — No API key was sent, or it is unknown, revoked or expired (`UNAUTHORIZED`).

Content type: `application/json`

Type: `Error`

- `error` (object, required)
  - `code` (string, required, example `STATEMENT_NOT_FOUND`)
  - `message` (string, required, example `No statement for that period.`)
  - `request_id` (string)

### 403 — The key lacks the scope this endpoint needs (`FORBIDDEN`).

Content type: `application/json`

Type: `Error`

- `error` (object, required)
  - `code` (string, required, example `STATEMENT_NOT_FOUND`)
  - `message` (string, required, example `No statement for that period.`)
  - `request_id` (string)

### 429 — Too many requests (`RATE_LIMITED`). Wait for `Retry-After` seconds.

Headers:

- `Retry-After` (integer): Seconds to wait before retrying.

Content type: `application/json`

Type: `Error`

- `error` (object, required)
  - `code` (string, required, example `STATEMENT_NOT_FOUND`)
  - `message` (string, required, example `No statement for that period.`)
  - `request_id` (string)

### 500 — Payments could not be loaded (`PAYMENTS_UNAVAILABLE`). Retry later.

Content type: `application/json`

Type: `Error`

- `error` (object, required)
  - `code` (string, required, example `STATEMENT_NOT_FOUND`)
  - `message` (string, required, example `No statement for that period.`)
  - `request_id` (string)

## Example request

```bash
curl -X GET 'https://evohub.io/api/v1/billing/payments' \
  -H 'Authorization: Bearer <TOKEN>'
```
