Refund API Error Codes
This page documents all error codes for the Refund API (v2). These errors occur when processing refunds for payments. Each error includes the code name, HTTP status, description, recommended developer action, and notes where applicable.
Error Summary
Authorization error
| Error Title | HTTP Status | Error Message |
|---|---|---|
| FORBIDDEN | 403 | 403 FORBIDDEN. RequestId: ${x-request-id} |
Resource Not Found error
| Error Title | HTTP Status | Error Message |
|---|---|---|
| NOT_FOUND | 404 | refundId not found |
Schema validation error
Business rule violation error
Refund Payment processor error
| Error Title | HTTP Status | Error Message |
|---|---|---|
| REFUND_ERROR | 422 | Refund allocation processing failed for all records. Check individual records for error details |
RefundAllocation Payment processor error
| Error Title | HTTP Status | Error Message |
|---|---|---|
| REFUND_ERROR | NA | This payment is already refunded |
| REFUND_ERROR | NA | This payment is too old to be refunded |
| REFUND_ERROR | NA | Refund amount cannot be more than the un-refunded amount of the original payment |
| REFUND_ERROR | NA | Refund amount cannot be more than the payment amount |
| REFUND_ERROR | NA | Cannot issue refund for this payment |
| REFUND_ERROR | NA | Payment method is canceled by a customer or expired by the financial partner |
| REFUND_ERROR | NA | A previous attempt to refund this payment has failed |
| REFUND_ERROR | NA | The amount given exceeds the allowed refund limit |
| REFUND_ERROR | NA | Payment is in dispute and not available for refund |
| REFUND_ERROR | NA | Refund declined by financial partner |
| REFUND_ERROR | NA | Refund is pending due to insufficient funds and pending refund expiry window is closed |
| REFUND_ERROR | NA | Refund has failed due to loss or theft of the original card |
| REFUND_ERROR | NA | Refund failed upon the business's request |
| REFUND_ERROR | NA | Refund has failed due to an unknown reason |
Error Details
Authorization error
403 FORBIDDEN. RequestId: ${x-request-id}403
Resource Not Found error
refundId not found404
Schema validation error
source header cannot exceed 50 characters400
paymentId is required400
reason should match any one of allowed values: DUPLICATE, FRAUDULENT, REQUESTED_BY_CUSTOMER400
merchantTransactionId is required400
merchantTransactionId cannot exceed 50 characters400
metadata cannot exceed 20 entries400
metadata key cannot exceed 40 characters400
metadata value cannot exceed 100 characters400
refundAllocations[n].paymentAllocationId must be valid UUID400
refundAllocations[0].paymentMethodId must be valid UUID400
agent.firstName cannot exceed 50 characters400
agent.lastName cannot exceed 50 characters400
agent.userId cannot exceed 50 characters400
agent.userId is required400
refundId must be valid UUID400
customer.firstName cannot exceed 50 characters400
customer.lastName cannot exceed 50 characters400
customer.email must be a valid email address400
customer.email cannot exceed 120 characters400
customer.ssn must contain only digits and cannot exceed 4 characters400
customer.dateOfBirth must be a valid date in format YYYY-MM-DD400
customer.zip5 must be exactly 5 digits400
customer.phoneNumber.countryCode must contain only digits and must be 1 to 3 characters long400
customer.phoneNumber.number must contain only digits and must be 4-11 characters long400
customer.enterpriseIdentifier must contain only digits400
customer.hsid must be a valid UUID400
Business rule violation error
paymentId or refundAllocations[0].paymentMethodId is required422
Either paymentId or refundAllocations[0].paymentMethodId should be provided. The request has both paymentId and refundAllocations[0].paymentMethodId422
paymentId not found422
refundAllocations[0].paymentMethodId not found422
Credit is not allowed for bank accounts422
Maximum number of refundAllocations allowed is 2422
Maximum number of refundAllocations allowed is 1422
Invalid refundAllocations[n].amount: ${amount}. The value must be an integer ≥ 1422
Invalid refundAllocations[n].amount: ${amount}, it must be between 1 and 99999999 and not contain decimals422
refundAllocations[n].amount is required422
refundAllocations[n].paymentAllocationId is required422
A refund with this merchantTransactionId already exists. Use new merchantTransactionId422
refundAllocations[n].paymentAllocationId must be associated with the specified paymentId422
refundAllocations[].paymentAllocationId must be unique422
Refund is only permitted for a payment in COMPLETED status422
When refundAllocations[0].paymentMethodId is present, customer object must include at least one of customer.hsid, customer.enterpriseId, or customer.metadata422
Refund Payment processor error
Refund allocation processing failed for all records. Check individual records for error details422
RefundAllocation Payment processor error
Contains detailed error information explaining why a specific refundAllocation failed to process.
tip
HTTP Status Codes
- For refundAllocation-level entries, the HTTP status is shown as NA, as it is inherited from the parent
422 UNPROCESSABLE_ENTITYresponse. - refundAllocation level errors are returned under
refundAllocations[n].error.
This payment is already refundedNA
This payment is too old to be refundedNA
Refund amount cannot be more than the un-refunded amount of the original paymentNA
Refund amount cannot be more than the payment amountNA
Cannot issue refund for this paymentNA
Payment method is canceled by a customer or expired by the financial partnerNA
A previous attempt to refund this payment has failedNA
The amount given exceeds the allowed refund limitNA
Payment is in dispute and not available for refundNA
Refund declined by financial partnerNA
Refund is pending due to insufficient funds and pending refund expiry window is closedNA
Refund has failed due to loss or theft of the original cardNA
Refund failed upon the business's requestNA
Refund has failed due to an unknown reasonNA