# Check an expected bank payment

Compare posted transactions against dynamic expectedAmountMinor, dueAt (RFC3339), graceHours, currency, query and direction. Returns matched, not_due, not_observed or unknown. A not_observed result is a review signal, not proof of nonpayment. Unknown or stale data must not trigger a demand.

Access class: `def:read`.

## Endpoint

`POST /v1/definitions/{key}/rows/{rowId}/plaid/items/{itemId}/check-payment`

## Parameters

| Name | In | Type | Required |
| --- | --- | --- | --- |
| key | path | string | Yes |
| rowId | path | string | Yes |
| itemId | path | string | Yes |

## Request body

Content type: `application/json`.

```json
{
  "accountId": "",
  "currency": "string",
  "direction": "string",
  "dueAt": "string",
  "expectedAmountMinor": 1.5,
  "from": "string",
  "graceHours": 1.5,
  "includePending": true,
  "limit": 1,
  "lookbackDays": 1.5,
  "maxAgeHours": 1.5,
  "query": "string",
  "to": "string"
}
```

## Responses

### 201

the action's answer

Content type: `application/json`.

```json
{
  "data": {
    "bank": {
      "accounting": true,
      "connectionStatus": "string",
      "currency": "string",
      "from": "string",
      "hasNegativeBalance": true,
      "itemId": "",
      "lastSyncedAt": "2026-01-01T00:00:00Z",
      "matchedCount": 1,
      "negativeBalances": [
        "string"
      ],
      "syncPending": true,
      "to": "string",
      "totalAmountMinor": 1,
      "transactions": [
        "string"
      ],
      "truncated": true
    },
    "expectedAmountMinor": 1,
    "reason": "string",
    "status": "string"
  }
}
```

### default

a refusal: `{"error": "<what a person needs to read>"}`. 401 no credential, 402 the plan does not include this, 403 the seat does not, 404 the thing does not exist or is not yours to see.

Content type: `application/json`.

```json
{
  "error": "string"
}
```
