Record money a written-off borrower paid
Settles the debt a write-off left standing (Res. CMN 4.966 art. 49) with money the borrower paid later, in one transaction; the contract stays written off. The money first pays the written-off amount W, untaxed, and releases the write-off control by that part; what exceeds W is new revenue, taxed by PIS/COFINS (Lei 9.718 art. 3 par. 2 II). An amount above the remaining debt is refused (LENDER-0979) with remainingDebt. The recovery is dated by receivedAt, which must not be before the instant of the write-off nor the day of the latest standing recovery (LENDER-0976): recoveries are recorded in money order, so the split and the tax fall in the right month; a recovery that was reversed no longer counts, which is the way out of an out-of-order day. Keyed on X-Idempotency alone: the same key with the same amount and receivedAt replays the recovery and moves nothing; the same key with another body is refused (LENDER-0978).
Authorizations
JWT bearer token issued by the identity provider.
Headers
Idempotency key of the recovery: 1 to 255 bytes of UTF-8. The route refuses a request without it, or with a blank, longer or non-UTF-8 one (LENDER-0976). X-Request-ID is never read as the key.
Path Parameters
Written-off direct-credit loan account.
Body
Money received: a positive decimal string with at most 2 decimal places. A repeat of the same X-Idempotency key must carry the same amount and receivedAt.
"1200.00"
RFC 3339 instant the money arrived; its São Paulo day dates the entry. Not after today and not before the write-off instant.
"2027-04-15T13:00:00Z"
Response
Created
Money received (2 d.p. string).
"9000.00"
Written-off control the recovery released (2 d.p. string).
"8650.00"
ISO 4217 currency of the amounts.
"BRL"
Recorded recovery.
Written-off loan account.
RFC 3339 instant the money arrived, with fractional seconds.
RFC 3339 instant the recovery was recorded.
Subject of the validated identity that recorded it; empty when none reached the route.
Recovered by the recoveries recorded before this one (2 d.p. string).
"1200.00"
Debt still standing after this recovery (2 d.p. string).
"1400.00"
X-Idempotency key the recovery was recorded under.
PIS/COFINS booked on the taxed part; 0.00 when nothing is taxed (2 d.p. string).
"16.28"
Part above W: new revenue, taxed by PIS/COFINS (2 d.p. string).
"350.00"
Part that settles the written-off amount W first: untaxed (2 d.p. string).
"8650.00"
Write-off the recovery pays down.
RFC 3339 instant the recovery was reversed, with fractional seconds; absent while it stands. A reversed recovery no longer counts in recoveredTotal, remainingDebt or controlOpen.
Subject that reversed it.

