Refund a settled card payment
Return an explicit amount against an existing settled payment.
Check the original payment
Retrieve the payment under the correct merchant. Confirm settlement, refundable balance and operator permission. For an unsettled payment, use the void workflow instead. lifecycle
Request the refund
Use an explicit amount that does not exceed the remaining refundable balance. This uses the current REST endpoint. POST /api/v5/payments/<payment-id>/refund HTTP/1.1 Host: sandbox.nmi.com Authorization: <sandbox-private-merchant-key> Content-Type: application/json { "amount": 5.0 }
Update the ledger
Record the refund result and link it to the original payment. A timeout is an unknown outcome; check the transaction before trying again.
Verify the workflow
Test partial refunds, duplicate staff actions and an interrupted response with eligible test records. If your sandbox cannot supply settled records, mark refund execution unverified rather than claiming success.