The transaction amount in cents (e.g., 1200 = $12.00).
Instance Method
sale(amount:breakdown:currency:eventId:type:)
Processes a payment using the specified amount and currency.
Declaration
func sale(amount: Int, breakdown: PaymentBreakdown?, currency: CurrencyCode, eventId: String? = nil, type: PaymentType = .sale) async throws -> TransactionResponse
Parameters
amount
-
breakdown
-
Optional breakdown of tax, tip, etc.
currency
-
The transaction currency (e.g.,
.usd
). eventId
-
Optional unique identifier for tracking (UUID4 format).
type
-
The payment type to use (default is
.sale
).
Return Value
A TransactionResponse
representing the sale outcome.
Discussion
This method initiates a new sale transaction, typically the default for most purchases.