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.
|
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:
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 bank account already exists. |
2003 | 409 Conflict | The external_id already exists. |
Cards
Code | HTTP Error | Description |
---|---|---|
2004 | 422 Unprocessable Entity | The card number is invalid. |
2005 | 400 Bad Request | The expiration date has expired. |
2006 | 400 Bad Request | The CVV2 security code is required. |
2007 | 412 Precondition Failed | The card number is only valid in sandbox. |
2008 | 412 Precondition Failed | The card is not valid for points. |
2009 | 412 Precondition Failed | The CVV2 security code is invalid. |
2010 | 402 Payment Required | 3D Secure authentication failed. |
2011 | 422 Unprocessable Entity | Card product type not supported. |
3001 | 402 Payment Required | The card was declined by the bank. |
3002 | 402 Payment Required | The card has expired. |
3003 | 402 Payment Required | The card doesn't have sufficient funds. |
3004 | 402 Payment Required | The card was reported as stolen. |
3005 | 402 Payment Required | Fraud risk detected by anti-fraud system --- Found in blacklist. |
3006 | 412 Precondition Failed | Request not allowed. |
3009 | 402 Payment Required | The card was reported as lost. |
3010 | 402 Payment Required | The bank has restricted the card. |
3011 | 402 Payment Required | The bank has requested the card to be retained. |
3012 | 412 Precondition Failed | Bank authorization is required for this charge. |
3201 | 412 Precondition Failed | Merchant not authorized to use promotions. |
3203 | 412 Precondition Failed | Invalid promotion for such card type. |
3204 | 412 Precondition Failed | Transaction amount is less than minimum for promotion. |
3205 | 412 Precondition Failed | Promotion not allowed. |
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. |
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. |