Void Transactions
A Void transaction is used to cancel a sale or refund before it has been settled. Unlike a refund, which returns funds after a transaction has been finalized, a void stops the transaction from completing and prevents it from appearing in the customer’s bank account.
To void a specific transaction, the RRN (Retrieval Reference Number) of the original sale or refund is required. This ensures the app targets and cancels the correct transaction before it is submitted for settlement.
Import the payload provided below into your code to void a transaction.
// MARK: - PayloadParameter [Void]
struct VoidTxnData: VoidPayloadParameter {
var rrn: String, // Reference Retrieval Number
var tranType: TransType, // Transaction Type
var showApprovalScreen: Bool? //Optional
}
let void = VoidTxnData(
rrn: "502213502779", // Sample RRN
tranType: .VOID, // Void transaction type
showApprovalScreen: true
)
// Start the Void transaction using this method.
readerInstance.startVoid(params: void, delegate: self)Parameter Name
Parameters Name | Type | Description | Sample |
rrn * | String | Unique transaction ID | 502213502779 |
tranType * | Enum | Transaction type | .VOID |
showApprovalScreen | Bool | Determines whether the approval confirmation screen should be displayed. | FALSE |
What made this section helpful for you?
What made this section unhelpful for you?
On this page
- Void Transactions