Error codes
The Ecommerce API returns error codes and messages when a request contains invalid or incomplete data and Clover cannot process the request. These issues can be divided into two general categories:
- Errors that should be addressed by your app's logic (if you are integrating with the API only)
- Errors that should be handled at runtime (iframe and API integrations)
Errors you may encounter are explained the in the following sections.
API only errors
You can prevent these errors by checking for the described issues in your application before submitting the API request.
Error code | Description | Request type(s) | Prevention |
---|---|---|---|
| The | Create token | Verify that the CVV value is a three- or four-digit number |
| The | Create token, create or update customer | Verify that the CVV value is a three- or four-digit number |
| The | Create token | Verify that the month value is a one- or two-digit number |
| The | Create token | Verify that the year value is a two- or four-digit number |
| The PAN provided in | Create token | Verify that the PAN is valid |
| The | Create charge | Verify that the amount is a positive number |
API and iframe errors
These errors can be handled at runtime and may be encountered by any Ecommerce app.
Error code | Description | Request type | Next steps |
---|---|---|---|
| The | Create charge and pay for order | If possible, split the charge or order into smaller amounts and retry as two transactions. If the customer's |
| The | Create charge and pay for order | Allow the customer to enter a different card and retry the request with the new |
| The customer attempting to pay does not have a | Charge | Direct the customer to enter their card information and update the customer's record with the new |
| The | Capture charge | Do not retry the request |
| The | Refund | Do not retry the request |
| The | Create charge, create or update customer, pay for order | Notify the customer of the issue and allow them to retry or enter a new email address |
| The expiration date (the combination of | Token | Notify the customer of the issue and allow them to retry by entering a new card |
| The | Token | Notify the customer of the issue and allow them to retry by entering a new card |
| The value provided in | Token | Notify the customer of the issue and allow them to retry by entering a new card |
| The | Token | Before sending the request, verify that the |
| The | Charge | If possible, split the charge or order into smaller amounts and retry as two transactions. If the customer's |
| The value provided in | Token | Notify the customer of the issue and allow them to retry by entering a new card |
| The | Create charge and pay for order | Notify the customer of the issue and allow them to retry by entering a new tip amount |
| The | Create charge | Check that the amount is a positive number and, if the value has changed after the check, retry the request |
| The token request failed upstream and the upstream message could not be processed | Token | Allow the user to retry the transaction |
| The order identified by the ID in the request URL has already been paid | Pay order | Notify the user that the order has already been paid |
| A generic error indicating that the request could not be processed as submitted | Any | Notify the user that an error occurred and, if warranted, allow them to retry the request |
| Your application has made too many requests and additional requests will not be processed until the rate limit expires | Any | Follow the best practices described in API usage & rate limits |
| The data item (charge, order, or refund) provided in the request does not exist | Any | Notify the user that the data item could not be found. Allow the user to adjust the request and retry. |
| The | Charge | Notify the user of the issue and have them reenter their card details. Then, use the iframe to generate a new token. |
Updated almost 2 years ago