---
title: "Match methods and reasons | Docs | Treasury by R&D Copilot"
description: "How Treasury matches a booked transaction to invoices, bills and entries: the five states, the four methods, the reason codes and the rules of allocations."
canonical: "https://banking.rdcopilot.com/docs/concepts/match-methods-and-reasons/"
language: en
updated: 2026-11-22
---

# Match methods and reasons

How Treasury matches a booked transaction to invoices, bills and entries: the five states, the four methods, the reason codes and the rules of allocations.

Every booked transaction has one match. The match says what the transaction belongs to: which invoices or bills, which ledger entry, or which line of another account of yours. It has a `state`, a `method`, a `reason` and a list of `allocations`. A pending transaction has no match to work with.

## States

| Status | Meaning |
| --- | --- |
| No match `open` | No suggestion. A person decides. |
| Suggested `suggested` | A proposal with its `method` and its `reason`, waiting for a decision. |
| Being split `split` | A person divided the transaction into parts. The parts may cover less than the whole. |
| Matched `accepted` | The allocations cover the transaction. This state is final. |
| Left `left` | Put aside with a note until you reopen it. It still counts in `linesLeft`. |

## How a match moves

1.  The import sets `suggested` on every new booked transaction that has a proposal, and leaves `open` on the others.
2.  [acceptMatch](https://banking.rdcopilot.com/docs/api-reference/matches/#accept-match) takes a `suggested` or `split` match to `accepted`. It needs `remainder` to be `0.00`.
3.  [splitMatch](https://banking.rdcopilot.com/docs/api-reference/matches/#split-match) replaces the allocations with your parts and sets `split`. It works from `open`, `suggested` and `split`. The method becomes `manual`.
4.  [bookToEntry](https://banking.rdcopilot.com/docs/api-reference/matches/#book-to-entry) books the whole transaction to an entry and sets `accepted` in one step.
5.  [matchTransfer](https://banking.rdcopilot.com/docs/api-reference/matches/#match-transfer) pairs the transaction with the opposite one of another account and sets `accepted` on both.
6.  [leaveMatch](https://banking.rdcopilot.com/docs/api-reference/matches/#leave-match) sets `left` with a note. [reopenMatch](https://banking.rdcopilot.com/docs/api-reference/matches/#reopen-match) brings it back to `open`.
7.  [dismissMatch](https://banking.rdcopilot.com/docs/api-reference/matches/#dismiss-match) drops a `suggested` or `split` match back to `open`.
8.  `accepted` is final. A later change is refused with `already_matched`. A payment the bank returns is a new transaction that reverses the first.

## The four methods

| Method | Word | When it applies |
| --- | --- | --- |
| `rule` | Rule | A rule of your company or a fixed rule applies: a fee, a direct debit named by a rule, a transfer between your accounts, the settlement of card takings, a return. |
| `exact` | Exact amount and reference | The reference names the invoices or bills, and their open amounts add up to the amount of the transaction. |
| `partner` | Remembered partner | Earlier transactions of the same partner were matched to its documents, and the amount fits one of them, or part of the one the reference names. |
| `manual` | Manual | A person split the transaction, booked it to an entry or matched a transfer. |

For a booked transaction the product tries these checks in order and the first that fits makes the suggestion:

1.  A line that returns a payment gets a reversal of that payment (`rule`).
2.  A fee goes to the entry `bank_fee` (`rule`).
3.  A direct debit whose reference holds the text of a rule of your company goes to the entry of that rule (`rule`).
4.  A transfer to or from another account of yours is paired with the opposite booked transaction of that account (`rule`). Both transactions carry the suggestion. Without an opposite transaction there is no suggestion.
5.  A card line with no partner goes to the one takings document of the company whose open amount equals it (`rule`).
6.  The reference names invoices or bills by their number, or by the serial of the number when it has at least three digits, and their open amounts add up to the amount (`exact`). A credit looks at invoices you issued, a debit at bills you received.
7.  For a partner that is remembered, one open document of that partner with the same amount (`partner`), or one named document that the amount pays in part (`partner`).
8.  Otherwise the match stays `open`.

## Reasons

`reason.code` is stable: branch on it. `reason.text` is one English sentence for people and can change. The table shows each code with the sentence of a real transaction of the account.

| Code | Method | Sentence |
| --- | --- | --- |
| `exact` | `exact` | The amount RON 3,168.42 equals FCT-2026-00418 and the reference names it. |
| `exact-sum` | `exact` | The amount RON 20,804.25 equals the sum of FCT-2026-00402 and FCT-2026-00409, and the reference names them. |
| `partner-amount` | `partner` | Earlier lines of this partner were matched to its documents, and the amount equals BT-2026-0502. |
| `partner-partial` | `partner` | Earlier lines of this partner were matched to its documents. The reference names FCT-2026-00396 and the amount is less than what it still owes, so it is paid in part. |
| `rule-fee` | `rule` | Your rule books the fees of the bank to the entry Bank fees. |
| `rule-contract` | `rule` | The reference holds CONTRACT 8841. Your rule books this direct debit to the entry Utilities. |
| `rule-own-transfer` | `rule` | The same amount moved the other way on your other account the same day. |
| `rule-settlement` | `rule` | The card acquirer paid exactly the takings POS-2026-1110. |
| `rule-return` | `rule` | The bank returned the payment MV-2026-1187 PP-1002. This line reverses it. |
| `manual` | `manual` | Matched by a person. |

## Allocations

An allocation (`allocation`) says how much of the transaction goes where. `kind` is one of four values.

| Kind | Names | Use |
| --- | --- | --- |
| `item` | `openItemId` | An invoice or a bill. |
| `entry` | `entry` | A ledger entry, for a transaction that belongs to no invoice. |
| `transfer` | `transactionId` | The opposite transaction of a transfer between your accounts. |
| `reversal` | `transactionId` | The payment a return reverses. |

`remainder` is the part of the transaction that the allocations do not cover yet. The entries and the direction each takes:

| Entry | Takes | Word |
| --- | --- | --- |
| `bank_fee` | a debit | Bank fees |
| `utilities` | a debit | Utilities |
| `vehicle` | a debit | Vehicle costs |
| `interest` | a credit | Interest received |
| `other_debit` | a debit | Other expense |
| `other_credit` | a credit | Other income |

These rules hold for every match:

-   The parts add up to the transaction to accept it (`allocation_mismatch`). A split may cover less, and the parts never exceed the transaction (`allocation_exceeds_line`).
-   No invoice or bill gets more than it still owes (`open_item_exceeded`).
-   A suggestion claims its amount on the document. What other transactions claim counts against what the document still owes, so two suggestions never claim the same money.
-   A credit matches invoices you issued and a debit matches bills you received (`wrong_side`).
-   An entry fits the sign of the transaction (`entry_wrong_side`).
-   A split holds `item` and `entry` parts only (`allocation_kind`). Transfers and reversals have their own operations.

## Transfers between your accounts

A transfer shows as a debit on one account and a credit of the same amount on the other. The two transactions are accepted together: accepting one accepts both. [matchTransfer](https://banking.rdcopilot.com/docs/api-reference/matches/#match-transfer) refuses two transactions of the same account (`transfer_same_account`), amounts that are not equal and opposite (`transfer_mismatch`), and a counterpart that is already matched or not yet booked (`transfer_unavailable`).

## A return

A line that returns a payment gets a `reversal` allocation that points at the payment line, with the reason `rule-return`. When you accept it, the payment no longer counts against the bill, and the bill owes its amount again. You can then prepare a new payment for it. See [Handle a returned payment](https://banking.rdcopilot.com/docs/guides/handle-a-returned-payment/).
