Openpay always returns JSON objects in the service responses, so when there is an error you will get the following error object.
Error Object
Field
Type
Description
category
string
General category.
- request: It means an error caused by data sent by the customer. For example, an invalid request, an attempt of a transaction without funds or a transfer to an account that does not exist.
- internal: It means an error on the Openpay side, this will occur very rarely.
- gateway: It means an error during the transaction of funds from one card to the Openpay account or from the to a bank account or card.
error_code
numeric
This is the Openpay error code.
description
string
The error details.
http_code
string
HTTP error code from the response.
request_id
string
Request identifier
Example:
{
"category" : "request",
"description" : "The customer with id 'm4hqp35pswl02mmc567' does not exist",
"http_code" : 404,
"error_code" : 1005,
"request_id" : "1981cdb8-19cb-4bad-8256-e95d58bc035c"
}
Error Codes
General
Code
HTTP Error
Message
Cause
1000
500 Internal Server Error
Internal server error, contact support
An error happened in the internal Openpay server.
1001
400 Bad Request
Bad Request
The request is not JSON valid format, the fields don’t have the correct format, or the request doesn’t have the required fields.
1002
401 Unauthorized
The api key or merchant id are invalid
The request is not authenticated or is incorrect.
1003
422 Unprocessable Entity
Parameters look valid but request failed
The operation couldn’t be processed because one or more parameters are incorrect.
1004
503 Service Unavailable
The resource is unavailable at this moment. Please try again later
A required service is not available.
1005
404 Not Found
The requested resource doesn't exist
A required resource doesn’t exist.
1006
409 Conflict
The order_id has already been processed
There is already a transaction with the same ID order.
1007
402 Payment Required
Operation rejected by processor
The funds transfer between the bank account or card and the Openpay account was rejected.
1008
423 Locked
The account is inactive
One of the required accounts is deactivated.
1009
413 Request Entity too large
The request is too large
The request body is too large.
1010
403 Forbidden
Method not allowed for public API key, use private key instead
The public key is being used to make a request that requires the private key, or the private key is being using from Javascript.
1011
404 Not Found
The resource was previously deleted
The resource was previously deleted.
1012
412 Precondition failed
The transaction amount exceeds your allowed transaction limit
The transaction amount is out of the limits.
1013
412 Precondition failed
The operation is not allowed on the resource
The operation is not allowed on the resource.
1014
401 Unauthorized
Your account is inactive, please contact to soporte@openpay.mx for more information
The account is inactive.
1015
504 Gateway timeout
Could not get any response from gateway. Please try again later
Could not get any response from gateway.
1016
409 Conflict
The merchant email has been already processed
The merchant email has been already processed.
1017
502 Bad Gateway
The payment gateway is not available at the moment, please try again later
The payment gateway is not available at the moment, please try again later.
1018
402 Payment Required
The number of retries of charge is greater than allowed
The number of retries of charge is greater than allowed.
1020
400 Bad Request
The number of decimal digits is not valid for this currency
The number of decimal digits is not valid for this currency.
1023
412 Precondition failed
The transactions included in your package have been completed. To contract another package contact support@openpay.mx
The transactions included in your package have been completed. To contract another package contact support@openpay.mx
1024
412 Precondition failed
The transaction amount exceeds your allowed transaction limit by TPV
The transaction amount exceeds your allowed transaction limit by TPV
1025
412 Precondition failed
The CoDi transactions contracted in your plan have been blocked
The CoDi transactions contracted in your plan have been blocked.
Storage
Code
HTTP Error
Message
Cause
2001
409 Conflict
The bank account already exists
The bank account already exists.
2003
409 Conflict
The external_id already exists
The external_id already exists.
Cards
Code
HTTP Error
Message
Cause
2004
422 Unprocessable Entity
The card number verification digit is invalid
The card number is invalid.
2005
400 Bad Request
The expiration date has expired
The expiration date has expired.
2006
400 Bad Request
The CVV2 security code is required
The CVV2 security code is required.
2007
412 Precondition Failed
The card number is only valid in sandbox
The card number is only valid in sandbox.
2008
412 Precondition Failed
The card is not valid for points
The card is not valid for points.
2009
412 Precondition Failed
The CVV2 security code is invalid
The CVV2 security code is invalid.
2010
402 Payment Required
3D Secure authentication failed
3D Secure authentication failed.
2011
422 Unprocessable Entity
Card product type not supported
Card product type not supported.
3001
402 Payment Required
The card was declined by the bank
The card was declined by the bank.
3002
402 Payment Required
The card has expired
Card is expired.
3003
402 Payment Required
The card doesn't have sufficient funds
Card has not enough funds.
3004
402 Payment Required
The card was reported as stolen
Card has been flagged as stolen.
3005
402 Payment Required
Fraud risk detected by anti-fraud system --- Found in blacklist
Fraud risk detected by anti-fraud system
—
Found in blacklist.
3006
412 Precondition Failed
Request not allowed
The operation is not allowed for this customer or transaction.
3009
402 Payment Required
The card was reported as lost
Card has been flagged as lost.
3010
402 Payment Required
The bank has restricted the card
The card has been restricted by the bank.
3011
402 Payment Required
The bank has requested the card to be retained
The bank has requested to hold this card. Please contact the bank.
3012
412 Precondition Failed
Bank authorization is required for this charge
Bank authorization is required to make this payment.
3201
412 Precondition Failed
Merchant not authorized to use payment plan
Merchant not authorized to use promotions.
3203
412 Precondition Failed
Invalid promotion for such card type
Invalid promotion for such card type.
3204
412 Precondition Failed
Transaction amount is less than minimum for promotion
Transaction amount is less than minimum for promotion.
3205
412 Precondition Failed
Promotion not allowed
Promotion not allowed.
Accounts
Code
HTTP Error
Message
Cause
4001
412 Precondition Failed
There are not enough funds in the openpay account
The Openpay account doesn’t have enough funds.
4002
412 Precondition Failed
The operation can't be completed until pending fees are paid
The operation can't be completed until pending fees are paid.
Webhooks
Code
HTTP Error
Message
Cause
6001
409 Conflict
The webhook has already been processed
The webhook has already been processed.
6002
412 Preconditon Failed
Could not connect with webhook service, verify URL
Could not connect with webhook service.
6003
502 Bad Gateway
Service responded with an error on this moment. Please try again later
Service responded with an error.