Showing Payment Result


The YocoSDK.showPaymentResult() is an optional API flow that will show the user a success or error screen.


  1. paymentResult: PaymentResult - result returned from [YocoSDK.getPaymentResult()]
  2. params: PaymentParameters - (Optional) Provides additional info regarding the payment
    1. receiptDelegate: ReceiptDelegate? - (Optional) Receipt screen callback handler and util
  3. rootViewController: UIViewController? - (Optional) Presenting view controller, nil if result screen needs to be presented from UIWindow.rootViewController
  4. completionHandler: YocoCompletionHandler<PaymentResult>? - (Optional) Completion handler invoked when result screen is dismissed


Before calling the SDK showPaymentResult() method, you will first need to retrieve the PaymentResult from the SDK getPaymentResult(), which can then be passed as a parameter to show the user a success or error screen based on that transaction.

import YocoSDK
// Required:
let paymentResult: PaymentResult = <Result from Yoco.getPaymentResult()>
// Optional: Params containing additional for advanced functionality
let params = PaymentParameters(
receiptDelegate = this
// Initiating showing the Payment Result
paymentParameters: params,
rootViewController: rootViewController,
) { paymentResult in

If no user has logged in, you WILL be prompted to login using your Yoco account details. If successful, it will continue to the payment flow.

Handling Receipts

Handling Payment Result