> ## Documentation Index
> Fetch the complete documentation index at: https://docs.4mica.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Get the checkpoint batch

> Read what a payer needs to sign its next checkpoint for a settlement cycle.

`GET /core/payers/{payer}/checkpoint-batch`

A checkpoint is a payer's signed running total of what it has paid in a cycle up to a point in time. Core asks for one after a payer holds `max_uncheckpointed` guarantees past its latest checkpoint. This endpoint returns the latest accepted checkpoint and every payment accepted since, so the payer can add them up, check the total against its own records, and sign the next one. The SDKs do this for you.

## Authorization

**Authorization** `string` *required*

`Bearer <access_token>`. The token must belong to the payer, or have the `admin` or `facilitator` role.

## Path parameters

**payer** `string` *required*

The payer's address.

## Query parameters

**asset** `string` *required*

Token address. Use the zero address for native ETH.

**cycle\_id** `string`

On-chain cycle ID, 32 bytes as hex. Omit it for the active cycle.

## Responses

**cycle\_id** `string` *required*

On-chain cycle ID.

**cycle\_id\_text** `string` *required*

**asset\_address** `string` *required*

**payer** `string` *required*

**previous** `object`

The latest accepted checkpoint, `{ payload, signature }`. `null` before the first checkpoint of the cycle.

**authorizations** `object[]` *required*

Every accepted payment request newer than `previous`, ordered by timestamp and then request ID. Each entry is `{ payload, signature }` as sent to [`POST /core/guarantees`](https://docs.4mica.io/api-reference/operator/issue-guarantee).

**max\_uncheckpointed** `number` *required*

```bash cURL theme={null}
curl "https://base.sepolia.api.4mica.io/core/payers/0x1111111111111111111111111111111111111111/checkpoint-batch?asset=0xba50Cd2A20f6DA35D788639E581bca8d0B5d4D5f" \
  -H "Authorization: Bearer $ACCESS_TOKEN"
```

```javascript title="Fetch" theme={null}
const response = await fetch("https://base.sepolia.api.4mica.io/core/payers/0x1111111111111111111111111111111111111111/checkpoint-batch?asset=0xba50Cd2A20f6DA35D788639E581bca8d0B5d4D5f", {
  headers: { Authorization: `Bearer ${process.env.ACCESS_TOKEN}` },
});
console.log(await response.json());
```

```python Python theme={null}
import os
import requests
url = "https://base.sepolia.api.4mica.io/core/payers/0x1111111111111111111111111111111111111111/checkpoint-batch?asset=0xba50Cd2A20f6DA35D788639E581bca8d0B5d4D5f"
print(requests.get(url, headers={"Authorization": f"Bearer {os.environ['ACCESS_TOKEN']}"}).json())
```

```json 200 OK theme={null}
{
  "cycle_id": "0x4444444444444444444444444444444444444444444444444444444444444444",
  "cycle_id_text": "0xba50cd2a20f6da35d788639e581bca8d0b5d4d5f:1796256000",
  "asset_address": "0xba50Cd2A20f6DA35D788639E581bca8d0B5d4D5f",
  "payer": "0x1111111111111111111111111111111111111111",
  "previous": null,
  "authorizations": [
    {
      "payload": {
        "version": "v1",
        "user_address": "0x1111111111111111111111111111111111111111",
        "recipient_address": "0x2222222222222222222222222222222222222222",
        "cycle_id": "0x4444444444444444444444444444444444444444444444444444444444444444",
        "req_id": "0x9f2c51b7a0e34d68",
        "amount": "0x186a0",
        "asset_address": "0xba50Cd2A20f6DA35D788639E581bca8d0B5d4D5f",
        "timestamp": 1796292000,
        "salt": "0x5555555555555555555555555555555555555555555555555555555555555555"
      },
      "signature": "0xPayerSignature"
    }
  ],
  "max_uncheckpointed": 64
}
```

```json 401 Unauthorized theme={null}
{ "error": "invalid access token" }
```

## Status codes

| Code | Description |
| - | - |
| `200` | The batch for the cycle. |
| `400` | An address or `cycle_id` is malformed, or the cycle does not exist or no longer accepts checkpoints. A missing `asset` is also `400`, with a plain-text body from the request parser rather than JSON. |
| `401` | The bearer token is missing or invalid, or belongs to another wallet. |
| `500` | Core could not load the batch. |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.