Check Transaction Status with myPOS iOS SDK

This guide shows you how to check the status of a payment or refund in your iOS app using the myPOS SDK. Follow the steps below to easily track your transactions.

What You Need:

  • Order ID – The unique identifier for the transaction
  • Transaction Type – Specify if it’s a Purchase or a Refund

How to Check Transaction Status

Use the getOrderStatusFor method to retrieve:

  • The status of the transaction
  • The transaction reference
MobilePaymentSDK.getOrderStatusFor(orderId,
                                   transactionType: type,
                                   completed: { (status, reference) in
                                    self.showAlertWithText("Order \(orderId). " +
                                                           "Status - \(status) | " + 
                                                           "Reference - \(reference)")
},
                                   failed: { (error) in
                                    self.showAlertWithText("Error while getting order status: " +
                                                           "\(error.message)")
})

Pro Tip

Always check both the status and the transaction reference to accurately track payments or refunds in your system!