Ask for a Tip on the Card Reader
On-Reader Tipping makes it really easy for your merchants to collect tips from
their guests: At the
beginning of each transaction, the guest is asked whether he wants to give a tip
and then can enter the tip amount right on the card reader.
Ask for a Tip with the PayButton
Create
TransactionProcessParameters
and provide them to
createTransactionIntent
:
TransactionProcessParameters transactionProcessParameters = new TransactionProcessParameters.Builder()
.addAskForTipStep()
.build();
Intent intent = MposUi.getInitializedInstance().createTransactionIntent(params,
transactionProcessParameters
);
startActivityForResult(intent, MposUi.REQUEST_CODE_PAYMENT);
Ask for a Tip with the mPOS SDK
Create
TransactionProcessParameters
and provide them to
startTransaction
:
TransactionProcessParameters transactionProcessParameters = new TransactionProcessParameters.Builder()
.addAskForTipStep()
.build();
TransactionProcess paymentProcess =
transactionProvider.startTransaction(transactionParameters,
accessoryParameters,
transactionProcessParameters
, this);
You can access the included tip amount via the
getDetails().getIncludedTipAmount()
method of the
Transaction
object:
System.out.println("Included Tip: " + transaction.getDetails().getIncludedTipAmount());