Skip to main content

Troubleshooting error situations

Standardized way of describing problems​

When an error or exception occurs while processing a request and the result will be a HTTP Status 4xx of 5xx, then the body of the response will contain more information about what caused the problem. Those responses will have the content-type application/problem+json. Problem Details for HTTP APIs is a standardized way of describing any kind of error thrown by an API.

Example of a Problem JSON response

{
"status": 403,
"title": "Forbidden",
"detail": "Invalid API Key.",
"instance": "/stores"
}

Failure during authentication​

Error CodeDescriptionSolution
401The Consumer System failed to include the API-Key-Header in the request.Add an API-Key Header to the request with a valid APIKey.
403The Consumer System included an invalid API-Key in the Header in the request.Replace the APIKey with a valid APIKey. Contact CM.com POS Payment's Customer Care Center for getting a new valid APIKey if necessary.

Disconnects during communication​

When a Consumer System sends a request to the MerchantAPI but fails to receive a HTTP response due to some network issue, the request still might have been received and handled correctly by the CM POS Payment Platform.

  • All GET operations can be retried by the Consumer System.

  • For other operations the Consumer System might want to retrieve the current status before a retry since a new transaction might have been created or an aborted transaction might actually have been aborted.

  • The id of a transaction can be found by requesting a list of transactions per terminal and find the transaction by the merchant_order_reference.

Failure to abort a transaction​

When a Consumer System attempts to abort a transaction and gets a 409 Conflict response, then the abort did not succeed since the terminal has already started to process that transactions.

The Consumer System should then get the status of the transaction and if the result for that transaction is APPROVED, then the consumer probably will want to initiate a refund for that transaction.