Skip to content

API Error Codes

Mohamed Osman edited this page Oct 1, 2019 · 22 revisions

The API error codes are divided into 5 types of codes:

  • 1xxx -> Authentication errors
  • 2xxx -> Validation errors
  • 3xxx -> User configuration errors
  • 4xxx -> PSP module errors
  • 5xxx -> SDK general errors

Authentication/Authorization Errors

The table below describes the authentication errors that are used for the merchant user. These errors will be returned if a user doesn't have the necessary rights for a certain operation or if the username already exists, etc.

Code Error Message Default Http Code
1000 AUTHENTICATION_ERROR Authentication error 401
1001 INSUFFICIENT_RIGHTS Authenticated user doesn't have the required rights for this operation 403
1002 NO_RIGHTS There are no roles defined for given merchant 400
1003 INCORRECT_OLD_PASSWORD Old password for given user is incorrect 400
1004 MERCHANT_USER_ALREADY_EXISTS Merchant user with given ID already exists 400
1005 MERCHANT_USER_NOT_FOUND Merchant user with given email cannot be found 400
1006 TOKEN_NOT_FOUND Password reset token does not exist 400
1007 TOKEN_EXPIRED Password reset token expired 400

Validation Errors

The table below describes the validation errors that are used for the API requests validation. These errors will be returned if a header is wrong or missing, for invalid payloads, etc.

Code Error Message Default Http Code
2000 VALIDATION_ERROR Validation error 400
2001 CONSTRAINT_VALIDATION_FAILED Validation error 400
2002 MISSING_REQUEST_HEADER Validation error 400
2003 ARGUMENT_NOT_VALID Validation error 400
2004 MESSAGE_NOT_READABLE Validation error 400
2005 MULTIPART_NOT_VALID Validation error 400
2006 ARGUMENT_TYPE_MISMATCH Validation error 400

User Configuration Errors

The table below describes the user configuration errors that are used for the merchant, the alias and the transaction APIs. These errors will be returned if a key cannot be found, for a missing or wrong PSP configuration, etc.

Code Error Message Default Http Code
3000 PUBLISHABLE_KEY_NOT_FOUND Publishable Key cannot be found 400
3001 SECRET_KEY_NOT_FOUND Secret Key cannot be found 400
3002 PSP_CONF_FOR_MERCHANT_EMPTY There are no PSP configurations defined for given merchant 400
3003 PSP_CONF_FOR_MERCHANT_NOT_FOUND PSP configuration for the given PSP-Type cannot be found from given merchant 400
3004 PSP_IMPL_NOT_FOUND PSP implementation for the given PSP-Type cannot be found 500
3005 ALIAS_NOT_FOUND Alias ID cannot be found 400
3006 WRONG_ALIAS_MERCHANT_MAPPING Alias does not map to correct merchant 400
3007 INCOMPLETE_ALIAS Given alias is incomplete, please define a payment configuration on related alias 400
3008 MERCHANT_NOT_FOUND Given merchant id cannot be found 400
3009 MERCHANT_API_KEY_EMPTY There no API KEYS defined for given merchant 400
3010 MERCHANT_API_KEY_NOT_FOUND Given merchant API key id cannot be found 400
3011 MERCHANT_ALREADY_EXISTS Merchant with given id already exists 400
3012 TRANSACTION_NOT_FOUND Given transaction id cannot be found 400
3013 TRANSACTION_ALREADY_CAPTURED Transaction was already captured, please try the refund instead 400
3014 PSP_TEST_MODE_INCONSISTENT PSP-Test-Mode for this transaction is different than the mode for the previous transaction 400
3015 ONLY_PAYPAL_ALLOWED Only PayPal registration is allowed for given PSP type 400
3016 TRANSACTION_NOT_ALLOWED Transaction operation is not allowed 400
3017 SEPA_NOT_ALLOWED SEPA is not supported for this operation 400
3018 INCORRECT_REFUND_VALUE Total refund amount is greater than the original payment's amount 400
3019 TRANSACTIONS_NOT_FOUND There are no transactions for the given filters 400
3020 EXCEEDED_MAX_TRANSACTION_SEARCH_PERIOD Maximum search span cannot exceed one year 400
3021 IDEMPOTENCY_VIOLATION Keys for idempotent requests can only be used with the same parameters they were first used with. 400
3022 DYNAMIC_CONFIG_NOT_FOUND Dynamic configuration (token, returnUrl, channel) must be supplied when using Adyen as a PSP. 400
3023 CONFIG_NOT_FOUND Required configurations for the specified payment method are not complete. 400
3024 PSP_ALIAS_NOT_FOUND PSP alias is required for this PSP. 400
3025 PSP_TRANSACTION_NOT_FOUND There is no transaction for the given PSP transaction ID and action. 400
3026 REPORT_FILTER_NOT_FOUND Given report filter name cannot be found 400

PSP Module Errors

The table below describes the PSP module errors that are used for integration with a PSP. These errors will be returned mostly because of network errors or the wrong merchant configuration.

Code Error Message Default Http Code
4000 PSP_MODULE_ERROR Unexpected PSP operation error 500

SDK General Errors

The table below describes the authentication errors that are used for the whole SDK. These errors will be returned if some unexpected internal server error happens.

Code Error Message Default Http Code
5000 SDK_GENERAL_ERROR Unexpected SDK error 500
Clone this wiki locally