Sale Transactions
A Sale transaction is the most common type of payment operation performed. It represents a standard purchase where the customer pays for goods or services using a supported payment method, such as a credit card, debit card, or tap to pay.
Import the payload provided below into your code to perform sale transactions.
// Payload of saleStruct
let sale = TxnData
(
amount: 1,
currencyCode: .USD,
tranType: .SALE,
tipAmount: 1.00, //Optional
feeAmount: 5.00, //Optional
showTipScreen: true, //Optional
showBreakUpScreen: true, //Optional
showApprovalScreen: true //Optional
)
// Start the transaction using this method.
readerInstance.startTransaction(param: sale, delegate: self)Below is the tabular representation of the Sale Struct payload:
Parameters Name | Type | Description | Sample |
tranType * | Enum | Specifies the type of transaction, such as SALE. | .SALE |
amount * | String | Transaction amount | 10.00 |
tipAmount | String | Tip amount (optional) | 1.00 |
feeAmount | Decimal | The additional fee amount, if applicable. | 5.00 |
currencyCode * | Enum | Transaction currency | .usd |
showTipScreen | Bool | Determines whether the tip input screen should be displayed. | TRUE |
showBreakUpScreen | Bool | Determines whether the amount breakdown screen should be displayed. | TRUE |
showApprovalScreen | Bool | Determines whether the approval confirmation screen should be displayed. | TRUE |
What made this section helpful for you?
What made this section unhelpful for you?
On this page
- Sale Transactions