Settle a PENDING financial transaction with the informed settlement date. Optionally accepts bankAccountId and paymentMethod: when present, the transaction is updated with the bank account and/or payment method BEFORE settling (records where the payment came from/went to); when null, the current values are kept. Optionally accepts additionAmount and discountAmount (>= 0; null means ZERO): the final settled value settledAmount = amount + additionAmount - discountAmount is stored on the transaction and used for the title write-off (amountPaid); additionAmount/discountAmount apply ONLY to the target transaction. Optionally accepts settledValue (PARTIAL settlement): when null the target settles its whole open balance (total, current behaviour); when present (> 0 and <= the open balance) it settles only that principal, accumulating paidAmount and becoming SETTLED only once the accumulated value covers the amount (otherwise it stays PENDING). settledValue applies ONLY to the target (scope siblings always settle their full open balance). The optional 'scope' field (THIS_ONLY default) controls what is settled: THIS_ONLY only the target; ALL_PENDING every PENDING transaction of the title; THIS_AND_FUTURE the target plus PENDING siblings whose dueDate is on or after the target's dueDate. Every transaction in scope is settled with the SAME settlementDate/bankAccountId/paymentMethod. The transaction becomes SETTLED (money in the account — bank movement + balance); a transaction already PAID (gateway confirmation, no movement) is PROMOTED PAID -> SETTLED without duplicating the write-off bookkeeping.
| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||