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

# Reconciliation

> Match each payment, invoice and settlement with your own records, for all four use cases.

Reconciliation confirms that every order or invoice you mark as paid matches one operation recorded by Broco: the attempt you created, for the right account, with the same amount, currency and reference.

## What to match

| Use case | Broco object | Account | Your reference | Confirming event | Amount to compare | Time of the credit |
| - | - | - | - | - | - | - |
| Broco Pay | `id` (`pay_…`) | `merchant_connection` | `order_reference` | `payment.succeeded` | `amount` | `succeeded_at` |
| Cash checkout | `id` (`cpay_…`) | `merchant_connection` | `order_reference` | `cash_payment.succeeded` | `amount` | `paid_at` |
| Supplier payments | `id` (`spay_…`) | `payer_connection` | `invoice_reference` | `supplier_payment.succeeded` | `amount` | `succeeded_at` |
| Marketplace cash reconciliation | `id` (`col_…`) | `beneficiary_connection` | `order_reference` | `settlement.completed` | `settlement.gross_amount` | `settlement.settled_at` |

In every row, also compare `currency` with the currency of your order or invoice. Store the Broco object `id` when you create each attempt: a reference alone is not enough when an order has several attempts or when several merchants use the same reference.

## Gross, fees and net

Payments, cash payments and collections show the gross amount, `fee_amount` and `net_amount`, all in the same currency. `net_amount` is the amount credited to the receiving balance. Supplier payments show `amount` and `fee_amount`.

| Example | Gross | `fee_amount` | `net_amount` |
| - | - | - | - |
| Marketplace order `ORD-58213` | `5000000` (50 000 DZD) | `50000` | `4950000` |

Fee values in these guides are examples. Fees follow your agreement with Broco.

## Rules that prevent mismatches

* Mark an order or invoice as paid only from a confirming event or a status you retrieved from your server. A browser redirect is not a confirmation.
* Check that the event concerns the attempt you created, for the right account, before you update the order.
* Once an order is paid, keep it paid. A later event about an earlier attempt or an older status never makes it unpaid. Flag any contradiction for review.
* Before creating a new attempt for an order, check that no earlier attempt is still pending or has succeeded. An `Idempotency-Key` protects one request: two requests with two different keys create two attempts.
* Store each event `id`. A repeated event never means a second payment or a second credit.
* Funds are credited when Broco records a successful payment or a settlement. The event informs you afterwards, so a late event does not delay the credit.
* For marketplace orders, `collection.collected` is not a settlement. The order is settled only after `settlement.completed`.
* A collection in `deposit_under_review` is not settled. Show the gap until Broco resolves it.
* A complete deposit validated after its deadline is settled. `deposit.deposited_late: true` stays on the collection for history.

## Periodic check

Once a day, or at the end of each business day, list the orders and invoices that are still pending in your system and retrieve each object from Broco:

| Object | Operation |
| - | - |
| Payment | `GET /v1/payments/{id}` |
| Cash payment | `GET /v1/cash_payments/{id}` |
| Supplier payment | `GET /v1/supplier_payments/{id}` or `GET /v1/supplier_payments?invoice_reference=…` |
| Collection | `GET /v1/collections/{id}` |

Update your records from the status you retrieve. This catches any event your server missed.

## In Broco

Merchants, suppliers and wholesalers see each operation in their Broco history with your reference, the gross amount, the fees and the net amount.

## Next steps

<CardGroup cols={2}>
  <Card title="Events & webhooks" href="/developer/events-and-webhooks">
    Receive and verify confirming events.
  </Card>

  <Card title="Currencies & amounts" href="/developer/currencies-and-amounts">
    Write and compare amounts in minor units.
  </Card>
</CardGroup>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.