Part of every response from the API is a common format that is used to indicate the success of processing the call and any errors that may have occurred. In the top level of the returned JSON, there will be an element stating whether the call was completely successful. There will also be an “errors” list that will be empty (or have a single “success” entry) when no errors occurred.

In the case that one or more errors occurred, the list will contain error objects in most significant first order. Each of these objects will contain an element stating what Pyxis module had the error, a numeric error code and a human readable description of the error. Please note that the error codes and messages may originate in lower systems that Pyxis uses; CPP does not have any control over the list of possible errors coming from these outside products.


📘

You should always check the “status” element first, the value will be either “Success” or “Error”. If the status is error, then the “errors” list will contain information about one or more errors caught by Pyxis.


Here is an example of the error portion of the API response when an error has occurred:

{
     “status” : “Error”,
     “operation” : “Sale”,
     “transactionId” : “05a69b9b-61fb-4366-b7b4-1b87a0376771”,
  	...
     “errors” : [
            {
                “errorSource” : “Processing”,
                “errorCode” : “345”,
                “errorMsg” : "The card account number used has an incorrect length."
             }
          ],
	...
}