Skip to main content
If your integration uses local communications, you need to protect your integration against man-in-the-middle attacks, eavesdropping, and tampering. To help you with this, we provide GitHub libraries that:
  • Validate the terminal certificate, to confirm your POS app is communicating directly with an Adyen-supplied payment terminal.
  • Encrypt communications. This prevents intruders from reading the messages transmitted between the POS app and the terminal.
These GitHub libraries work with Terminal API and are completely separate from the classic libraries, which have been deprecated.

Encrypt communications

The available libraries are: The libraries will:
  • Serialize the request object to JSON and then encrypt and sign the request.
  • Send the request and receive the response.
  • Decrypt and deserialize the response and pass the content to the response object.
Select a tab below for the Adyen GitHub library you want to use.

Preparation

Make sure that you have:

Encrypt communications using the .NET library

  1. In your C# project, import the required types.
  2. Create an EncryptionCredentialDetails object specifying the identifier, passphrase, and version of your shared key. (For instructions, see Set up a shared key.)
  3. Create a Config object specifying the IP address of the terminal (for example, https://198.51.100.1:8443/nexo) and the environment: Test or Live.
  4. Initialize a client using the config from the previous step.
  5. Create the TerminalApiLocalService using the client from the previous step.
  6. Make an asynchronous or synchronous call to send a Terminal API request to the payment terminal using the TerminalApiLocalService.
The library also contains information about how to use local communications without encryption. However, that is only allowed on test while working in parallel on implementing encryption.