Skip to main content

Payment sums

2026-11-15 · Not breaking · Upcoming: not yet in production

Payment sums: GET /api/v1/orders/{id}/payment-facts returns every payment fact of the order, sorted on occurredAt, recordedAt and id with each fact's allocations sorted on orderLineId, and with what they add up to.

What changed

  • authorized, captured, refunded and released in minor units in totals for the order, in unallocatedTotals for the facts without allocations, and per line in lines, which holds every line sorted on lineNumber.
  • The sums are derived from the facts at every read and never stored. A fact without allocations counts on the order only and gives every line paymentKnownPerOrderOnly: true.
  • inconsistencies on the order and on each line name money that does not add up, in this order: captured_exceeds_authorized (only on an order with an Authorized fact), refunded_exceeds_captured and released_exceeds_open_authorization; a line is judged only when the order has no unallocated fact that could belong to it. A code never changes a fact, the status or a line.
  • An unknown order gives 404 https://orderex.io/problems/order-not-found.

Affected operations

  • GET /api/v1/orders/{id}/payment-facts, new

What you do

  • Nothing, unless you want to read what the payment facts of an order add up to.