Errors
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. <ul><li>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.</li><li>internal: It means an error on the Openpay side, this will occur very rarely. </li><li>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.</li></lu> |
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 | Description |
---|---|---|
1000 | 500 Internal Server Error | An error happened in the internal Openpay server. |
1001 | 400 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 request is not authenticated or is incorrect. |
1003 | 422 Unprocessable Entity | The operation couldn’t be processed because one or more parameters are incorrect. |
1004 | 503 Service Unavailable | A required service is not available. |
1005 | 404 Not Found | A required resource doesn’t exist. |
1006 | 409 Conflict | There is already a transaction with the same ID order. |
1008 | 423 Locked | One of the required accounts is deactivated. |
1007 | 402 Payment Required | The funds transfer between the bank account or card and the Openpay account was rejected. |
1009 | 413 Request Entity too large | The request body is too large. |
1010 | 403 Forbidden | 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. |
1012 | 412 Precondition failed | The transaction amount is out of the limits. |
1013 | 412 Precondition failed | The operation is not allowed on the resource. |
1014 | 401 Unauthorized | The account is inactive. |
1015 | 504 Gateway timeout | Could not get any response from gateway. |
1016 | 409 Conflict | The merchant email has been already processed. |
1017 | 502 Bad Gateway | 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. |
1020 | 400 Bad Request | The number of decimal digits is not valid for this currency |
Storage
Code | HTTP Error | Description |
---|---|---|
2001 | 409 Conflict | The CLABE of the bank account is already registered. |
2002 | 409 Conflict | The number of this card is already registered. |
2003 | 409 Conflict | The customer with this external ID already exists. |
2004 | 422 Unprocessable Entity | The identifier digit of this card number is invalid according to Luhn algorithm. |
2005 | 400 Bad Request | The card expiration date is prior to the current date. |
2006 | 400 Bad Request | The card security code (CVV2) wasn’t provided. |
2007 | 412 Precondition Failed | The card number is just for testing, it can only be used in Sandbox. |
2008 | 412 Precondition Failed | The card is not valid for Santander points. |
2009 | 412 Precondition Failed | The card security code (CVV2) is invalid. |
2010 | 402 Payment Required | 3D Secure authentication failed. |
2011 | 422 Unprocessable Entity | Card product type not supported. |
Cards
Code | HTTP Error | Description |
---|---|---|
3001 | 402 Payment Required | Card declined. |
3002 | 402 Payment Required | Card is expired. |
3003 | 402 Payment Required | Card has not enough funds. |
3004 | 402 Payment Required | Card has been flagged as stolen. |
3005 | 402 Payment Required | Card has been rejected by the antifraud system. |
3006 | 412 Precondition Failed | The operation is not allowed for this customer or transaction. |
3007 | 402 Payment Required | Deprecated. The card was rejected. |
3008 | 412 Precondition Failed | The card doesn’t support online transactions. |
3009 | 402 Payment Required | Card has been flagged as lost. |
3010 | 402 Payment Required | The card has been restricted by the bank. |
3011 | 402 Payment Required | The bank has requested to hold this card. Please contact the bank. |
3012 | 412 Precondition Failed | Bank authorization is required to make this payment. |
Account
Código | Error HTTP | Causa |
---|---|---|
4001 | 412 Preconditon Failed | The Openpay account doesn’t have enough funds. |
4002 | 412 Preconditon Failed | The operation can’t be completed until pending fees are paid. |
Orders
Código | Error HTTP | Causa |
---|---|---|
5001 | 409 Conflict | The external_order_id already exists. |
Webhooks
Código | Error HTTP | Causa |
---|---|---|
6001 | 409 Conflict | The webhook has already been processed. |
6002 | 412 Preconditon Failed | Could not connect with webhook service. |
6003 | 502 Bad Gateway | Service responded with an error. |