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

# Reconcile payments

> Match Roqqett payments to the transactions that settled them in your bank account.

Reconciliation confirms that each Roqqett payment has actually arrived in your settlement account. Roqqett reads the account's transactions through an open banking connection and matches each completed payment and refund to the bank transaction that settled it.

<Info>
  Reconciliation is turned on by Equals. Check `reconciliation.enabled` in [Retrieve the merchant](/api-reference/merchant/retrieve-the-merchant), and speak to your account manager if it's `false`.
</Info>

## Step 1: Connect your settlement account

Give Roqqett read-only access to the settlement account through open banking. Only `APPROVED` GBP settlement accounts can be connected.

<Note>
  **POST** `/v2/roqqett/settlement-accounts/{settlementAccountId}/ob-connections`
</Note>

```bash theme={null}
curl -i -X POST \
  'https://api.equalsmoney.com/v2/roqqett/settlement-accounts/{settlementAccountId}/ob-connections?accountId=F12345' \
  -H 'Authorization: ApiKey {apiKey}'
```

Open the `connectUrl` from the response in a new window. Someone who can log in to the bank account picks the bank and gives consent there.

The settlement account's `bankConnection.status` shows the connection:

| `status` | Meaning |
| - | - |
| `NOT_CONNECTED` | No connection yet. The account you connect must have the same sort code and account number as the settlement account. |
| `CONNECTED` | Roqqett can read the account's transactions. |
| `EXPIRED` | The bank's consent has run out. Call the endpoint again to reconnect. |
| `ERROR` | The connection failed. Call the endpoint again to reconnect. |

`bankConnection.expiresAt` shows when the bank's consent ends, if the bank set an end date.

## Step 2: Review matches

| Endpoint | Returns |
| - | - |
| [List reconciliation payments](/api-reference/reconciliation/list-reconciliation-payments) | Your completed payments and refunds, each `MATCHED` or `UNMATCHED`. |
| [List reconciliation transactions](/api-reference/reconciliation/list-reconciliation-transactions) | Transactions read from your connected accounts, each `MATCHED` or `UNMATCHED`. |
| [List reconciliation matches](/api-reference/reconciliation/list-reconciliation-matches) | Each payment paired with the transaction that settled it. |

## Match a payment by hand

If Roqqett couldn't pair a payment with its transaction automatically, match them yourself. Both the payment and the transaction must be `UNMATCHED`.

<Note>
  **POST** `/v2/roqqett/reconciliation/matches`
</Note>

```bash theme={null}
curl -i -X POST \
  'https://api.equalsmoney.com/v2/roqqett/reconciliation/matches?accountId=F12345' \
  -H 'Authorization: ApiKey {apiKey}' \
  -H 'Content-Type: application/json' \
  -d '{
    "paymentId": "d3579e67-f9f5-4bd8-9e32-a043c91fea24",
    "transactionId": "{transactionId}"
  }'
```

You get `409` if either is already matched.
