Errors and Troubleshooting

What each POS refunds API error means and how to fix it.

Most refund errors return HTTP 422 with errorCode: invalidRefundRequest. Read the message field to tell them apart.

Refund errors

HTTPerrorCodemessageCauseWhat to do
422invalidRefundRequestRefund currency must match original transactioncurrencyCode differs from the originalSend the original transaction's currency
422invalidRefundRequestOnly PRE_AUTHORISATION_COMPLETION, PURCHASE, MOTO or CASH_ADVANCE can be refundedThe transaction type cannot be refundedNot refundable through this API
422invalidRefundRequestOnly posted or settled POS transactions can be refundedThe transaction has not settled yetWait until it has settled, then retry. To reverse a payment on the day it was made, void it at the terminal.
422invalidRefundRequestAuthority refunds proposition service must be disabled for this merchantThe authority refunds service is onThe merchant must ask Network International to switch it off
401accessDeniedRequested refund exceeds available refundable amountAmount is more than what is left to refundLower the amount; check for earlier partial refunds
404invalidRefundRequestInvalid refund request amountThe amount is missing or invalidSend amount.value as a positive integer in minor units
200nonestatus: DECLINEDThe refund was declinedSee the note below
⚠️

Two errors have misleading messages

A refund above the refundable balance returns 401, and its localizedMessage reads "You do not have sufficient permissions". A missing amount returns 404 Not Found. Handle these by message, not by HTTP code alone.

Access and request errors

HTTPCauseWhat to do
401Access token missing, wrong or expiredRequest a new token and retry
403The API key is not linked to this merchantCheck the key belongs to the merchant in the path
404The merchant ID or transaction ID does not existCheck both IDs; search again to confirm the transaction ID
400Malformed JSON or wrong content typeValidate the body and headers
422Search date range invalid: invalidDataendDate on or after startDate, within 31 days

Common problems

ProblemLikely causeWhat to do
The search returns nothingWrong approval code, or the date range misses the paymentCheck the code against the receipt; widen the dates within 31 days
The search returns several transactionsApproval codes are not uniqueFilter by merchant ID, terminal ID, card last four digits or RRN
Every refund fails with the authority refunds errorThe merchant uses deferred refund approvalContact your relationship manager

For the eligibility rules in full, see Refund POS transactions through the API.

© Network International LLC. All Rights Reserved.