FILTER BY TAG

Pre-Authorization

Use this information to process a pre-authorization for an initial amount. This transaction places a temporary hold on the customer's payment card. The transaction amount can be captured at a later time.
Most authorizations expire in 5 to 7 days. The issuing bank sets this period of time. When an authorization expires with the issuing bank, your bank or processor might require you to re-submit an authorization request and include a request for capture in the same message. For more information, see Capture.
Follow these steps to process a pre-authorization.
  1. Create a
    ChargeParameters
    object and provide the required information for the payment.
  2. Use the
    startChargeTransaction
    method to initiate the transaction flow.
    let chargeParameters = ChargeParameters(amount: Decimal(1.00), currency: .USD, customIdentifier: "yourReferenceForTheTransaction", autocapture: false) let charge = await mposUi.startChargeTransaction(with: chargeParameters)
  3. After the transaction is completed, get the results of the transaction.
    switch charge { case .success(let transaction): print("Transaction with id: %@ completed with state: %@", transaction.identifier, transaction.status) case .failure(let error): print("Transaction failed with error: %@", error.localizedDescription) }
  4. To get complete transaction details, access the
    transaction
    object.