# List credit history

Source: https://checkslip.com/en/docs/list-ledger

GET `https://api.checkslip.com/api/billing/ledger`

API key

Lists every change to your credits, newest first: purchases, lookups that used a credit, lookups that did not (with the reason in free_reason) and credits that expired. Use it to answer where credits went. Covers at most 31 days per request; follow next_cursor for the next page. Needs an API key with credit:read or billing:read.

## Parameters

| Field | In | Type | Required |
| --- | --- | --- | --- |
| `cursor` | query | `string` | no |
| `limit` | query | `integer` | no |
| `reason` | query | `string` | no |
| `from` | query | `string (date-time)` | no |
| `to` | query | `string (date-time)` | no |

## Responses

### 200 `application/json`

### Possible errors

400 401 403 500

An error as Problem Details. All codes are listed at [Error codes](https://checkslip.com/en/docs/errors)

**cURL**

```bash
curl https://api.checkslip.com/api/billing/ledger \
  -H "Authorization: Bearer $CHECKSLIP_API_KEY"
```

**Node.js**

```javascript
const res = await fetch("https://api.checkslip.com/api/billing/ledger", {
  headers: {
    Authorization: `Bearer ${process.env.CHECKSLIP_API_KEY}`,
  },
});
const data = await res.json();
```

**Python**

```python
import os

import requests

res = requests.get(
    "https://api.checkslip.com/api/billing/ledger",
    headers={
        "Authorization": f"Bearer {os.environ['CHECKSLIP_API_KEY']}",
    },
)
data = res.json()
```

```json
{
  "next_cursor": "string",
  "items": [
    {
      "id": "0b6c2f5e-8a41-4d1e-9c3a-5f7e2d18a6b4",
      "delta": 1,
      "balance_after": 1,
      "expires_at_after": "2026-11-05T09:30:00+07:00",
      "reason": "TESTER_GRANT",
      "free_reason": "NOT_FOUND",
      "ref_type": "ORDER",
      "ref_id": "string",
      "created_at": "2026-11-05T09:30:00+07:00"
    }
  ]
}
```
