Class AdyenLocalTerminal


public class AdyenLocalTerminal extends AdyenCloudTerminal

Any Adyen payment terminal, reached directly over the shop's network with Adyen's local Terminal API -- no internet round trip, so a sale keeps working when the till's connection to Adyen is slow.

It speaks the same messages as AdyenCloudTerminal and does everything it does. The difference is the transport: each message is encrypted and authenticated with a key shared with the terminal, configured in the Customer Area under the terminal's Integrations settings (key identifier, passphrase and version).

String passphrase = null; // load from secure storage, never ship it in code
AdyenLocalTerminal terminal = new AdyenLocalTerminal("192.168.1.40", "POS-1", "V400m-346403161",
        "mykey", passphrase, 1);
terminal.collect(new TerminalPaymentRequest(1099, "EUR").setReference("order-7"))
        .ready(result -> System.out.println(result));
Trust

The terminal answers HTTPS on port 8443 with a certificate issued by Adyen's own authority to a name no device can resolve, so the platform's certificate check is skipped. What proves that an answer came from the terminal is the message itself: every answer must carry an HMAC made with the shared key, and one that does not is rejected. Keep the passphrase out of the app's code and storage a customer can read.

  • Constructor Details

    • AdyenLocalTerminal

      public AdyenLocalTerminal(String host, String saleId, String poiId, String keyIdentifier, String passphrase, int keyVersion)
      Parameters
      • host: the terminal's IP address or host name on the shop network

      • saleId: your identifier for this point of sale, such as a till number

      • poiId: the terminal's ID, [model]-[serial number]

      • keyIdentifier: the shared key's identifier

      • passphrase: the shared key's passphrase

      • keyVersion: the shared key's version

  • Method Details

    • setTransport

      public void setTransport(TerminalTransport transport)

      Replaces the transport underneath the encryption; every message still goes through it encrypted.

      Parameters
      • transport: the transport
      Overrides:
      setTransport in class AdyenCloudTerminal