Return a settlement surplus to the account holder
Moves a pix_manual surplus from the blocking account back to the account holder. Use it when a pix_manual settlement paid the payer less than the lock held and the surplus did not go back to the holder: the lock was closed manually, or the surplus return of a settlement confirmation answered without surplus_midaz_tx_id. That answer does not prove that the surplus stayed blocked, because a ledger timeout can have moved it. Before you call, search the ledger for a transaction whose metadata carries the lock_id and an origin of balance-lock-surplus, balance-lock-group-surplus or balance-lock-surplus-recovery. Call only when none exists.
The lock must be SETTLED: a SETTLING lock with a surplus is refused with 409 (PIX-0653), so confirm the settlement first. X-Actor-Id and X-Override-Reason are required. The call is idempotent: a lock with no surplus, or whose surplus was already returned, answers 200 with surplus_amount 0. After a 5xx that returns no surplus_midaz_tx_id, the surplus can have moved: check the ledger before you retry. For a group settlement, call it once for each lock_id. Pix Lerian records every call in the audit trail.
Encabezados
REQUIRED. Client-supplied replay key, at most 64 bytes. A request without it is refused with PIX-0030 @ 400 before the handler runs. An identical resend within 1 hour returns the original response, status included, with X-Idempotency-Replayed: true. Reusing the key with a divergent method, URL or body is PIX-0031 @ 412.
1 - 64Parámetros de ruta
Respuesta
OK

