Ask for a Tip on the Card Reader

On-Reader Tipping makes it really simple 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 Pay Button

Create MPTransactionProcessParameters and provide them to createTransactionViewController:

MPTransactionProcessParameters *pp = [MPTransactionProcessParameters parametersWithSteps:
									  ^(id  _Nonnull steps)
									  {
										  [steps addAskForTipStepWithSuggestedAmount:nil];
									  }];

UIViewController *viewController =
	[ui createTransactionViewControllerWithTransactionParameters:tp
											   processParameters:pp
													   completed:/*...*/];

Ask for a Tip with the mPOS SDK

Create MPTransactionProcessParameters and provide them to startTransactionWithParameters:

MPTransactionProcessParameters *pp = [MPTransactionProcessParameters parametersWithSteps:
									  ^(id  _Nonnull steps)
									  {
										  [steps addAskForTipStepWithSuggestedAmount:nil];
									  }];

MPTransactionProcess *process =
[transactionProvider startTransactionWithParameters:transactionParameters
								accessoryParameters:accessoryParameters
								  processParameters:pp
										 registered:/*...*/
									  statusChanged:/*...*/
									 actionRequired:/*...*/
										  completed:/*...*/];					  

Get the Tip Amount

After the transacton has been completed, you can access the included tip amount via the details.includedTipAmount property of the MPTransaction object that you receive as part of the completed block:

NSLog(@"Included Tip: %@",transaction.details.includedTipAmount);

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 Pay Button

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);

Get the 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());

Can we help you?

If you cannot find your answer, contact us and we'll get in touch with you soon.

© Copyright 2018 Payworks GmbH. Legal.