Terminal Options
Timeouts, receipt formatting and payment settings for a Terminal.
Terminal identity (terminalId/posId), how to reach the terminal (Terminal.Builder.connectionOptions), the logger (Terminal.Builder.logger), and per-instance listeners (Terminal.Builder.onStateChanged/Terminal.Builder.onDisplayContent) are configured directly on Terminal.Builder - Terminal.builder is the only way to construct a Terminal. Pass a TerminalOptions to Terminal.Builder.terminalOptions for everything else; every field defaults to the same value Terminal uses when Terminal.Builder.terminalOptions is never called.
TerminalOptions options = TerminalOptions.builder()
.commitTimeout(Duration.ofSeconds(30))
.charactersPerLine(32)
.build();
Terminal terminal = Terminal.builder()
.terminalId("30189069")
.posId("101")
.connectionOptions(connectionOptions)
.terminalOptions(options)
.build();Obtain a Builder via TerminalOptions.builder.
Parameters
how long a single payment may take before the SDK gives up waiting. Defaults to 6 minutes. Keep this above the terminal service limit of 5 minutes, so that a real answer from the service always wins over a local timeout. A cardholder searching for a card and entering a PIN easily needs a minute, so do not tune this down to a few seconds.
total budget for a commit/rollback POST and status confirmation, and for Terminal.resume to keep polling Terminal.fetchTransactionStatus while it reports IN_PROGRESS. Defaults to 60 seconds.
number of characters that fit on one line of a printed receipt, used to format Receipt.content. Defaults to 42.
how long the terminal waits for a card to be inserted/tapped.
how long the terminal waits for a card to be removed after the transaction concluded.
whether the cardholder is offered the option to add a tip. Defaults to false.
whether Dynamic Currency Conversion is offered to the cardholder. Defaults to true.
true (the default) to let the terminal make the commit decision automatically for every transaction; false to require an explicit UncommittedTransactionResult.commit/UncommittedTransactionResult.rollback call instead. See "Staged payments" in the README. Applies to every Terminal.startTransaction/Terminal.startTransactionAsync call made by this Terminal instance - there is no per-request override.
Types
Fluent builder for TerminalOptions. Obtain one via TerminalOptions.builder.