HTTP Response Codes

HTTP Request

MX Merchant uses HTTP response status codes to indicate the success or failure of your API requests. If your request fails, MX Merchant returns an error using the appropriate status code.

In general, there are three status code ranges you can expect:

HTTP ResponseMeaning
200 OKsuccess status response code indicates that the request has succeeded
201 Createdsuccess status response code indicates that the request has succeeded and has led to the creation of a resource
202 Acceptedstatus code indicates that the request has been accepted for process
204 No Contentsuccess status response code indicates that the request has succeeded,
400 Bad Requestresponse status code indicates that the server cannot or will not process the request due to something that is perceived to be a client error
401 Unauthorizedclient error status response code indicates that the request has not been applied because it lacks valid authentication credentials for the target resource.
403 Forbiddenclient error status response code indicates that the server understood the request but refuses to authorize it
404 Not Foundstandard response code to indicate that communication with a given server was successful, but the server could not find what was requested.
405 Method Not Allowedresponse status code indicates that the request method is known by the server but is not supported by the target resource.
406 Not Acceptableclient error response code indicates that the server cannot produce a response matching the list of acceptable values defined in the request's proactive content negotiation headers, and that the server is unwilling to supply a default representation.
422 Unprocessable Entityresponse status code indicates that the server understands the content type of the request entity, and the syntax of the request entity is correct, but it was unable to process the contained instructions.
503 Service Unavailableserver error response code indicates that the server is not ready to handle the request.
500 Internal Server ErrorThe server encountered an error while processing your request and failed.