What to match
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.
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-Keyprotects 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.collectedis not a settlement. The order is settled only aftersettlement.completed. - A collection in
deposit_under_reviewis not settled. Show the gap until Broco resolves it. - A complete deposit validated after its deadline is settled.
deposit.deposited_late: truestays 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:
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
Events & webhooks
Receive and verify confirming events.
Currencies & amounts
Write and compare amounts in minor units.