Response Handling

After submitting an API call to QorCommerce, you receive a response back to inform you that your request was received and processed. Depending on the HTTP status code of the response, we suggest that you build some logic to handle any errors that a request or the system may return.

HTTP responses

200OkThe request was executed correctlyThe request message has been successfully processed, and it has produced a response. The response message varies, depending on the request method and the requested data.
201AddedThe resource was added successfullyThe request message has been successfully processed, and it has added the resource / data.
400Bad RequestWrong parameter or ruleThe receiving server cannot understand the request because of malformed syntax. Do not repeat the request without first modifying it; check the request for errors, fix them and then retry the request.
401UnauthorizedAPI Keys are missing for HTTP authenticationYou need to input valid authentication credentials (username/password) to access the resource.
403ForbiddenWrong authenticationYou do not have the appropriate user rights to access the request. Do not repeat the request.
404Not FoundIncorrect URLIt was not possible to retrieve the resource you requested at the specified location. It may or may not become available again in the future. Usually, this happens when the URL you pass with the request is incorrect. You may make subsequent calls.
500Server ErrorServer errorThe receiving server encountered an unexpected condition that prevents it from fulfilling the request. Our servers may return a 500 status code also when the request is incorrect, for example because of a missing or not filled in mandatory field.

Handle 200 responses

An HTTP 200/OK response status code means that the request was submitted correctly and QorCommerce processed it successfully. An HTTP 200 response does not automatically mean that the payment or the modification request was successfully executed.

When the payment response includes a resultCode with a value of Refused or Error, a refusal Reason field is added. Check the refusal reason messages to learn more about the possible issues of the payment or the modification request.

For example:

  • You send a capture payment request.

  • The response to your capture request returns HTTP 200/OK. This means:

    • We received your request.
    • We will execute a payment capture.
    • We still do not know if the capture operation will be successful or not.
    • We'll let you know in the corresponding message.
  • If the capture operation fails, for example, because the acquirer declines to accept the shopper's card, the payable amount for the transaction is not collected.

  • Based on your settings, you'll receive a message that includes the response information about this capture example:

  • The transaction_id in this response is the same as the transaction_id in the capture response.

  • The success field value is false, and the reason field includes a short message to explain the cause of the failure.

Handle 4xx and 5xx responses

In the following scenarios, the QorCommerce payments platform does not accept or store submitted requests:

  • The request does not pass validation.
  • The request violates a security constraint.
  • The request violates a configuration constraint.
  • An internal error occurs on the QorCommerce payments platform.

In these cases, you receive an error message with an error code containing a description of the problem.
In general, you should handle it as an exception.


There is no charge for rejected payment requests accompanied by an error message.