API Response Codes
Jupico uses conventional HTTP response codes to indicate the success or failure of an API request. Below are the primary status code ranges and their meanings:
2xx Success
Codes in the 2xx range indicate success.
Code | Result |
---|---|
200 - OK | Indicates that the request was successful and everything worked as expected. |
201 - Created | Indicates that the request has succeeded and has led to the creation of a resource. |
Some 2xx errors that could be handled programmatically (e.g., a card is declined), include an error code that briefly explains the error reported.
4xx Error
Codes in the 4xx range indicate an error that failed given the information provided (e.g., a required parameter was omitted, a charge failed, etc.).
Code | Result |
---|---|
400 - Bad Request | This status code indicates an unacceptable request, often due to missing a required parameter. |
401 - Unauthorized | Occurs when no valid API key is provided. |
404 - Not Found | Indicates that the requested resource does not exist. |
Some 4xx errors that could be handled programmatically (e.g., a card is declined), include an error code that briefly explains the error reported.
5xx Error
Codes in the 5xx range indicate an error with Jupico's servers (these are rare).
Code | Result |
---|---|
500 - Server Error | These are rare and signify a problem on the server-side (Jupico’s servers). A reversal operation should be executed. If the error persists, please contact support. |
503 - Services Unavailable | One or more server external services is temporarily unavailable. A retry of the operation can be executed, without the need of a reversal operation. |