FILTER BY TAG

Sale with On-Reader Tipping

Use this information to process a sale with on-reader tipping. At the start of each transaction, the device prompts the customer to add a tip by showing suggested tip amounts and a no-tip option. The customer chooses or enters an amount before presenting their payment card.
  1. Create the online payment service.
  2. Create a
    Tipping
    configuration for the on-reader tip options.
  3. Add the tipping configuration to the
    ChargeParameters
    object and call
    startChargeTransaction(with:)
    .
    // Throws MposUIReaderError.notActivated if device is not activated let online = try await reader.mposUIOnline() // Percentage choices let tipConfig = Tipping.percentageChoice([5, 10, 15]) // Custom tip amount input // let tipConfig = Tipping.input(.tipAmount()) // Total amount including tip // let tipConfig = Tipping.input(.totalAmount()) let chargeParameters = ChargeParameters(amount: Decimal(1.00), currency: .USD, customIdentifier: "yourReferenceForTheTransaction", tip: tipConfig) let charge = await online.startChargeTransaction(with: chargeParameters)