Refund a settled payment
Return funds against a payment that has already settled.
Check eligibility first
This endpoint refunds a previously settled transaction. Use a void for an eligible unsettled payment. Identify the original payment before enabling a refund action.
Explicit-amount refund
This example requests a refund of 5.00 currency units. The original settled amount must support that request. POST /api/v5/payments/<payment-id>/refund HTTP/1.1 Host: sandbox.nmi.com Authorization: <sandbox-private-key> Content-Type: application/json { "amount": 5.0 } Request shape reviewed against current documentation; no credential-backed transaction has been executed. Replace placeholders only in a controlled sandbox.
Refund parameters
Treat the zero-amount behavior as an intentional operation, never as a fallback for empty form input. Field Behavior payment_id Required original payment identifier in the URL. amount Numeric amount at or below the settled amount. A value of 0.00 requests the entire refund amount. payment Defaults to creditcard; required for ACH with value check.
Recommended operator controls
Refunds move money and should have their own authorization policy in your application. Require staff permission or a validated automated refund rule. Display the original order, payment and intended amount for review. Reject blank, malformed and accidental zero amounts before constructing the request. Record the refund reason in your application and retain the resulting gateway outcome. Check existing refunds and uncertain attempts before allowing another action.
Validation scenarios
Test a smaller refund and an intentional full refund using suitable settled sandbox records. Test an unsettled payment and an incorrect payment ID. Confirm cumulative refund limits and timing with the processor rather than inferring them from one successful request.