Skip to content

Test your integration

This reference assumes you have completed the Integration Guide. Testing runs on a physical iPhone (XS or later, iOS 18.1 or later) against the Finix Sandbox, with the Sandbox Apple Account signed in as the iPhone's primary account (see Create an Apple Sandbox Account and the sign-in step covered in the Integration Guide).

Sandbox transactions don't move real money

With the Sandbox Apple Account signed in as the device's primary account, the Terms and Conditions flow and card reads run against Apple's Sandbox. You can tap physical Finix sandbox test cards or Apple Pay Sandbox test cards (Visa, Mastercard, American Express, Discover) added to Wallet on a second Sandbox-signed-in device.

Primary Apple Account, not the App Store Sandbox setting

Settings → App Store → Sandbox Account only affects In-App Purchase testing. It has no effect on Tap to Pay on iPhone or Wallet. The Sandbox tester must be the account the whole device is signed in to.

No iOS betas

Tap to Pay on iPhone does not work on beta releases of iOS. Test on release iOS versions.

Try the demo app

The Finix Tap to Pay on iPhone demo app is a working SwiftUI reference integration you can run against your Sandbox credentials. See the Demo App Walkthrough for setup.

Write unit tests

Your app-level logic (receipts, persistence, UI state) can be tested without a device. The result type's memberwise initializer is internal; use the public mock factory to construct results in your test target:

ReceiptRendererTests.swift
import XCTest
import FinixTapToPaySDK
@testable import YourApp

final class ReceiptRendererTests: XCTestCase {
    func testRendersApprovedReceipt() {
        let result = TapToPayTransactionResult.mock(
            amount: 1250,
            currency: "USD",
            cardBrand: "VISA",
            last4: "4242",
            transferId: "TRxxxxxxxxxxxxx",
            transferState: "SUCCEEDED"
        )

        let receipt = ReceiptRenderer().render(result)

        XCTAssertTrue(receipt.contains("$12.50"))
        XCTAssertTrue(receipt.contains("VISA •••• 4242"))
    }
}

mock(amount:currency:...) provides default values for the card fields and nil for the transfer fields. Override the fields your test asserts on.

Manual test checklist

Run through these on a physical iPhone before requesting the distribution entitlement:

  • First link: fresh install, sign-in, linkAccount() presents Apple's Terms and Conditions.
  • Re-link: call linkAccount() again; confirm your app treats .accountAlreadyLinked as success.
  • Cold and warm prepare: first prepareReader() after install (slow) and after foregrounding (fast); your indeterminate progress UI shows during user-visible preparation.
  • Sale, authorization, and refund: one of each; verify each Transfer in the Sandbox Finix Dashboard.
  • Cancel mid-read: dismiss the tap sheet and cancel from your UI; both paths surface .transactionCancelled and return to checkout cleanly.
  • Backgrounding: background the app mid-flow; confirm you re-prepare on foreground and no reader call runs from the background.
  • Un-activated Device: point at a Device that was never activated; confirm your recovery path (re-provision) works.
  • Unsupported device: on the simulator or an old iPhone, confirm Tap to Pay on iPhone entry points are hidden by your isSupported() gate.

Verify Contactless Transactions in the Dashboard

After a test transaction, confirm end-to-end that the transaction reached Finix and recorded as a contactless, Tap-to-Pay payment.

  1. In the Finix Dashboard, enter the Merchant's ID and hit Enter.
  2. Open a transactions view (for example, Payments and authorizations).
  3. Select the transaction from the list.
Selecting a contactless transaction from the Finix Dashboard transactions list
  1. In the drawer that opens, confirm under Payment Details:
  • Created Via is Card Present iOS Tap To Pay SDK (or similar).
  • Entry Type is Contactless.
Transfer detail drawer showing Created Via and Entry Type for a Tap to Pay transaction

Next: Privacy and data collection.