Guides / 1:N matching

1:N matching: one bank credit, many transactions

1:N matching ties one bank credit to the many transactions it pays out. Add up the transactions in the batch, check that the sum equals the credit, and check that the dates are close. If more than one batch fits the same credit, a good matcher flags it. It does not guess.

Published 2026-11-19. The example is made up. What the engine does is described from its code and tests; 1:N in the paid app is Paid · in development.

One credit, five transactions

A payment provider, a marketplace or a card acquirer does not pay you per sale. It pays you per batch. Your bank shows one credit. Your ledger shows every sale and refund in the batch. The credit equals the sum of the rows. That is a 1:N match: one row on the bank side, N rows on the ledger side.

Here is one batch, with made-up numbers. The amounts are net of fees, in EUR.

Ledger rows for batch B-1182. Made-up data.
RowDateTypeNet amount
ch_019 NovSale1,164.90
ch_029 NovSale436.65
ch_0310 NovSale86.89
ch_0411 NovSale903.16
re_0111 NovRefund−160.00
Sum of 5 rowslatest: 11 Nov2,431.60
Bank statement. Made-up data.
RowDateDescriptionAmount
bk_0113 NovSETTLEMENT B-11822,431.60

No ledger row equals the credit, so 1:1 matching finds nothing. The sum of the five rows is 2,431.60, to the cent, and the credit is booked two days after the latest row. That is the match.

The two tests: a sum and a date window

  1. Sum. Add the amounts of the rows in the group. Compare the total with the single row, in the same currency. Use whole minor units (cents), never decimals, so the sum is exact. Use the net amount if the credit is paid net of fees.
  2. Date window. Compare the group's latest date with the single row's date. Say the window is 3 days. 11 Nov to 13 Nov is 2 days, so it fits.

The group has to be defined first. Each ledger row needs the same batch or payout id, such as B-1182. Rows with no id are not grouped. If the bank row also carries that id, only that group is tried against it.

When rows fit more than one way

Say batch B-1183 also adds up to 2,431.60 and ends on 11 Nov. The bank shows one credit of 2,431.60. Both batches fit that credit. Nothing in the amounts or dates says which is right.

The engine does not pick one. It marks all the rows involved as an exception with the reason ambiguous, and you decide. This is a rule of the engine, not a setting: ambiguous means exception. A wrong guess here moves real money between the wrong two items, and nobody notices until the audit.

The same goes the other way. If two bank credits of 2,431.60 land in the window and one batch fits both, all three are flagged.

If the sum is off by a little

You can allow a small amount tolerance, for example 0.02 for rounding. A tolerance also widens the set of rows that fit, so it makes more ambiguous cases. Keep it small.

If a group and a bank row share the same id but the sum differs, there is no match. The engine flags both with the reason amount differs and the difference. A missing refund is the usual cause. Here, leaving out re_01 gives a sum of 2,591.60, which is 160.00 more than the credit.

What you can do today

Paid · in development. 1:N matching is in the paid app, which is in private beta. It is not available yet. The matching engine has a group pass that sums rows with the same group id and matches the sum to one row, and it is tested. The free matcher does not offer it, and the paid app's screens for it are being built.

The free matcher at try.milyo.app matches one row to one row. It does a key pass (equal references) and a fallback pass (same amount, dates within a window). It runs in your browser and nothing is uploaded. For a 1:N case, do the grouping first:

  1. In your spreadsheet, add up the ledger rows by batch id. In Excel or Google Sheets that is SUMIFS on the net amount, with the batch id as the criterion.
  2. Keep one row per batch: the batch id, the total, and the latest date.
  3. Load that file as File A and the bank statement as File B. Each batch is now one row, and the free matcher does the 1:1 match.

Stripe makes the first step easier. Its payout reconciliation report has a Summary with one row per payout, and an Itemized file with every charge, refund and fee. The Stripe payouts guide has the steps.

Questions

What is 1:N matching?

1:N matching ties one row on one side to several rows on the other side. The usual case is one bank credit that pays out many card or marketplace transactions.

What happens when rows fit more than one way?

Milyo flags every row involved as an exception and never picks one. You decide, using the dates or references.

Can the free matcher do 1:N matching?

No. The free matcher matches one row to one row. 1:N matching is in the paid app, which is in development and in private beta.

Try the 1:1 match on this month's payouts. No account. Your files stay in your browser.

Open the free matcher

Related guides