diagnosis
POST /v2/device/diagnosis
The diagnosis API is called by the POS to check the payment terminal status. Ensure to call this API before creating any payment request to ensure the payment terminal is ready to accept payment requests.
Structure
A message consists of a header and body. The following sections are focused on the body structure. For the header structure, see:
Request parameters
N/A
Response parameters
Parameter name | Type | Required | Description |
result | Yes | Result of the API call. | |
networkStatus | String | Yes | Network connection status. Valid values are:
|
printerStatus | String | Yes | Printer status. Valid values are:
|
globalStatus | String | Yes | Overall device status, used to prepare to receive requests. Valid values are:
|
Result
Parameter name | Type | Required | Description |
resultStatus | String | Yes | The result status. Valid values are:
|
resultCode | String | 否 | The result code. Maximum length: 64 characters |
resultMessage | String | 否 | The result message that describes the result code in detail. Maximum length: 256 characters |
Result codes
resultCode | resultStatus | resultMessage | Further action |
|
| Success. | No action is required. |
|
| A general business failure occurred. Do not retry. | Contact Antom Technical Support to troubleshoot the issue. |
|
| The called API is invalid. | Check whether the correct API name is used when making the API call. API names are case-insensitive. |
|
| The client ID is invalid. | Check whether the correct client ID is used. The payment terminal integration uses the serial number (SN) of the payment terminal as the client ID. |
|
| The signature is not validated. | Refer to the sample code provided by D-Store during integration to check whether the correct public key, signed message, and signature algorithm are used. |
|
| The encrypted data is invalid. | Refer to the sample code provided by D-Store during integration to check whether the correct encrypted data is used. |
|
| The server does not implement the requested HTTP method. | Ensure the HTTP method is |
|
| An API calling is failed, which is caused by unknown reasons. | Call the API again. |
Samples
The following code shows a response message:
{
"result":{
"resultCode": "SUCCESS",
"resultStatus": "S",
"resultMessage": "Success."
},
"networkStatus": "Y",
"printerStatus": "Y",
"globalStatus": "Y"
}