Refund a payout
Record and reconcile money returned from an earlier disbursement or payout, with a strict link to the original funding and no duplicate cash movement.
A payout refund means all or part of previously released funding came back from its recipient or rail. It is not permission to reverse a disbursement merely because a purchase was cancelled; the returned money must be evidenced and reconciled.
Execute
The refund is the governed native command payoutRefund. A human call carries LendEasy-Case naming an open case when case management is enabled; the case links the original funding, the return evidence, and the settlement reference.
curl -X POST "$BASE/v1/loans/7204/transactions?command=payoutRefund" \
-H "Authorization: Bearer $TOKEN" \
-H "LendEasy-Tenant: demo-lender" \
-H "LendEasy-Case: case_JUN_CANCEL_3" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: jun-payout-refund-77210" \
-d '{
"transactionDate": "2026-08-24",
"transactionAmount": 1200.0,
"note": "Merchant returned funds before fulfillment; return ach-credit-return-77210 against funding 5107.",
"dateFormat": "yyyy-MM-dd",
"locale": "en"
}'
{
"officeId": 1,
"clientId": 412,
"loanId": 7204,
"resourceId": 30451,
"changes": {
"transactionDate": "2026-08-24",
"transactionAmount": 1200.0
}
}
Refund commands also accept native payment-detail fields recording how the money came back. Every execution writes a governance record, and maker-checker can park the command for a second approver.
Verify before posting
Confirm from GET /v1/loans/7204/fundings/5107 that the original payout reached POSTED, and from the loan’s transactions what has already been refunded against it. The available amount is strict:
original settled payout
− prior posted payout refunds
− payout refunds in flight
= amount available to refund
The returned amount cannot exceed this result. Derive the Idempotency-Key from the return’s source reference so a provider return event and a manual record deduplicate to one posting.
Accounting and loan effect
Product policy decides whether the refund reverses disbursed principal, leaves an unapplied credit pending purchase cancellation, or funds another explicit action. Read the posted transaction and the loan summary for the component effects.
For a fully cancelled Juniper purchase, closure still waits for the $240 down-payment disposition and any customer payments. Returning the merchant payout alone does not prove the customer has been made whole.
Partial and late returns
A partial return posts only its evidenced amount. If installments have already posted, re-read the schedule for replayed allocation and any borrower credit that results. A late return after charge-off, write-off, or contract termination routes to specialist review in the case because accounting and reporting may span periods.
Never resend on uncertainty
If a return is reported but ledger posting fails, repair the single refund post through reconciliation. If the provider outcome is ambiguous, hold the recon exception open. Do not ask the recipient or rail to return funds again from an uncertain state.
Undo
There is no undo command for a payout refund. If the returned funds were themselves reversed or re-released, record that as a new governed action with its own evidence; actual outbound money always moves through a new funding, never implicitly.