Skip to content
Docs
API 1.0.0 · 22 Nov 2026

Search the docs

    Română

    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.

    On this page

    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

    StatusMeaning
    open No suggestion. A person decides.
    suggested A proposal with its method and its reason, waiting for a decision.
    split A person divided the transaction into parts. The parts may cover less than the whole.
    accepted The allocations cover the transaction. This state is final.
    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 takes a suggested or split match to accepted. It needs remainder to be 0.00.
    3. splitMatch replaces the allocations with your parts and sets split. It works from open, suggested and split. The method becomes manual.
    4. bookToEntry books the whole transaction to an entry and sets accepted in one step.
    5. matchTransfer pairs the transaction with the opposite one of another account and sets accepted on both.
    6. leaveMatch sets left with a note. reopenMatch brings it back to open.
    7. dismissMatch 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

    MethodWordWhen it applies
    ruleRuleA 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.
    exactExact amount and referenceThe reference names the invoices or bills, and their open amounts add up to the amount of the transaction.
    partnerRemembered partnerEarlier 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.
    manualManualA 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.

    CodeMethodSentence
    exactexactThe amount RON 3,168.42 equals FCT-2026-00418 and the reference names it.
    exact-sumexactThe amount RON 20,804.25 equals the sum of FCT-2026-00402 and FCT-2026-00409, and the reference names them.
    partner-amountpartnerEarlier lines of this partner were matched to its documents, and the amount equals BT-2026-0502.
    partner-partialpartnerEarlier 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-feeruleYour rule books the fees of the bank to the entry Bank fees.
    rule-contractruleThe reference holds CONTRACT 8841. Your rule books this direct debit to the entry Utilities.
    rule-own-transferruleThe same amount moved the other way on your other account the same day.
    rule-settlementruleThe card acquirer paid exactly the takings POS-2026-1110.
    rule-returnruleThe bank returned the payment MV-2026-1187 PP-1002. This line reverses it.
    manualmanualMatched by a person.

    Allocations

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

    KindNamesUse
    itemopenItemIdAn invoice or a bill.
    entryentryA ledger entry, for a transaction that belongs to no invoice.
    transfertransactionIdThe opposite transaction of a transfer between your accounts.
    reversaltransactionIdThe 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:

    EntryTakesWord
    bank_feea debitBank fees
    utilitiesa debitUtilities
    vehiclea debitVehicle costs
    interesta creditInterest received
    other_debita debitOther expense
    other_credita creditOther 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 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.