Search

Are you looking for test card numbers?

Would you like to contact support?

Point-of-sale icon

Request diagnosis

Endpoint

The URL used to send Terminal API messages depends on your type of implementation. For more information on the architectures available, see the Terminal API Overview.

Request

For a list of Diagnosis Request fields, see DiagnosisRequest fields. The elements of a payment request are wrapped in a DiagnosisRequest envelope.

The SaleID and ServiceID in the MessageHeader should be unique. SaleID and ServiceID combinations are rejected if used recently, within 48 hours.

The fields described below are the basic fields you specify when making a DiagnosisRequest call to the Terminal API.

{
   "SaleToPOIRequest":{
      "MessageHeader":{
         "ProtocolVersion":"3.0",
         "MessageClass":"Service",
         "MessageCategory":"Diagnosis",
         "MessageType":"Request",
         "ServiceID":"0403104624",
         "SaleID":"POSSystemID12345",
         "POIID":"P400Plus-275008565"
      },
      "DiagnosisRequest":{
         "HostDiagnosisFlag":false
      }
   }
}
String serviceID = "YOUR_UNIQUE_ATTEMPT_ID";
String saleID = "YOUR_CASH_REGISTER_ID";
String POIID = "YOUR_TERMINAL_ID";

SaleToPOIRequest saleToPOIRequest = new SaleToPOIRequest();
MessageHeader messageHeader = new MessageHeader();
messageHeader.setProtocolVersion("3.0");
messageHeader.setMessageClass( MessageClassType.SERVICE );
messageHeader.setMessageCategory( MessageCategoryType.DIAGNOSIS );
messageHeader.setMessageType( MessageType.REQUEST );
messageHeader.setServiceID(serviceID);
messageHeader.setSaleID(saleID);
messageHeader.setPOIID(POIID);
saleToPOIRequest.setMessageHeader(messageHeader);

DiagnosisRequest diagnosisRequest = new DiagnosisRequest();
diagnosisRequest.setHostDiagnosisFlag( Boolean.FALSE );
saleToPOIRequest.setDiagnosisRequest(diagnosisRequest);
terminalAPIRequest.setSaleToPOIRequest(saleToPOIRequest);

Response

For a list of DiagnosisResponse fields, see DiagnosisResponse fields.

A request is attempted and you receive a response with the following fields:

{
  "SaleToPOIResponse": {
    "MessageHeader": {
      "ProtocolVersion": "3.0",
      "SaleID": "POSSystemID12345",
      "MessageClass": "Service",
      "MessageCategory": "Diagnosis",
      "ServiceID": "0403104624",
      "POIID": "P400Plus-275008565",
      "MessageType": "Response"
    },
    "DiagnosisResponse": {
      "POIStatus": {
        "CommunicationOKFlag": true,
        "GlobalStatus": "OK"
      },
      "Response": {
        "Result": "Success"
      },
      "HostStatus": [
        {
          "IsReachableFlag": true,
          "AcquirerID": "0"
        }
      ]
    }
  }
}