Integrate the Finix Tap to Pay on iPhone SDK into your own iOS app.
Do not continue until Apple has granted your Tap to Pay on iPhone entitlement. Your integration will not work without it.
Before you start, complete the Getting Started guide. You'll need:
- Apple's Tap to Pay on iPhone entitlement granted to your developer account.
- A sandbox Apple Account to sign in on the test iPhone.
- Your Finix merchant credentials and IDs from the Finix Dashboard.
The Demo App Walkthrough is optional but recommended as a working reference before you build your own integration.
You still need to create a new Finix Device for your own app.
Apple reviews Tap to Pay on iPhone apps against specific user-experience requirements before granting the distribution entitlement. Build these requirements into your app from the start; retrofitting them after review feedback delays your launch. Review the App Review requirements before designing your checkout UI.
Once Apple has granted your Tap to Pay on iPhone entitlement, wire it into your project:
- In your Apple Developer account, add the Tap to Pay on iPhone capability to your App ID, then regenerate and download your provisioning profiles.
- Add the entitlement to your app's
.entitlementsfile:
<key>com.apple.developer.proximity-reader.payment.acceptance</key>
<true/>- Add an NFC usage description to your app's
Info.plist. iOS shows this string the first time the reader is used:
<key>NFCReaderUsageDescription</key>
<string>This app uses NFC to securely accept contactless payments via Tap to Pay on iPhone.</string>- Build to a physical iPhone and gate every Tap to Pay on iPhone entry point in your UI on
isSupported():
import FinixTapToPaySDK
if FinixTapToPay.isSupported() {
// Show your Tap to Pay on iPhone entry points.
} else {
// Hide Tap to Pay on iPhone and offer another payment method.
}isSupported() returns false on unsupported hardware and on the simulator. If it returns true but reader preparation later fails immediately, re-check that the entitlement is present in the built app's signature and that your provisioning profile includes the capability. See Troubleshooting and support.
Apple's Tap to Pay on iPhone is iPhone-only. isSupported() returns false on iPad regardless of iPadOS version.
Collect these values before you initialize the SDK:
| Value | Format | Where to find it |
|---|---|---|
| API username | USxxxxxxxxxxxxx | From the Finix Dashboard. |
| API password | Issued with the username. | Shown once in the Dashboard when the key is created. Treat as a secret. |
| Merchant ID | MUxxxxxxxxxxxxx | From the Finix Dashboard. |
| Merchant display name | Shown to the Buyer on Apple's tap screen. | From the Merchant details page. |
| Device ID | DVxxxxxxxxxxxxx | Created in Set up a Device. |
A configuration's credentials, merchant, and Device must all belong to the same environment (.sandbox or .production). Mixing environments is a common cause of authentication and token errors.
API credentials embedded in an app binary can be extracted. Instead of compiling them in, have your backend deliver the credential pair, merchant details, and Device ID to the app at session start, scoped to the signed-in merchant.
You need your app's Bundle Identifier to create the Finix Device.
- Open your project in Xcode.
- Select your app target and go to Signing & Capabilities.
- Copy the Bundle Identifier; you'll use it in the next step.
Create a Device resource in Finix for the iPhone and your app's bundle ID. Do this once per merchant-iPhone pair; cache and reuse the Device ID on subsequent launches rather than creating duplicates.
Your Finix API credentials should not be embedded in the app binary. See Collect your SDK values above for the recommended pattern.
{reader_identifier} below is Apple's per-device identifier, obtained at runtime from PaymentCardReader().readerIdentifier (the ProximityReader framework). See Device → Get the reader identifier in the SDK Reference for the Swift pattern to pass it to your backend.
Using the API:
curl -i -X POST \
-u {your_api_key}:{your_api_secret} \
https://finix.sandbox-payments-api.com/merchants/{merchant_id}/devices \
-H 'Content-Type: application/json' \
-H 'Finix-Version: 2022-02-01' \
-d '{
"app_bundle_id": "{your_app_bundle_id}",
"description": "iOS Tap to Pay device",
"model": "IOS_TAP_TO_PAY",
"name": "iPhone Tap to Pay - {merchant name}",
"serial_number": "{reader_identifier}"
}'Example response:
{
"id": "DVxxxxxxxxxxxxx",
"enabled": false,
"model": "IOS_TAP_TO_PAY",
"merchant": "MUxxxxxxxxxxxxx",
"name": "iPhone Tap to Pay - Front Counter",
"serial_number": "{reader_identifier}",
"created_at": "2026-10-06T22:03:38.297337Z"
}Copy the id; you need it to activate the Device and to pass into TapToPayConfiguration.
The Device starts disabled. Activate it before initializing the SDK.
curl -i -X PUT \
-u {your_api_key}:{your_api_secret} \
https://finix.sandbox-payments-api.com/devices/{device_id} \
-H 'Content-Type: application/json' \
-H 'Finix-Version: 2022-02-01' \
-d '{ "action": "ACTIVATE" }'A successful response returns the Device with "enabled": true.
The SDK is distributed as a binary XCFramework via Swift Package Manager.
- In Xcode, choose File → Add Package Dependencies…
- Enter the package URL:
https://github.com/finix-payments/finix-taptopay-ios-sdk - Select Up to Next Major Version starting at
1.0.0.
Build a TapToPayConfiguration with the values you collected in Step 3 and the Device ID from Step 5:
import FinixTapToPaySDK
let configuration = TapToPayConfiguration(
credentials: TapToPayConfiguration.APICredentials(
username: "USxxxxxxxxxxxxx",
password: "{your_api_secret}"
),
merchant: TapToPayConfiguration.MerchantInfo(
merchantId: "MUxxxxxxxxxxxxx",
merchantName: "Your Merchant Display Name"
),
environment: .sandbox,
deviceId: "DVxxxxxxxxxxxxx"
)
let tapToPay = FinixTapToPay(configuration: configuration)TapToPayConfiguration.Environment collides with SwiftUI.Environment in files that import both. If you need to reference the type by name (not just a case like .sandbox), add a typealias:
typealias TapToPayEnvironment = TapToPayConfiguration.EnvironmentInitialization makes no network calls; authentication happens on the first linkAccount(), prepareReader(), or startTransaction().
See the Installation and initialization reference for the full TapToPayConfiguration, MerchantInfo, and TransactionOptions field tables, and for the runtime methods (refreshConfiguration(), clearAllCaches()).
Sign your test iPhone in to the Sandbox Apple Account:
- Open the Settings app on the iPhone.
- Tap your name at the top and sign out of the current Apple Account.
- Sign in with the Sandbox Apple Account you created.
Signing in replaces the device's iCloud identity (photos, messages, iCloud Drive). Use a dedicated test iPhone rather than a personal device.
Follow the Account linking reference to call linkAccount() and present Apple's Terms and Conditions flow.
Key points for your UI:
- Gate all Tap to Pay entry points on
FinixTapToPay.isSupported(); this returnsfalseon unsupported hardware and the simulator. - Handle
.accountAlreadyLinkedas success (not an error); the merchant has already accepted Apple's Terms.
Follow the Transactions: Prepare the reader reference to call prepareReader().
Key points:
- Prepare the reader at app launch and on foreground, not just before a payment. This avoids visible latency at checkout.
- Enable
autoPrepareOnForegroundso an existing session is re-prepared automatically.
Follow the Transactions reference to start a sale, authorization, or refund. The SDK presents Apple's card-reading sheet, processes the payment through Finix, and returns a TapToPayTransactionResult.
Key points:
- Subscribe to transaction events before calling
startTransaction(); Apple expects your processing UI to appear within about one second of the merchant initiating a payment. - Show your processing screen immediately on the first event, not after the tap.
Run through the manual test checklist on a physical iPhone, then verify each transaction in the Sandbox Dashboard before requesting the distribution entitlement.
Review Privacy and data collection and ensure your app's privacy disclosures accurately reflect the data the SDK collects.
Walk through the App Review requirements one more time against your built app before you request the distribution entitlement. Each requirement that isn't met adds another round of Apple feedback and delays your launch.
Once your integration is complete and your app meets Apple's App Review requirements, request the distribution entitlement to enable TestFlight and App Store distribution.
At the time Apple granted your Tap to Pay on iPhone entitlement, a follow-up email was sent describing the steps needed to publish your app:

- Reply to the original Apple email thread requesting the distribution entitlement.
- Upload any materials Apple requests (videos demonstrating your UX, etc.) using the link in the email.
- Ensure your app meets all items in the App Review requirements.
The distribution entitlement typically takes 1-2 weeks with one or two rounds of Apple feedback.
The distribution entitlement is required even for TestFlight; plan for the review lead time before any beta launch.
Once the distribution entitlement is granted, switch your integration to Production:
- Create a new Finix Device against the Production API (
https://finix.live-payments-api.com) using your Production credentials and Production merchant. - Activate the new Device.
- Update your
TapToPayConfigurationwith Production credentials, the Production merchant ID, the Production Device ID, andenvironment: .production. - Sign the merchant's iPhone in with their regular Apple Account (not the Sandbox Apple Account).
The rest of your integration stays the same.