Pesquisar

Are you looking for test card numbers?

Would you like to contact support?

Point-of-sale icon

Exibir notificações

Receba notificações em sua caixa registradora.

Durante uma transação, os terminais da Adyen geram notificações de exibição. Estas podem ser apresentadas em sua caixa registradora para manter os funcionários da loja atualizados sobre o andamento da transação.

Se sua integração usar comunicações em nuvem assíncronas, você precisará integrar as notificações de exibição para receber o resultado de suas transações.

Aqui, descrevemos como você expõe um endpoint no servidor e configura notificações de exibição. Seu servidor receberá webhooks que incluem um event. Isso pode indicar como o comprador está interagindo com o terminal ou o resultado da transação. Use-os para apresentar uma mensagem na sua caixa registradora.

Também fornecemos uma lista de valores event possíveis e exemplos de cada um.

Configurar notificações

Etapa 1: expor um terminal em seu servidor

As notificações de exibição são enviadas como retornos de chamada HTTP (webhooks) para um terminal no seu servidor. Para receber notificações, você precisa de um servidor que possua:

  • Um endpoint que pode receber uma chamada JSON.
  • Uma porta TCP aberta para tráfego HTTP (443, 8443 ou 8843).

    Para teste, você também pode usar uma porta HTTP (80, 8080 ou 8888).

  • Um nome de usuário e senha para autenticação básica.

Em seguida, insira os detalhes desse terminal na sua área de cliente.

Etapa 2: Configurar notificações em sua área de cliente

Digite os detalhes do seu servidor e selecione as informações adicionais que deseja receber nas notificações. Você pode configurar as notificações no nível de company account ou merchant account.

  1. Faça login na sua Customer Area. Para configurar notificações no nível de merchant accoout, mude para o nível de conta desejada.
  2. Va para Account > Webhooks.
  3. Ao lado de Terminal API Notification, clique em Add.
  4. Em Transport, insira o servidor:
    • URL. Verifique se este é um URL publico.
    • SSL (TLS) Version.
  5. Marque a caixa de seleção Active.
  6. Na seção Authentication digite o nome de usuário e a senha do servidor para autenticação básica.
    Incluímos esses detalhes no cabeçalho da solicitação de notificação para autenticação no seu servidor.
  7. Em Additional settings:
    • Ative Display notification.
  8. Clique em Test Configuration para testar se a notificação foi recebida no seu terminal.
  9. Se o seu terminal recebeu a notificação, clique em Save Configuration.

As notificações de exibição agora serão enviadas para o endpoint especificado.

Tipos de notificações

Quando você recebe uma notificação, o tipo de notificação é indicado pelo event Quando você recebe uma notificação, o tipo de notificação é indicado pelo ReferenceID. Use event para apresentar uma mensagem aos funcionários da sua loja, informando-os do andamento da transação.

Event Descrição
TENDER_CREATED

Tender foi criado com sucesso.

Além do event (TENDER_CREATED) fornecido no ReferenceID, a TransactionID e TimeStamp também são fornecidos.

Para um exemplo desta notificação, consulte TENDER_CREATED

CARD_DETAILS_PROVIDED Os detalhes do cartão foram inseridos.
CARD_INSERTED

O cliente inseriu o cartão no terminal.

Para um exemplo desta notificação, consulte CARD_INSERTED

CARD_PRESENTED O cliente apresentou o cartão ao leitor sem contato do terminal.
CARD_SWIPED

O cliente passou o cartão.

Para um exemplo desta notificação, consulte CARD_SWIPED

WAIT_FOR_APP_SELECTION

O terminal está aguardando o comprador selecionar um aplicativo de pagamento.

Para um exemplo desta notificação, consulte WAIT_FOR APP_SELECTION

APPLICATION_SELECTED

O cliente selecionou seu aplicativo de pagamento preferido.

Para um exemplo desta notificação, consulte APPLICATION_SELECTED

ASK_SIGNATURE O terminal solicitou uma assinatura do comprador.
WAIT_FOR_PIN

O terminal está aguardando o comprador digitar seu PIN (senha).

Para um exemplo desta notificação, consulte WAIT_FOR_PIN

CHECK_SIGNATURE A assinatura foi verificada pela equipe da loja.
PIN_DIGIT_ENTERED

O cliente inseriu um dígito de seu PIN (senha).

Para um exemplo desta notificação, consulte PIN_DIGIT_ENTERED

PIN_ENTERED

O cliente terminou de digitar o PIN (senha).

Para um exemplo desta notificação, consulte PIN_ENTERED

SIGNATURE_CHECKED A assinatura foi verificada pela equipe da loja.
PRINT_RECEIPT

O terminal está imprimindo o recibo..

Para um exemplo desta notificação, consulte PRINT_RECEIPT

RECEIPT_PRINTED O terminal terminou de imprimir o recibo.
CARD_REMOVED

O cliente removeu o cartão do terminal.

Para um exemplo desta notificação, consulte CARD_REMOVED

TENDER_FINAL

Tender foi concluída (o comprador concluiu ou abandonou a transação).

Além do event (TENDER_FINAL) fornecido no ReferenceID, o Result da transação, o TimeStamp, e o TransactionID também são fornecidos.

Para um exemplo desta notificação, consulte TENDER_FINAL

ASK_DCC O terminal está perguntando se o comprador exige conversão dinâmica de moeda.
ASK_GRATUITY O terminal está aguardando uma possível gorjeta.
BALANCE_QUERY_COMPLETED Consulta de saldo concluída no terminal.
BALANCE_QUERY_STARTED

Consulta de saldo iniciada no terminal.

Para um exemplo desta notificação, consulte BALANCE_QUERY_STARTED

DCC_ACCEPTED O cliente aceitou a solicitação de conversão de moeda dinâmica.
DCC_REJECTED O cliente rejeitou a solicitação de conversão de moeda dinâmica.
GRATUITY_ENTERED

O cliente inseriu uma gorjeta no terminal.

Para um exemplo desta notificação, consulte GRATUITY_ENTERED

LOAD_STARTED

O carregamento do vale-presente foi iniciado.

Para um exemplo desta notificação, consulte LOAD_STARTED

LOAD_COMPLETED A carga do vale-presente foi concluída.
PROVIDE_CARD_DETAILS

O terminal está aguardando que os detalhes do cartão sejam inseridos manualmente.

Para um exemplo desta notificação, consulte PROVIDE_CARD_DETAILS

Exemplos de notificações de exibição são fornecidos abaixo.

Examples

TENDER_CREATED

{
  "SaleToPOIRequest":{
    "DisplayRequest":{
      "DisplayOutput":{
          "OutputContent":{
            "OutputFormat":"MessageRef",
            "PredefinedContent":{
              "ReferenceID":"TransactionID=oLkO001517998574000&TimeStamp=2018-02-07T10%3a16%3a14.000Z&event=TENDER_CREATED"
            }
          },
          "InfoQualify":"Status",
          "Device":"CashierDisplay",
          "ResponseRequiredFlag":false
        }
    },
    "MessageHeader":{
      "SaleID":"POSSystemID12345",
      "ProtocolVersion":"3.0",
      "MessageType":"Request",
      "POIID":"V400m-324688179",
      "ServiceID":"0207111617",
      "MessageClass":"Device",
      "MessageCategory":"Display",
      "DeviceID":"1517998562"
    }
  }
}
String saleID = "YOUR_CASH_REGISTER_ID";
String POIID = "YOUR_TERMINAL_ID";
String serviceID = "YOUR_UNIQUE_ATTEMPT_ID";

SaleToPOIRequest saleToPOIRequest = new SaleToPOIRequest();
DisplayRequest displayRequest = new DisplayRequest();
DisplayOutput displayOutput = new DisplayOutput();
OutputContent outputContent = new OutputContent();
outputContent.setOutputFormat( OutputFormatType.MESSAGE_REF );
PredefinedContent predefinedContent = new PredefinedContent();
predefinedContent.setReferenceID("TransactionID=oLkO001517998574000&TimeStamp=2018-02-07T10%3a16%3a14.000Z&event=TENDER_CREATED");
outputContent.setPredefinedContent(predefinedContent);
displayOutput.setOutputContent(outputContent);
displayOutput.setInfoQualify( InfoQualifyType.STATUS );
displayOutput.setDevice( DeviceType.CASHIER_DISPLAY );
displayOutput.setResponseRequiredFlag( Boolean.FALSE );
displayRequest.setDisplayOutput(displayOutput);
saleToPOIRequest.setDisplayRequest(displayRequest);

MessageHeader messageHeader = new MessageHeader();
messageHeader.setSaleID(saleID);
messageHeader.setProtocolVersion("3.0");
messageHeader.setMessageType( MessageType.REQUEST );
messageHeader.setPOIID(POIID);
messageHeader.setServiceID(serviceID);
messageHeader.setMessageClass( MessageClassType.DEVICE );
messageHeader.setMessageCategory( MessageCategoryType.DISPLAY );
messageHeader.setDeviceID("1517998562");
saleToPOIRequest.setMessageHeader(messageHeader);
terminalAPIRequest.setSaleToPOIRequest(saleToPOIRequest);

CARD_INSERTED

{
  "SaleToPOIRequest":{
    "DisplayRequest":{
      "DisplayOutput":[
        {
          "OutputContent":{
            "OutputFormat":"MessageRef",
            "PredefinedContent":{
              "ReferenceID":"event=CARD_INSERTED"
            }
          },
          "InfoQualify":"Status",
          "Device":"CashierDisplay",
          "ResponseRequiredFlag":false
        }
      ]
    },
    "MessageHeader":{
      "SaleID":"POSSystemID12345",
      "ProtocolVersion":"3.0",
      "MessageType":"Request",
      "POIID":"V400m-324688179",
      "ServiceID":"0207111617",
      "MessageClass":"Device",
      "MessageCategory":"Display",
      "DeviceID":"1517998563"
    }
  }
}
String saleID = "YOUR_CASH_REGISTER_ID";
String POIID = "YOUR_TERMINAL_ID";
String serviceID = "YOUR_UNIQUE_ATTEMPT_ID";

SaleToPOIRequest saleToPOIRequest = new SaleToPOIRequest();
DisplayRequest displayRequest = new DisplayRequest();
DisplayOutput displayOutput = new DisplayOutput();
OutputContent outputContent = new OutputContent();
outputContent.setOutputFormat( OutputFormatType.MESSAGE_REF );
PredefinedContent predefinedContent = new PredefinedContent();
predefinedContent.setReferenceID("event=CARD_INSERTED");
outputContent.setPredefinedContent(predefinedContent);
displayOutput.setOutputContent(outputContent);
displayOutput.setInfoQualify( InfoQualifyType.STATUS );
displayOutput.setDevice( DeviceType.CASHIER_DISPLAY );
displayOutput.setResponseRequiredFlag( Boolean.FALSE );
displayRequest.setDisplayOutput(displayOutput);
saleToPOIRequest.setDisplayRequest(displayRequest);

MessageHeader messageHeader = new MessageHeader();
messageHeader.setSaleID(saleID);
messageHeader.setProtocolVersion("3.0");
messageHeader.setMessageType( MessageType.REQUEST );
messageHeader.setPOIID(POIID);
messageHeader.setServiceID(serviceID);
messageHeader.setMessageClass( MessageClassType.DEVICE );
messageHeader.setMessageCategory( MessageCategoryType.DISPLAY );
messageHeader.setDeviceID("1517998563");
saleToPOIRequest.setMessageHeader(messageHeader);
terminalAPIRequest.setSaleToPOIRequest(saleToPOIRequest);

CARD_SWIPED

{
  "SaleToPOIRequest":{
    "DisplayRequest":{
      "DisplayOutput":[
        {
          "ResponseRequiredFlag":false,
          "Device":"CashierDisplay",
          "InfoQualify":"Status",
          "OutputContent":{
            "PredefinedContent":{
              "ReferenceID":"event=CARD_SWIPED"
            },
            "OutputFormat":"MessageRef"
          }
        }
      ]
    },
    "MessageHeader":{
      "SaleID":"POSSystemID12345",
      "ProtocolVersion":"3.0",
      "MessageType":"Request",
      "POIID":"V400m-324688179",
      "ServiceID":"0207111617",
      "MessageClass":"Device",
      "MessageCategory":"Display",
      "DeviceID":"1517998573"
    }
  }
}
String saleID = "YOUR_CASH_REGISTER_ID";
String POIID = "YOUR_TERMINAL_ID";
String serviceID = "YOUR_UNIQUE_ATTEMPT_ID";

SaleToPOIRequest saleToPOIRequest = new SaleToPOIRequest();
DisplayRequest displayRequest = new DisplayRequest();
DisplayOutput displayOutput = new DisplayOutput();
displayOutput.setResponseRequiredFlag( Boolean.FALSE );
displayOutput.setDevice( DeviceType.CASHIER_DISPLAY );
displayOutput.setInfoQualify( InfoQualifyType.STATUS );
OutputContent outputContent = new OutputContent();
PredefinedContent predefinedContent = new PredefinedContent();
predefinedContent.setReferenceID("event=CARD_SWIPED");
outputContent.setPredefinedContent(predefinedContent);
outputContent.setOutputFormat( OutputFormatType.MESSAGE_REF );
displayOutput.setOutputContent(outputContent);
displayRequest.setDisplayOutput(displayOutput);
saleToPOIRequest.setDisplayRequest(displayRequest);

MessageHeader messageHeader = new MessageHeader();
messageHeader.setSaleID(saleID);
messageHeader.setProtocolVersion("3.0");
messageHeader.setMessageType( MessageType.REQUEST );
messageHeader.setPOIID(POIID);
messageHeader.setServiceID(serviceID);
messageHeader.setMessageClass( MessageClassType.DEVICE );
messageHeader.setMessageCategory( MessageCategoryType.DISPLAY );
messageHeader.setDeviceID("1517998573");
saleToPOIRequest.setMessageHeader(messageHeader);
terminalAPIRequest.setSaleToPOIRequest(saleToPOIRequest);

WAIT_FOR_APP_SELECTION

{
  "SaleToPOIRequest":{
    "DisplayRequest":{
      "DisplayOutput":[
        {
          "OutputContent":{
            "OutputFormat":"MessageRef",
            "PredefinedContent":{
              "ReferenceID":"event=WAIT_FOR_APP_SELECTION"
            }
          },
          "InfoQualify":"Status",
          "Device":"CashierDisplay",
          "ResponseRequiredFlag":false
        }
      ]
    },
    "MessageHeader":{
      "SaleID":"POSSystemID12345",
      "ProtocolVersion":"3.0",
      "MessageType":"Request",
      "POIID":"V400m-324688179",
      "ServiceID":"0207111617",
      "MessageClass":"Device",
      "MessageCategory":"Display",
      "DeviceID":"1517998564"
    }
  }
}
String saleID = "YOUR_CASH_REGISTER_ID";
String POIID = "YOUR_TERMINAL_ID";
String serviceID = "YOUR_UNIQUE_ATTEMPT_ID";

SaleToPOIRequest saleToPOIRequest = new SaleToPOIRequest();
DisplayRequest displayRequest = new DisplayRequest();
DisplayOutput displayOutput = new DisplayOutput();
OutputContent outputContent = new OutputContent();
outputContent.setOutputFormat( OutputFormatType.MESSAGE_REF );
PredefinedContent predefinedContent = new PredefinedContent();
predefinedContent.setReferenceID("event=WAIT_FOR_APP_SELECTION");
outputContent.setPredefinedContent(predefinedContent);
displayOutput.setOutputContent(outputContent);
displayOutput.setInfoQualify( InfoQualifyType.STATUS );
displayOutput.setDevice( DeviceType.CASHIER_DISPLAY );
displayOutput.setResponseRequiredFlag( Boolean.FALSE );
displayRequest.setDisplayOutput(displayOutput);
saleToPOIRequest.setDisplayRequest(displayRequest);

MessageHeader messageHeader = new MessageHeader();
messageHeader.setSaleID(saleID);
messageHeader.setProtocolVersion("3.0");
messageHeader.setMessageType( MessageType.REQUEST );
messageHeader.setPOIID(POIID);
messageHeader.setServiceID(serviceID);
messageHeader.setMessageClass( MessageClassType.DEVICE );
messageHeader.setMessageCategory( MessageCategoryType.DISPLAY );
messageHeader.setDeviceID("1517998564");
saleToPOIRequest.setMessageHeader(messageHeader);
terminalAPIRequest.setSaleToPOIRequest(saleToPOIRequest);

APPLICATION_SELECTED

{
  "SaleToPOIRequest":{
    "DisplayRequest":{
      "DisplayOutput":[
        {
          "OutputContent":{
            "OutputFormat":"MessageRef",
            "PredefinedContent":{
              "ReferenceID":"event=APPLICATION_SELECTED"
            }
          },
          "InfoQualify":"Status",
          "Device":"CashierDisplay",
          "ResponseRequiredFlag":false
        }
      ]
    },
    "MessageHeader":{
      "SaleID":"POSSystemID12345",
      "ProtocolVersion":"3.0",
      "MessageType":"Request",
      "POIID":"V400m-324688179",
      "ServiceID":"0207111617",
      "MessageClass":"Device",
      "MessageCategory":"Display",
      "DeviceID":"1517998565"
    }
  }
}
String saleID = "YOUR_CASH_REGISTER_ID";
String POIID = "YOUR_TERMINAL_ID";
String serviceID = "YOUR_UNIQUE_ATTEMPT_ID";

SaleToPOIRequest saleToPOIRequest = new SaleToPOIRequest();
DisplayRequest displayRequest = new DisplayRequest();
DisplayOutput displayOutput = new DisplayOutput();
OutputContent outputContent = new OutputContent();
outputContent.setOutputFormat( OutputFormatType.MESSAGE_REF );
PredefinedContent predefinedContent = new PredefinedContent();
predefinedContent.setReferenceID("event=APPLICATION_SELECTED");
outputContent.setPredefinedContent(predefinedContent);
displayOutput.setOutputContent(outputContent);
displayOutput.setInfoQualify( InfoQualifyType.STATUS );
displayOutput.setDevice( DeviceType.CASHIER_DISPLAY );
displayOutput.setResponseRequiredFlag( Boolean.FALSE );
displayRequest.setDisplayOutput(displayOutput);
saleToPOIRequest.setDisplayRequest(displayRequest);

MessageHeader messageHeader = new MessageHeader();
messageHeader.setSaleID(saleID);
messageHeader.setProtocolVersion("3.0");
messageHeader.setMessageType( MessageType.REQUEST );
messageHeader.setPOIID(POIID);
messageHeader.setServiceID(serviceID);
messageHeader.setMessageClass( MessageClassType.DEVICE );
messageHeader.setMessageCategory( MessageCategoryType.DISPLAY );
messageHeader.setDeviceID("1517998565");
saleToPOIRequest.setMessageHeader(messageHeader);
terminalAPIRequest.setSaleToPOIRequest(saleToPOIRequest);

WAIT_FOR_PIN

{
  "SaleToPOIRequest":{
    "DisplayRequest":{
      "DisplayOutput":[
        {
          "OutputContent":{
            "OutputFormat":"MessageRef",
            "PredefinedContent":{
              "ReferenceID":"event=WAIT_FOR_PIN"
            }
          },
          "InfoQualify":"Status",
          "Device":"CashierDisplay",
          "ResponseRequiredFlag":false
        }
      ]
    },
    "MessageHeader":{
      "SaleID":"POSSystemID12345",
      "ProtocolVersion":"3.0",
      "MessageType":"Request",
      "POIID":"V400m-324688179",
      "ServiceID":"0207111617",
      "MessageClass":"Device",
      "MessageCategory":"Display",
      "DeviceID":"1517998566"
    }
  }
}
String saleID = "YOUR_CASH_REGISTER_ID";
String POIID = "YOUR_TERMINAL_ID";
String serviceID = "YOUR_UNIQUE_ATTEMPT_ID";

SaleToPOIRequest saleToPOIRequest = new SaleToPOIRequest();
DisplayRequest displayRequest = new DisplayRequest();
DisplayOutput displayOutput = new DisplayOutput();
OutputContent outputContent = new OutputContent();
outputContent.setOutputFormat( OutputFormatType.MESSAGE_REF );
PredefinedContent predefinedContent = new PredefinedContent();
predefinedContent.setReferenceID("event=WAIT_FOR_PIN");
outputContent.setPredefinedContent(predefinedContent);
displayOutput.setOutputContent(outputContent);
displayOutput.setInfoQualify( InfoQualifyType.STATUS );
displayOutput.setDevice( DeviceType.CASHIER_DISPLAY );
displayOutput.setResponseRequiredFlag( Boolean.FALSE );
displayRequest.setDisplayOutput(displayOutput);
saleToPOIRequest.setDisplayRequest(displayRequest);

MessageHeader messageHeader = new MessageHeader();
messageHeader.setSaleID(saleID);
messageHeader.setProtocolVersion("3.0");
messageHeader.setMessageType( MessageType.REQUEST );
messageHeader.setPOIID(POIID);
messageHeader.setServiceID(serviceID);
messageHeader.setMessageClass( MessageClassType.DEVICE );
messageHeader.setMessageCategory( MessageCategoryType.DISPLAY );
messageHeader.setDeviceID("1517998566");
saleToPOIRequest.setMessageHeader(messageHeader);
terminalAPIRequest.setSaleToPOIRequest(saleToPOIRequest);

PIN_DIGIT_ENTERED

{
  "SaleToPOIRequest":{
    "DisplayRequest":{
      "DisplayOutput":[
        {
          "OutputContent":{
            "OutputFormat":"MessageRef",
            "PredefinedContent":{
              "ReferenceID":"event=PIN_DIGIT_ENTERED"
            }
          },
          "InfoQualify":"Status",
          "Device":"CashierDisplay",
          "ResponseRequiredFlag":false
        }
      ]
    },
    "MessageHeader":{
      "SaleID":"POSSystemID12345",
      "ProtocolVersion":"3.0",
      "MessageType":"Request",
      "POIID":"V400m-324688179",
      "ServiceID":"0207111617",
      "MessageClass":"Device",
      "MessageCategory":"Display",
      "DeviceID":"1517998569"
    }
  }
}
String saleID = "YOUR_CASH_REGISTER_ID";
String POIID = "YOUR_TERMINAL_ID";
String serviceID = "YOUR_UNIQUE_ATTEMPT_ID";

SaleToPOIRequest saleToPOIRequest = new SaleToPOIRequest();
DisplayRequest displayRequest = new DisplayRequest();
DisplayOutput displayOutput = new DisplayOutput();
OutputContent outputContent = new OutputContent();
outputContent.setOutputFormat( OutputFormatType.MESSAGE_REF );
PredefinedContent predefinedContent = new PredefinedContent();
predefinedContent.setReferenceID("event=PIN_DIGIT_ENTERED");
outputContent.setPredefinedContent(predefinedContent);
displayOutput.setOutputContent(outputContent);
displayOutput.setInfoQualify( InfoQualifyType.STATUS );
displayOutput.setDevice( DeviceType.CASHIER_DISPLAY );
displayOutput.setResponseRequiredFlag( Boolean.FALSE );
displayRequest.setDisplayOutput(displayOutput);
saleToPOIRequest.setDisplayRequest(displayRequest);

MessageHeader messageHeader = new MessageHeader();
messageHeader.setSaleID(saleID);
messageHeader.setProtocolVersion("3.0");
messageHeader.setMessageType( MessageType.REQUEST );
messageHeader.setPOIID(POIID);
messageHeader.setServiceID(serviceID);
messageHeader.setMessageClass( MessageClassType.DEVICE );
messageHeader.setMessageCategory( MessageCategoryType.DISPLAY );
messageHeader.setDeviceID("1517998569");
saleToPOIRequest.setMessageHeader(messageHeader);
terminalAPIRequest.setSaleToPOIRequest(saleToPOIRequest);

PIN_ENTERED

{
  "SaleToPOIRequest":{
    "DisplayRequest":{
      "DisplayOutput":[
        {
          "OutputContent":{
            "OutputFormat":"MessageRef",
            "PredefinedContent":{
              "ReferenceID":"event=PIN_ENTERED"
            }
          },
          "InfoQualify":"Status",
          "Device":"CashierDisplay",
          "ResponseRequiredFlag":false
        }
      ]
    },
    "MessageHeader":{
      "SaleID":"POSSystemID12345",
      "ProtocolVersion":"3.0",
      "MessageType":"Request",
      "POIID":"V400m-324688179",
      "ServiceID":"0207111617",
      "MessageClass":"Device",
      "MessageCategory":"Display",
      "DeviceID":"1517998571"
    }
  }
}
String saleID = "YOUR_CASH_REGISTER_ID";
String POIID = "YOUR_TERMINAL_ID";
String serviceID = "YOUR_UNIQUE_ATTEMPT_ID";

SaleToPOIRequest saleToPOIRequest = new SaleToPOIRequest();
DisplayRequest displayRequest = new DisplayRequest();
DisplayOutput displayOutput = new DisplayOutput();
OutputContent outputContent = new OutputContent();
outputContent.setOutputFormat( OutputFormatType.MESSAGE_REF );
PredefinedContent predefinedContent = new PredefinedContent();
predefinedContent.setReferenceID("event=PIN_ENTERED");
outputContent.setPredefinedContent(predefinedContent);
displayOutput.setOutputContent(outputContent);
displayOutput.setInfoQualify( InfoQualifyType.STATUS );
displayOutput.setDevice( DeviceType.CASHIER_DISPLAY );
displayOutput.setResponseRequiredFlag( Boolean.FALSE );
displayRequest.setDisplayOutput(displayOutput);
saleToPOIRequest.setDisplayRequest(displayRequest);

MessageHeader messageHeader = new MessageHeader();
messageHeader.setSaleID(saleID);
messageHeader.setProtocolVersion("3.0");
messageHeader.setMessageType( MessageType.REQUEST );
messageHeader.setPOIID(POIID);
messageHeader.setServiceID(serviceID);
messageHeader.setMessageClass( MessageClassType.DEVICE );
messageHeader.setMessageCategory( MessageCategoryType.DISPLAY );
messageHeader.setDeviceID("1517998571");
saleToPOIRequest.setMessageHeader(messageHeader);
terminalAPIRequest.setSaleToPOIRequest(saleToPOIRequest);
{
  "SaleToPOIRequest":{
    "DisplayRequest":{
      "DisplayOutput":[
        {
          "OutputContent":{
            "OutputFormat":"MessageRef",
            "PredefinedContent":{
              "ReferenceID":"event=PRINT_RECEIPT"
            }
          },
          "InfoQualify":"Status",
          "Device":"CashierDisplay",
          "ResponseRequiredFlag":false
        }
      ]
    },
    "MessageHeader":{
      "SaleID":"POSSystemID12345",
      "ProtocolVersion":"3.0",
      "MessageType":"Request",
      "POIID":"V400m-324688179",
      "ServiceID":"0207111617",
      "MessageClass":"Device",
      "MessageCategory":"Display",
      "DeviceID":"1517998572"
    }
  }
}
String saleID = "YOUR_CASH_REGISTER_ID";
String POIID = "YOUR_TERMINAL_ID";
String serviceID = "YOUR_UNIQUE_ATTEMPT_ID";

SaleToPOIRequest saleToPOIRequest = new SaleToPOIRequest();
DisplayRequest displayRequest = new DisplayRequest();
DisplayOutput displayOutput = new DisplayOutput();
OutputContent outputContent = new OutputContent();
outputContent.setOutputFormat( OutputFormatType.MESSAGE_REF );
PredefinedContent predefinedContent = new PredefinedContent();
predefinedContent.setReferenceID("event=PRINT_RECEIPT");
outputContent.setPredefinedContent(predefinedContent);
displayOutput.setOutputContent(outputContent);
displayOutput.setInfoQualify( InfoQualifyType.STATUS );
displayOutput.setDevice( DeviceType.CASHIER_DISPLAY );
displayOutput.setResponseRequiredFlag( Boolean.FALSE );
displayRequest.setDisplayOutput(displayOutput);
saleToPOIRequest.setDisplayRequest(displayRequest);

MessageHeader messageHeader = new MessageHeader();
messageHeader.setSaleID(saleID);
messageHeader.setProtocolVersion("3.0");
messageHeader.setMessageType( MessageType.REQUEST );
messageHeader.setPOIID(POIID);
messageHeader.setServiceID(serviceID);
messageHeader.setMessageClass( MessageClassType.DEVICE );
messageHeader.setMessageCategory( MessageCategoryType.DISPLAY );
messageHeader.setDeviceID("1517998572");
saleToPOIRequest.setMessageHeader(messageHeader);
terminalAPIRequest.setSaleToPOIRequest(saleToPOIRequest);

CARD_REMOVED

{
  "SaleToPOIRequest":{
    "DisplayRequest":{
      "DisplayOutput":[
        {
          "OutputContent":{
            "OutputFormat":"MessageRef",
            "PredefinedContent":{
              "ReferenceID":"event=CARD_REMOVED"
            }
          },
          "InfoQualify":"Status",
          "Device":"CashierDisplay",
          "ResponseRequiredFlag":false
        }
      ]
    },
    "MessageHeader":{
      "SaleID":"POSSystemID12345",
      "ProtocolVersion":"3.0",
      "MessageType":"Request",
      "POIID":"V400m-324688179",
      "ServiceID":"0207111617",
      "MessageClass":"Device",
      "MessageCategory":"Display",
      "DeviceID":"1517998573"
    }
  }
}
String saleID = "YOUR_CASH_REGISTER_ID";
String POIID = "YOUR_TERMINAL_ID";
String serviceID = "YOUR_UNIQUE_ATTEMPT_ID";

SaleToPOIRequest saleToPOIRequest = new SaleToPOIRequest();
DisplayRequest displayRequest = new DisplayRequest();
DisplayOutput displayOutput = new DisplayOutput();
OutputContent outputContent = new OutputContent();
outputContent.setOutputFormat( OutputFormatType.MESSAGE_REF );
PredefinedContent predefinedContent = new PredefinedContent();
predefinedContent.setReferenceID("event=CARD_REMOVED");
outputContent.setPredefinedContent(predefinedContent);
displayOutput.setOutputContent(outputContent);
displayOutput.setInfoQualify( InfoQualifyType.STATUS );
displayOutput.setDevice( DeviceType.CASHIER_DISPLAY );
displayOutput.setResponseRequiredFlag( Boolean.FALSE );
displayRequest.setDisplayOutput(displayOutput);
saleToPOIRequest.setDisplayRequest(displayRequest);

MessageHeader messageHeader = new MessageHeader();
messageHeader.setSaleID(saleID);
messageHeader.setProtocolVersion("3.0");
messageHeader.setMessageType( MessageType.REQUEST );
messageHeader.setPOIID(POIID);
messageHeader.setServiceID(serviceID);
messageHeader.setMessageClass( MessageClassType.DEVICE );
messageHeader.setMessageCategory( MessageCategoryType.DISPLAY );
messageHeader.setDeviceID("1517998573");
saleToPOIRequest.setMessageHeader(messageHeader);
terminalAPIRequest.setSaleToPOIRequest(saleToPOIRequest);

TENDER_FINAL

{
  "SaleToPOIRequest":{
    "DisplayRequest":{
      "DisplayOutput":[
        {
          "ResponseRequiredFlag":false,
          "Device":"CashierDisplay",
          "InfoQualify":"Status",
          "OutputContent":{
            "PredefinedContent":{
              "ReferenceID":"Result=Success&TimeStamp=2018-09-27T14:40:18.000Z&TransactionID=faQm001538059218000.8815380592267566&event=TENDER_FINAL"
            },
            "OutputFormat":"MessageRef"
          }
        }
      ]
    },
    "MessageHeader":{
      "SaleID":"POSSystemID12345",
      "ProtocolVersion":"3.0",
      "MessageType":"Request",
      "POIID":"V400m-324688179",
      "ServiceID":"0207111617",
      "MessageClass":"Device",
      "MessageCategory":"Display",
      "DeviceID":"1517998573"
    }
  }
}
String saleID = "YOUR_CASH_REGISTER_ID";
String POIID = "YOUR_TERMINAL_ID";
String serviceID = "YOUR_UNIQUE_ATTEMPT_ID";

SaleToPOIRequest saleToPOIRequest = new SaleToPOIRequest();
DisplayRequest displayRequest = new DisplayRequest();
DisplayOutput displayOutput = new DisplayOutput();
displayOutput.setResponseRequiredFlag( Boolean.FALSE );
displayOutput.setDevice( DeviceType.CASHIER_DISPLAY );
displayOutput.setInfoQualify( InfoQualifyType.STATUS );
OutputContent outputContent = new OutputContent();
PredefinedContent predefinedContent = new PredefinedContent();
predefinedContent.setReferenceID("Result=Success&TimeStamp=2018-09-27T14:40:18.000Z&TransactionID=faQm001538059218000.8815380592267566&event=TENDER_FINAL");
outputContent.setPredefinedContent(predefinedContent);
outputContent.setOutputFormat( OutputFormatType.MESSAGE_REF );
displayOutput.setOutputContent(outputContent);
displayRequest.setDisplayOutput(displayOutput);
saleToPOIRequest.setDisplayRequest(displayRequest);

MessageHeader messageHeader = new MessageHeader();
messageHeader.setSaleID(saleID);
messageHeader.setProtocolVersion("3.0");
messageHeader.setMessageType( MessageType.REQUEST );
messageHeader.setPOIID(POIID);
messageHeader.setServiceID(serviceID);
messageHeader.setMessageClass( MessageClassType.DEVICE );
messageHeader.setMessageCategory( MessageCategoryType.DISPLAY );
messageHeader.setDeviceID("1517998573");
saleToPOIRequest.setMessageHeader(messageHeader);
terminalAPIRequest.setSaleToPOIRequest(saleToPOIRequest);

BALANCE_QUERY_STARTED

{
  "SaleToPOIRequest":{
    "DisplayRequest":{
      "DisplayOutput":[
        {
          "ResponseRequiredFlag":false,
          "Device":"CashierDisplay",
          "InfoQualify":"Status",
          "OutputContent":{
            "PredefinedContent":{
              "ReferenceID":"event=BALANCE_QUERY_STARTED"
            },
            "OutputFormat":"MessageRef"
          }
        }
      ]
    },
    "MessageHeader":{
      "SaleID":"Ray",
      "MessageClass":"Device",
      "MessageCategory":"Display",
      "ServiceID":"S34",
      "POIID":"V400m-324688179",
      "MessageType":"Request",
      "DeviceID":"39288033"
    }
  }
}
String saleID = "YOUR_CASH_REGISTER_ID";
String serviceID = "YOUR_UNIQUE_ATTEMPT_ID";
String POIID = "YOUR_TERMINAL_ID";

SaleToPOIRequest saleToPOIRequest = new SaleToPOIRequest();
DisplayRequest displayRequest = new DisplayRequest();
DisplayOutput displayOutput = new DisplayOutput();
displayOutput.setResponseRequiredFlag( Boolean.FALSE );
displayOutput.setDevice( DeviceType.CASHIER_DISPLAY );
displayOutput.setInfoQualify( InfoQualifyType.STATUS );
OutputContent outputContent = new OutputContent();
PredefinedContent predefinedContent = new PredefinedContent();
predefinedContent.setReferenceID("event=BALANCE_QUERY_STARTED");
outputContent.setPredefinedContent(predefinedContent);
outputContent.setOutputFormat( OutputFormatType.MESSAGE_REF );
displayOutput.setOutputContent(outputContent);
displayRequest.setDisplayOutput(displayOutput);
saleToPOIRequest.setDisplayRequest(displayRequest);

MessageHeader messageHeader = new MessageHeader();
messageHeader.setSaleID(saleID);
messageHeader.setMessageClass( MessageClassType.DEVICE );
messageHeader.setMessageCategory( MessageCategoryType.DISPLAY );
messageHeader.setServiceID(serviceID);
messageHeader.setPOIID(POIID);
messageHeader.setMessageType( MessageType.REQUEST );
messageHeader.setDeviceID("39288033");
saleToPOIRequest.setMessageHeader(messageHeader);
terminalAPIRequest.setSaleToPOIRequest(saleToPOIRequest);

GRATUITY_ENTERED

{
  "SaleToPOIRequest":{
    "DisplayRequest":{
      "DisplayOutput":[
        {
          "ResponseRequiredFlag":false,
          "Device":"CashierDisplay",
          "InfoQualify":"Status",
          "OutputContent":{
            "PredefinedContent":{
              "ReferenceID":"event=GRATUITY_ENTERED"
            },
            "OutputFormat":"MessageRef"
          }
        }
      ]
    },
    "MessageHeader":{
      "SaleID":"POSSystemID12345",
      "ProtocolVersion":"3.0",
      "MessageType":"Request",
      "POIID":"V400m-324688179",
      "ServiceID":"0207111617",
      "MessageClass":"Device",
      "MessageCategory":"Display",
      "DeviceID":"1517998573"
    }
  }
}
String saleID = "YOUR_CASH_REGISTER_ID";
String POIID = "YOUR_TERMINAL_ID";
String serviceID = "YOUR_UNIQUE_ATTEMPT_ID";

SaleToPOIRequest saleToPOIRequest = new SaleToPOIRequest();
DisplayRequest displayRequest = new DisplayRequest();
DisplayOutput displayOutput = new DisplayOutput();
displayOutput.setResponseRequiredFlag( Boolean.FALSE );
displayOutput.setDevice( DeviceType.CASHIER_DISPLAY );
displayOutput.setInfoQualify( InfoQualifyType.STATUS );
OutputContent outputContent = new OutputContent();
PredefinedContent predefinedContent = new PredefinedContent();
predefinedContent.setReferenceID("event=GRATUITY_ENTERED");
outputContent.setPredefinedContent(predefinedContent);
outputContent.setOutputFormat( OutputFormatType.MESSAGE_REF );
displayOutput.setOutputContent(outputContent);
displayRequest.setDisplayOutput(displayOutput);
saleToPOIRequest.setDisplayRequest(displayRequest);

MessageHeader messageHeader = new MessageHeader();
messageHeader.setSaleID(saleID);
messageHeader.setProtocolVersion("3.0");
messageHeader.setMessageType( MessageType.REQUEST );
messageHeader.setPOIID(POIID);
messageHeader.setServiceID(serviceID);
messageHeader.setMessageClass( MessageClassType.DEVICE );
messageHeader.setMessageCategory( MessageCategoryType.DISPLAY );
messageHeader.setDeviceID("1517998573");
saleToPOIRequest.setMessageHeader(messageHeader);
terminalAPIRequest.setSaleToPOIRequest(saleToPOIRequest);

LOAD_STARTED

{
  "SaleToPOIRequest":{
    "DisplayRequest":{
      "DisplayOutput":[
        {
          "ResponseRequiredFlag":false,
          "Device":"CashierDisplay",
          "InfoQualify":"Status",
          "OutputContent":{
            "PredefinedContent":{
              "ReferenceID":"event=LOAD_STARTED"
            },
            "OutputFormat":"MessageRef"
          }
        }
      ]
    },
    "MessageHeader":{
      "SaleID":"POSSystemID12345",
      "ProtocolVersion":"3.0",
      "MessageType":"Request",
      "POIID":"V400m-324688179",
      "ServiceID":"0207111617",
      "MessageClass":"Device",
      "MessageCategory":"Display",
      "DeviceID":"1517998573"
    }
  }
}
String saleID = "YOUR_CASH_REGISTER_ID";
String POIID = "YOUR_TERMINAL_ID";
String serviceID = "YOUR_UNIQUE_ATTEMPT_ID";

SaleToPOIRequest saleToPOIRequest = new SaleToPOIRequest();
DisplayRequest displayRequest = new DisplayRequest();
DisplayOutput displayOutput = new DisplayOutput();
displayOutput.setResponseRequiredFlag( Boolean.FALSE );
displayOutput.setDevice( DeviceType.CASHIER_DISPLAY );
displayOutput.setInfoQualify( InfoQualifyType.STATUS );
OutputContent outputContent = new OutputContent();
PredefinedContent predefinedContent = new PredefinedContent();
predefinedContent.setReferenceID("event=LOAD_STARTED");
outputContent.setPredefinedContent(predefinedContent);
outputContent.setOutputFormat( OutputFormatType.MESSAGE_REF );
displayOutput.setOutputContent(outputContent);
displayRequest.setDisplayOutput(displayOutput);
saleToPOIRequest.setDisplayRequest(displayRequest);

MessageHeader messageHeader = new MessageHeader();
messageHeader.setSaleID(saleID);
messageHeader.setProtocolVersion("3.0");
messageHeader.setMessageType( MessageType.REQUEST );
messageHeader.setPOIID(POIID);
messageHeader.setServiceID(serviceID);
messageHeader.setMessageClass( MessageClassType.DEVICE );
messageHeader.setMessageCategory( MessageCategoryType.DISPLAY );
messageHeader.setDeviceID("1517998573");
saleToPOIRequest.setMessageHeader(messageHeader);
terminalAPIRequest.setSaleToPOIRequest(saleToPOIRequest);

PROVIDE_CARD_DETAILS

{
  "SaleToPOIRequest":{
    "DisplayRequest":{
      "DisplayOutput":[
        {
          "ResponseRequiredFlag":false,
          "Device":"CashierDisplay",
          "InfoQualify":"Status",
          "OutputContent":{
            "PredefinedContent":{
              "ReferenceID":"event=PROVIDE_CARD_DETAILS"
            },
            "OutputFormat":"MessageRef"
          }
        }
      ]
    },
    "MessageHeader":{
      "SaleID":"POSSystemID12345",
      "ProtocolVersion":"3.0",
      "MessageType":"Request",
      "POIID":"V400m-324688179",
      "ServiceID":"0207111617",
      "MessageClass":"Device",
      "MessageCategory":"Display",
      "DeviceID":"1517998573"
    }
  }
}
String saleID = "YOUR_CASH_REGISTER_ID";
String POIID = "YOUR_TERMINAL_ID";
String serviceID = "YOUR_UNIQUE_ATTEMPT_ID";

SaleToPOIRequest saleToPOIRequest = new SaleToPOIRequest();
DisplayRequest displayRequest = new DisplayRequest();
DisplayOutput displayOutput = new DisplayOutput();
displayOutput.setResponseRequiredFlag( Boolean.FALSE );
displayOutput.setDevice( DeviceType.CASHIER_DISPLAY );
displayOutput.setInfoQualify( InfoQualifyType.STATUS );
OutputContent outputContent = new OutputContent();
PredefinedContent predefinedContent = new PredefinedContent();
predefinedContent.setReferenceID("event=PROVIDE_CARD_DETAILS");
outputContent.setPredefinedContent(predefinedContent);
outputContent.setOutputFormat( OutputFormatType.MESSAGE_REF );
displayOutput.setOutputContent(outputContent);
displayRequest.setDisplayOutput(displayOutput);
saleToPOIRequest.setDisplayRequest(displayRequest);

MessageHeader messageHeader = new MessageHeader();
messageHeader.setSaleID(saleID);
messageHeader.setProtocolVersion("3.0");
messageHeader.setMessageType( MessageType.REQUEST );
messageHeader.setPOIID(POIID);
messageHeader.setServiceID(serviceID);
messageHeader.setMessageClass( MessageClassType.DEVICE );
messageHeader.setMessageCategory( MessageCategoryType.DISPLAY );
messageHeader.setDeviceID("1517998573");
saleToPOIRequest.setMessageHeader(messageHeader);
terminalAPIRequest.setSaleToPOIRequest(saleToPOIRequest);

Próximos passos