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.
Asking for the Tip Amount
                  
The workflow to ask for a tip is shown below.
 
MPTransactionProcessTippingStepParameters
 with the
                  tippingAmountParametersWithOptionalsBlock
 and use them to create
                the MPTransactionProcessParameters
. Then pass them along as
                  processParameters
 to
                  startTransactionWithParameters
: MPTransactionProcessTippingStepParameters *params = [MPTransactionProcessTippingStepParameters tippingAmountParametersWithOptionalsBlock: ^(id<MPTransactionProcessTippingAmountStepParametersOptionals> _Nonnull optionals) { [optionals setShowConfirmationScreen:YES]; [optionals setFormatWithIntegerDigits:6 fractionDigits:2]; }]; MPTransactionProcessParameters *pp = [MPTransactionProcessParameters parametersWithSteps: ^(id<MPTransactionProcessParametersSteps> steps) { [steps setTippingStepParameters:params]; }]; MPTransactionProcess *process = [transactionProvider startTransactionWithParameters:transactionParameters accessoryParameters:accessoryParametersprocessParameters:pp registered:/*...*/ statusChanged:/*...*/ actionRequired:/*...*/ completed:/*...*/];
Asking for the Total Amount
 
                In order to ask the shopper to enter the total amount (including a potential
                  tip), create the 
MPTransactionProcessTippingStepParameters
 with
                  the tippingTotaltParametersWithOptionalsBlock
 and use them to
                  create the MPTransactionProcessParameters
. Then pass them along
                  as processParameters
 to
                    startTransactionWithParameters
:MPTransactionProcessTippingStepParameters *params = [MPTransactionProcessTippingStepParameters tippingTotaltParametersWithOptionalsBlock: ^(id<MPTransactionProcessTippingTotalStepParametersOptionals> _Nonnull optionals) { [optionals setShowConfirmationScreen:NO]; [optionals setFormatWithIntegerDigits:6 fractionDigits:2]; }]; MPTransactionProcessParameters *pp = [MPTransactionProcessParameters parametersWithSteps: ^(id<MPTransactionProcessParametersSteps> steps) { [steps setTippingStepParameters:params]; }]; MPTransactionProcess *process = [transactionProvider startTransactionWithParameters:transactionParameters accessoryParameters:accessoryParametersprocessParameters:pp registered:/*...*/ statusChanged:/*...*/ actionRequired:/*...*/ completed:/*...*/];
Getting the Tip Amount
details.includedTipAmount
 property of the
                  MPTransaction
 object that you receive as part of the
                  completed
 block:
                NSLog(@"Included Tip: %@",transaction.details.includedTipAmount);
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.
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);
Ask for the Total Amount
 
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
getDetails().getIncludedTipAmount()
 method of
                the Transaction
 object:
                System.out.println("Included Tip: " + transaction.getDetails().getIncludedTipAmount());
