# Get Lithos payouts

`GET /payments` · Lithos client API · Payments · requires the `api_key` header

Source: https://lithosprotocol.org/docs/api/get-payments

Reconstruct confirmed payouts to this client's primary miner address from the node's address index. Pagination is applied after the indexed transaction history is filtered to exact spends of the Lithos payout contract with an exact output to the primary miner address. This history is independent of the synchronization cache.

## Parameters

| Name | In | Type | Required | Description |

|---|---|---|---|---|

| `limit` | query | integer · int32 | no | The number of items in list to return |

| `offset` | query | integer · int32 | no | The offset to start the list from |

## Responses

### 200: Page of confirmed payout transactions

`PaymentTransaction[]`

- `transactionId` (string, required): Payout transaction identifier
- `payoutUTXO` (string, required): Identifier of the spent payout-contract box
- `amount` (integer · int64, required): Amount paid to the miner in nanoERG
- `score` (integer · int64): Score associated with this miner's NISP, when independently available. It cannot be recovered exactly from a rounded payout amount.
- `paymentHeight` (integer · int32, required): Inclusion height of the payout transaction
- `blockId` (string): Id of the block processed by Lithos and associated with this reward, when known from rollup state. This is not the chain block containing the payout transaction.
- `minedBlockHeight` (integer · int32): Height of the block processed by Lithos and associated with this reward, when known from rollup state.

### 400: Malformed pagination value or other invalid request

`ApiError`

- `error` (integer, required): Error code
- `reason` (string, required): Error message explaining the reason of the error
- `detail` (string, required): Detailed error description

### 403: Missing or wrong api_key

`ApiError`

- `error` (integer, required): Error code
- `reason` (string, required): Error message explaining the reason of the error
- `detail` (string, required): Detailed error description

### 404: No confirmed Lithos payouts were found for the primary miner address

`ApiError`

- `error` (integer, required): Error code
- `reason` (string, required): Error message explaining the reason of the error
- `detail` (string, required): Detailed error description

### 500: Unexpected failure while reconstructing payment history

`ApiError`

- `error` (integer, required): Error code
- `reason` (string, required): Error message explaining the reason of the error
- `detail` (string, required): Detailed error description

### 503: The indexed node is unavailable, not current, or the bounded history scan cannot fill the page

`ApiError`

- `error` (integer, required): Error code
- `reason` (string, required): Error message explaining the reason of the error
- `detail` (string, required): Detailed error description

### default: Error

`ApiError`

- `error` (integer, required): Error code
- `reason` (string, required): Error message explaining the reason of the error
- `detail` (string, required): Detailed error description

## Example request

```bash
curl -X GET "http://localhost:9000/payments" \
  -H "api_key: $LITHOS_API_KEY"
```

## Example response

```json
[
  {
    "transactionId": "c42513da4dc695dbac3fb13482b604b289c9f1d39355e2e839899ed57780d9ab",
    "payoutUTXO": "5035b2e112b4f5b873dd3444c01df1e7e697807fd84fe96790eacb128e46428d",
    "amount": 67500000000,
    "score": 5000000,
    "paymentHeight": 47832,
    "blockId": "d5bb8d6fcb179a427e21b7ad68ec9148916aac7604f75c642acc1c3e28bd4c59",
    "minedBlockHeight": 47112
  }
]
```
