FILTER BY TAG

Tap to Pay on iPhone Payment Services

Use this information to process the payment services featured in the Tap to Pay on iPhone Solution.

Sale

Use this information to process a sale transaction. This type of transaction combines an authorization and a capture into a single transaction.
Follow these steps to process a sale.
  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") let charge = await mposUi.startChargeTransaction(with: chargeParameters)
  3. When the transaction is complete, you can view the result 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.

Refund

Use this information to process a refund using a reference to the original transaction for a full or partial transaction amount. Stand-alone credits are also supported in this Acceptance Devices solution. For more information, see Stand-Alone Credit.
Follow these steps to process a refund.
  1. Use the
    refundTransaction
    method to start the transaction flow.
    let linkedRefund = await mposUi.refundTransaction(withID: "transactionIdentifier", //Specify amount and currency for partial refunds partiallyWithAmount: (Decimal(1.00), .USD))
  2. When the transaction is complete, you can view the result of the transaction.
    switch linkedRefund { case .success(let transaction): print("Transaction with id: %@ completed with state: %@", transaction.identifier, transaction.status) case .cancelledByUser: print("Transaction canceled.") case .error(let developerInfo): print("Transaction failed. Info: %@", developerInfo) }
  3. To get complete transaction details, access the
    transaction
    object.

Stand-Alone Credit

Use this information to process a stand-alone credit. This transaction is used to process a credit without reference to the original transaction. The customer is required to present their payment card for this type of transaction.
WARNING
When processing a stand-alone credit, there is no limit on the credit amount because there is no reference to the original transaction amount. The recommendation is to use a refund transaction whenever possible. For more information, see Refund.
Follow these steps to process a stand-alone credit.
  1. Create a
    RefundParameters
    object and provide the required information for the payment.
  2. Use the
    startStandaloneRefundTransaction
    method to initiate the transaction flow.
    let refundParameters = RefundParameters(amount: Decimal(1.00), currency: .USD, customIdentifier: "yourReferenceForTheTransaction") let refund = await mposUi.startStandaloneRefundTransaction(with: refundParameters)
  3. After the transaction is completed, get the results of the transaction.
    switch refund { 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.

Check Transaction Status

Use this information to check the status of a transaction.

Check Transaction Status Using the
showSummary
Method

To submit a check transaction status request, you must have the
transactionIdentifier
value for the transaction that you want to check.
Use the check transaction status request to obtain response data for a transaction that was lost or timed out. When you send the request using the
showSummary
method, the transaction details are shown on the Summary screen.
Follow these steps to request a check transaction status.
  1. Use the
    showSummary
    method to open the Summary screen.
    let summary = await mposUi.showSummary(forID: "transactionIdentifier")
  2. After the activity is complete, you can view the results of the activity.
    switch summary { case .success(let transaction): print("Summary screen was shown for transaction with id %@", transaction.identifier) case .failure(let error): print("Error checking transaction status or displaying summary screen: %@", error.localizedDescription) }
  3. To view the full transaction details, access the
    transaction
    object.

Check Transaction Status Using the
lookupTransaction
Method

To submit a check transaction status request, you must have the
transactionIdentifier
value for the transaction that you want to check.
Use the check transaction status request to obtain response data for a transaction that was lost or timed out. When you send the request using the
lookupTransaction
method, the transaction details are shown in the
transaction
object.
Follow these steps to request a check transaction status.
  1. Use the
    lookupTransaction
    method to find the transaction details.
    let result = await mposUI.lookupTransaction(forID: "transactionIdentifier")
  2. After the activity is complete, you can view the results of the activity.
    switch result { case .success(let transaction): print("Lookup successful for id %@", transaction.identifier) case .notFound: print("Transaction not found.") case .networkError(let developerInfo): print("Lookup failed. Info: %@", developerInfo) case .unexepcted(let developerInfo): print("Lookup failed. Info: %@", developerInfo) }
  3. To view the full transaction details, access the
    transaction
    object.

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.
Follow these steps to process a sale with on-reader tipping.
  1. Create a
    ChargeParameters
    object and provide the required information for the payment.
  2. Use the
    startChargeTransaction
    method to initiate the transaction flow.
    // Use to display three tipping percentage choices let tipConfig = Tipping.percentageChoice([5, 10, 15]) // Use to ask for tip amount // let tipConfig = Tipping.input(.tipAmount()) // Use to ask for total transaction amount including tip // let tipConfig = Tipping.input(.totalAmount()) let chargeParameters = ChargeParameters(amount: Decimal(1.00), currency: .USD, customIdentifier: "yourReferenceForTheTransaction", tip: tipConfig) 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.

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.

Incremental Authorization

Use this information to process an incremental authorization. This transaction can be applied to a pre-authorization request to increase the authorized amount before it is captured.
Follow these steps to process an incremental authorization.
  1. Use the
    incrementTransaction
    method to initiate the transaction flow.
    let increment = await mposUi.incrementTransaction(withID: "transactionIdentifier", withAmount: (Decimal(1.00), .USD))
  2. After the transaction is completed, get the results of the transaction.
    switch increment { case .success(let transaction): print("Transaction with id: %@ completed with state: %@", transaction.identifier, transaction.status) case .cancelledByUser: print("Transaction canceled.") case .error(let developerInfo): print("Transaction failed. Info: %@", developerInfo) }
  3. To get complete transaction details, access the
    transaction
    object.

Capture

Use this information to capture a pre-authorized transaction. The capture request references the approved pre-authorization request.
Follow these steps to process a capture.
  1. Use the
    captureTransaction
    method to start the transaction flow.
    let capture = await mposUi.captureTransaction(withID: "transactionIdentifier", //Specify amount and currency for partial captures partiallyWithAmount: (Decimal(1.00), .USD))
  2. After the transaction is completed, get the results of the transaction.
    switch capture { case .success(let transaction): print("Transaction with id: %@ completed with state: %@", transaction.identifier, transaction.status) case .cancelledByUser: print("Transaction canceled.") case .error(let developerInfo): print("Transaction failed. Info: %@", developerInfo)
  3. To get complete transaction details, access the
    transaction
    object.

Email a Customer Receipt

Use this information to email the receipt for a previous transaction to a customer.
Follow these steps to email a customer receipt.
  1. Use the
    sendEmailReceipt
    method to start the flow for emailing a receipt.
    let email = await mposUi.sendEmailReceipt(forID: "transactionIdentifier")
  2. After the emailing activity is completed, get the results of the activity.
    switch email { case .success: print("Operation completed.") case .cancelByUser: print("Operation canceled.") case .error(let developerInfo): print("Operation failed. Info: %@", developerInfo) }