Asking for a Tip
On-Reader Tipping makes it easy for your merchants to ask for a tip from their guests. At the beginning of each transaction, the guest can be asked whether they
want to add a tip and can then enter the tip amount on the card reader. This
feature also enables you to ask the guest to enter the total amount of the
transaction, including a potential tip, on the card reader.
Contact your account manager to activate this feature.
On-reader tipping is currently only
available on the Miura card readers.
Asking for the Tip Amount
The workflow to ask for a tip is shown below.
In order to ask the shopper to enter the tip amount, create
TippingProcessStepParameters
with
askForTipAmount()
and use them to create the
TransactionProcessParameters
. Then pass along the process
parameters to
startTransaction
:
TippingProcessStepParameters steps = new TippingProcessStepParameters.Builder()
.askForTipAmount()
.showConfirmationScreen(true)
.numberFormat(6, 2).build();
TransactionProcessParameters transactionProcessParameters = new TransactionProcessParameters.Builder()
.addStep(steps)
.build();
TransactionProcess paymentProcess =
transactionProvider.startTransaction(transactionParameters,
accessoryParameters,
transactionProcessParameters
, this);
The workflow for asking for a tip
is shown below.
In order to ask the shopper to enter the total amount (including a potential
tip), create the
TippingProcessStepParameters
with the
askForTotalAmount()
and use them to create the
TransactionProcessParameters
. Then pass along the process
parameters to
startTransaction
:
TippingProcessStepParameters steps = new TippingProcessStepParameters.Builder()
.askForTotalAmount()
.showConfirmationScreen(false)
.numberFormat(6, 2).build();
TransactionProcessParameters transactionProcessParameters = new TransactionProcessParameters.Builder()
.addStep(steps)
.build();
TransactionProcess paymentProcess =
transactionProvider.startTransaction(transactionParameters,
accessoryParameters,
transactionProcessParameters
, this);
Getting the Included Tip Amount
You can access the included
tip amount via the
getDetails().getIncludedTipAmount()
method of
the
Transaction
object:
System.out.println("Included Tip: " + transaction.getDetails().getIncludedTipAmount());