Hyperswitch uses Error codes, types, and messages to communicate errors during API calls. There are three types of error codes:

Error CodeTypeDescription
IRInvalid Request ErrorError caused due to invalid fields and values in API request
CEConnector ErrorErrors originating from connector’s end
HEHyperswitch ErrorErrors originating from Hyperswitch’s end
WEWebhook ErrorErrors related to Webhooks
Error CodesHTTP Status codesError TypeError messageError Handling
IR_00501server_not_availableThis API is under development and will be made available soonNo action required. If you require this feature, please reach out to Hyperswitch support
IR_01401invalid_request_errorAPI key not provided or invalid API key used. Provide the API key in the Authorization header using api-key (e.g api-key: API_KEY) or create a new API key from the dashboardProvide the API key in the Authorization header using api-key (e.g api-key: API_KEY) or create a new API key from the dashboard
IR_02404invalid_request_errorUnrecognized request URLPlease recheck and enter the correct request URL. Refer to our API documentation
IR_03405invalid_request_errorThe HTTP method is not applicable for this APIPlease recheck the HTTP method used in the request. Refer to our API documentation
IR_04400invalid_request_errorMissing required param: “field_name”Please pass the missing required parameter. Refer to our API documentation
IR_05422invalid_request_error“field_name” contains invalid data. Expected format is “expected_format”Please pass the data in the expected format. Refer to our API documentation
IR_06400invalid_request_error“message”Refer to our API documentation for required fields and format
IR_07400invalid_request_errorInvalid value provided: “field_name”Provide a valid value for the required fields in the expected format. Refer to our API documentation
IR_08400invalid_request_errorClient secret was not providedProvide the client secret received in payments/create API response
IR_09400invalid_request_errorThe client_secret provided does not match the client_secret associated with the PaymentProvide the same client secret received in payments/create API response for the corresponding payment
IR_10400invalid_request_errorCustomer has an existing mandate/subscriptionCancel the active mandates/subscriptions for the customer before proceeding to delete the customer data
IR_11400invalid_request_errorCustomer has already been redactedCustomer has already been redacted. No action required
IR_12400invalid_request_errorReached the maximum refund attemptsMaximum refund attempts reached for this payment. Please contact Hyperswitch support for attempting more refunds for the same payment
IR_13400invalid_request_errorRefund amount exceeds the payment amountPlease verify and pass a refund amount equal to or less than the payment amount
IR_14400invalid_request_errorThis Payment could not be “current_flow” because it has a “field_name” of “current_value”. The expected state is “states”Please verify the status of the payment and make sure that you are performing an action that is allowed for the current status of the payment
IR_15400invalid_request_errorInvalid Ephemeral Key for the customerPlease pass the right Ephemeral key for the customer
IR_16400invalid_request_error“message”Typically used when information involving multiple fields or previously provided information doesn’t satisfy a condition. Refer to our API documentation for required fields and format
IR_17401invalid_request_errorAccess forbidden, an invalid JWT token was usedProvide a valid JWT token to access the APIs
IR_18401invalid_request_error“message”The user is not authorised to update the customer, Contact Org. Admin for the appropriate access.
IR_19400invalid_request_error“message”Please check and retry with correct details. Refer to our API documentation
IR_20400invalid_request_error“flow” not supported by the “connector”Requested flow is not supported for this Connector.
IR_21400invalid_request_errorMissing required paramsPlease add the required params in the request. Refer to our API documentation
IR_22403invalid_request_errorAccess forbidden. Not authorized to access this “resource”Contact Org. Admin for the appropriate access.
IR_23400invalid_request_error“message”Use a supported file provider. Refer to our API documentation
IR_24422processing_errorInvalid “wallet_name” wallet tokenShare the correct wallet token.
IR_25400invalid_request_errorCannot delete the default payment methodCheck if the Payment method is activated. Refer to Control centre to check this.
IR_26400invalid_request_errorInvalid CookieRecheck the site setting for the cookies.
IR_27404invalid_request_errorExtended card info does not existRecheck the card info shared in the request.
IR_28400invalid_request_error“message”Use a valid currency. Refer to our API documentation
IR_29422invalid_request_error“message”The data format is invalid for this request. Refer to our API documentation
IR_30400invalid_request_errorMerchant connector account is configured with invalid configCorrect the config for merchant connector account
IR_31400invalid_request_errorCard with the provided iin does not existCheck the IIN (Issuer Identification Number) and ensure it is correct.
IR_32400invalid_request_errorThe provided card IIN length is invalid, please provide an iin with 6 or 8 digitsProvide a valid IIN with either 6 or 8 digits.
IR_33400invalid_request_errorFile not found / valid in the requestEnsure the required file is included in the request and is valid. Refer to our API documentation
IR_34400invalid_request_errorDispute id not found in the requestEnsure that a valid dispute ID is included in the request.
IR_35400invalid_request_errorFile purpose not found in the request or is invalidSpecify a valid file purpose in the request.
IR_36400invalid_request_errorFile content type not found / validEnsure the file content type is specified and is valid.
IR_37404invalid_request_error“message”Check the request for the resource being accessed and ensure it exists.
IR_38400invalid_request_error“message”Check for any duplicate entries in the request and correct them.
IR_39400invalid_request_errorrequired payment method is not configured or configured incorrectly for all configured connectorsVerify that the required payment method is correctly configured for all connectors in use.
CE_00Status codes shared by the connectorsconnector_error“message”The error code and message passed from the connectors. Refer to the respective connector’s documentation for more information on the error
CE_01400processing_errorPayment failed during authorization with the connector. Retry paymentRetry the payment again as payment failed at the connector during authorization
CE_02400processing_errorPayment failed during authentication with the connector. Retry paymentRetry the payment again as payment failed at the connector during authentication
CE_03400processing_errorCapture attempt failed while processing with the connectorCapture failed for the payment at the connector. Please retry the payment
CE_04400processing_errorThe card data is invalidInvalid card data passed. Please pass valid card data
CE_05400processing_errorThe card has expiredCard expired. Please pass valid card data
CE_06400processing_errorRefund failed while processing with the connector. Retry refundRefund failed to process at the connector. Please retry refund
CE_07400processing_errorVerification failed while processing with the connector. Retry operationRetry the operation again as verification failed at the connector
CE_08400processing_errorDispute operation failed while processing with connector. Retry operationRetry the operation again as dispute failed at the connector
CE_09400invalid_request_errorPayout validation failedRetry the operation again with correct Payout details.
HE_00422,500server_not_availableResource not available right now, Please try again later.Please Wait for a few moments and try again. If the error still persists, please reach out to Hyperswitch support
HE_01400,422duplicate_requestRequested operation(Customer, Payments, Merchants, Refunds etc.) for these identifier already exists.Please verify the Details(Customer, Payments, Merchants, Refunds, as applicable on the basis of request) and enter valid details.
HE_02404object_not_foundRequested object(Customer, Payments, Merchants, Refunds etc.) does not exist in our recordsPlease verify the Details(Customer, Payments, Merchants, Refunds, as applicable on the basis of request) and enter valid details.
HE_03500validation_errorValidation Failed for the requested operation with the given details.Please verify the details again and enter valid details
HE_04404object_not_foundRequested object(Customer, Payments, Merchants, Refunds etc.) does not exist in our recordsPlease verify the Details(Customer, Payments, Merchants, Refunds, as applicable on the basis of request) and enter valid details.
HE_05500processing_errorMissing or invalid tenant details.Please verify the tenant Details and try again.
WE_01400invalid_request_errorFailed to authenticate the webhookPlease verify the authentication credentials and try again.
WE_02400invalid_request_errorBad request received in webhookCheck the request parameters and format, then try again.
WE_03500router_errorThere was some issue processing the webhookPlease try again later. If the issue persists, contact Hyperswitch support.
WE_04404object_not_foundWebhook resource not foundEnsure the webhook URL is correct and the resource exists.
WE_05400invalid_request_errorUnable to process the webhook bodyEnsure the webhook body is correctly formatted and try again.
WE_06400invalid_request_errorMerchant Secret set by merchant for webhook source verification is invalidVerify the Merchant Secret, then try again.