Airwallex logo

Error codes

Airwallex uses conventional HTTP response codes to indicate the success or failure of an API request. Typically a response code in the 2xx range indicates response, status codes in the 4xx range indicate an error that has been triggered due to the information provided (for example; a parameter does not meet the validation requirements or was not provided), and also for an error with our servers.

HTTP response codes

HTTP Response Codes and description

CodeDescription
200OK - The request was processed successfully
201Created - The request was processed successfully
400Bad request - The request contains missing parameters, is in an incorrect shape, or failed another validation test
401Unauthorized - Please verify that the authentication token is provided and is valid
404Not found - The requested endpoint does not exist

Error response structure

When we send an error response, the body will generally contain the following fields:

NameTypeDescriptionExample
codeStringError codevalidation_error
sourceStringName of the request parameter that caused the error (This attribute is only for code validation_error)merchant_order_id
messageStringDescription of the errormerchant_order_id must be provided [40.01.02]

Response Examples

validation_error

{   
"code":"validation_error",
"source":"merchant_order_id",
"message":"merchant_order_id must be provided"
}

resource_not_found

{   
"code":"resource_not_found",
"message":"The resource with ID int_n3fXc5NDzgVE9DLx3zGhMibdSlx cannot be found"
}

service_unavailable

{   
"code":"service_unavailable",
"message":"The system is temporarily unavailable, please retry again at a later time [[54.07.01]]"
}

Error codes for 401, 404

Error Codes for HTTP Response code 401 and 404

Http response codeCodeMessage
401unauthorizedAccess denied, authentication failed
404not_foundThe requested endpoint does not exist

Error codes for 400

Error Codes for HTTP Response code 400

CodeMessage
validation_errormerchant_order_id must be provided. (e.g.)
duplicate_requestThe same request ID has already been used. Please try again with a different request ID.
resource_not_foundThe resource with ID [$resourceId] cannot be found.
resource_already_existsThe resource with ID [$resourceId] already exists.
state_invalid_for_operationCannot $operation the $resource of status $status.
service_unavailableThe system is temporarily unavailable. Please try again later. [$internalCode]
processor_unavailableThe processor is temporarily unavailable. Please try again later. [$internalCode]
processor_busyThe processor is busy. Please try again later.
processor_declinedThe processor declined this transaction.
amount_above_limitThe $operation amount is above the limit. The maximum amount you can $operation is $amount.
frequency_above_limitFailed to $operation the $resource. Frequency limit is reached. Please try again later.
transaction_blockedThe transaction is currently blocked by the fraud detection system.
payment_blockedPayment processing has been suspended by the risk monitoring system. Please contact your account manager for further information.
refund_not_allowedRefund is not allowed for this payment. Please refer to the API reference for possible reasons.
unsupported_operation_on_payment_methodThe $paymentMethod payment method does not support $operation.
capture_amount_above_limitThe capture amount $captureAmount exceeds the capturable amount $capturableAmount.
refund_amount_above_limitThe refund amount $refundAmount exceeds the refundable amount $refundableAmount.
insufficient_available_fundsFailed to process this request. The account does not have sufficient available funds.
insufficient_incoming_fundsFailed to process this request. The account does not have sufficient incoming funds.
processor_user_account_abnormalThe processor refused the request and reported the account as abnormal.
processor_refund_period_expiredThe processor refused the request since the refund period has expired.
processor_refund_offline_requiredThe processor requires this refund request to be processed offline.