Client API. The Codename One framework your app is built on: this runs on the device, not in a backend.

public enum TerminalOperation

  1. Object
  2. Enum<TerminalOperation>
  3. TerminalOperation

ImplementsComparable<TerminalOperation>

The operations a PaymentTerminal can perform, as reported by PaymentTerminal.supports(TerminalOperation).

A terminal asked for an operation it does not support completes the request with an UnsupportedOperationException and never touches the card, so checking first is a courtesy to the user rather than a safety requirement.

Enum constants

SALECharge the card now: PaymentTerminal.collect(TerminalPaymentRequest).
PRE_AUTHORIZATIONReserve an amount to capture later, as a hotel or a bar tab does: TerminalPaymentRequest.setPreAuthorization(boolean).
CAPTURETake money reserved by a pre-authorization: PaymentTerminal.capture(String, long, String).
REVERSALCancel a payment that has not settled yet, so it never shows on the statement: PaymentTerminal.reverse(String).
REFUNDReturn money for an earlier payment, by its transaction ID: PaymentTerminal.refund(TerminalRefundRequest).
UNLINKED_REFUNDReturn money to a card presented now, with no earlier payment to refer to.
LOOKUPFind out what became of a payment, by the app’s own reference: PaymentTerminal.lookup(String).
RECONCILIATIONClose the day’s batch and report its totals: PaymentTerminal.reconcile().
TIPPINGLet the customer add a tip on the terminal: TerminalPaymentRequest.setAskForTip(boolean).
CASHBACKHand the customer cash on top of the purchase: TerminalPaymentRequest.setCashbackAmount(long).
RECEIPT_DATAReport the data a card receipt must print, through TerminalResult.getReceipt().

Methods

public static TerminalOperation[] values()
public static TerminalOperation valueOf(String name)

Inherited methods

Enum constant details

SALE

SALE

PRE_AUTHORIZATION

PRE_AUTHORIZATION
Reserve an amount to capture later, as a hotel or a bar tab does: TerminalPaymentRequest.setPreAuthorization(boolean).

CAPTURE

CAPTURE
Take money reserved by a pre-authorization: PaymentTerminal.capture(String, long, String).

REVERSAL

REVERSAL
Cancel a payment that has not settled yet, so it never shows on the statement: PaymentTerminal.reverse(String).

REFUND

REFUND
Return money for an earlier payment, by its transaction ID: PaymentTerminal.refund(TerminalRefundRequest).

UNLINKED_REFUND

UNLINKED_REFUND
Return money to a card presented now, with no earlier payment to refer to.

LOOKUP

LOOKUP
Find out what became of a payment, by the app’s own reference: PaymentTerminal.lookup(String).

RECONCILIATION

RECONCILIATION
Close the day’s batch and report its totals: PaymentTerminal.reconcile().

TIPPING

TIPPING
Let the customer add a tip on the terminal: TerminalPaymentRequest.setAskForTip(boolean).

CASHBACK

CASHBACK
Hand the customer cash on top of the purchase: TerminalPaymentRequest.setCashbackAmount(long).

RECEIPT_DATA

RECEIPT_DATA
Report the data a card receipt must print, through TerminalResult.getReceipt().

Method details

values

public static TerminalOperation[] values()

valueOf

public static TerminalOperation valueOf(String name)