Developing Tap to Pay

Configure your iOS project for Tap to Pay on iPhone development with the Stax iOS SDK.

📘

Currently Tap to Pay is in Beta Release. If you would like to participate, please reach out to your Account Manager.


Prepare your development environment

  1. Use Stax iOS SDK 2.5 or later with iOS 17.4 or later and Xcode 16.4.x or later.
  2. Create an Apple sandbox account and sign in on your test device.
  3. Have your Apple Developer Account Holder request development entitlements (permissions Apple grants to enable restricted app capabilities).
iOS Minimum Version

Use iOS 17.4 or later with Stax iOS SDK 2.5+ to support all required card networks. Build with Xcode 16.4.x or later to avoid Swift compile-time compatibility errors.

Apple Sandbox Account

Create a sandbox account in App Store Connect under Users and Access > Sandbox. Sign in to that account on the device you use for Tap to Pay development.

Entitlements

Apple Tap to Pay requires additional entitlements, which must be requested by the Apple Developer Account Holder. These entitlements are divided into two types:

  • Developer Entitlements: Enables application development on devices registered under the Apple Developer account.
  • Publishing Entitlements: Used when the application is ready for release on the Apple App Store.
    The form for requesting entitlements can be found here.
    To access the request form, you must have an organization-level Apple Developer account
    and be logged in as the Account Holder. Additionally, you will need to verify that NMI is your approved Payment Service Provider (PSP) and confirm the regions where you plan to deploy your application.

Before requesting publishing entitlements, review Appendix B, Apple User Experience Requirements, in the materials supplied with your entitlement approval. Preparing your app for Apple's review supports your compliance efforts; it does not guarantee approval or legal compliance. Consult your legal team regarding specific compliance requirements.

When you’re ready to apply for publishing entitlements, reply to the email that supplied your development entitlements and include the Case ID assigned to your request. Apple will provide instructions for submitting your application for review.

Restrictions

Tap To Mobile is an always-on feature and cannot function without an internet connection at the point of interaction.

Offline transactions are not supported. Keep your test device connected to the internet throughout the payment flow.

GEOFENCING RESTRICTIONS
Tap to Mobile uses geofencing as a fraud-prevention measure. The API key associated with the Stax-provided testing merchant is US-only, so Tap to Pay testing must be completed on a US-based device.

Additionally, transaction processing is currently restricted to the United States.


Configure your project

Use these development defaults: App Attest environment development, Tap to Pay payment acceptance enabled, NFC format TAG, and location authorization CLAuthorizationStatus.authorizedWhenInUse. These settings target local development, not an App Store release.

  1. After Apple approves your development entitlements, add App Attest, NFC Tag Reading, and Tap to Pay on iPhone to your application's Identifier. These capabilities enable app verification, NFC access, and payment acceptance.
  2. Select Tap to Pay on iPhone under your Identifier's Additional Capabilities. This option appears after Apple approves your development entitlements.
  3. Create a new provisioning profile (Apple's signing configuration linking your app to its approved capabilities) for that Identifier and add it to your Xcode project.
  4. Configure the entitlements file, dependencies, and Info.plist entries below before building your app.

Use the new provisioning profile when signing your development build so it includes the approved capabilities.



Set development entitlements

Set these values explicitly in your application's .entitlements file. The keys below are the raw property-list keys, not Xcode's display labels.

KeyTypeDevelopment value and constraints
com.apple.developer.devicecheck.appattest-environmentString"development" for local development. App Attest verifies that requests come from your app.
com.apple.developer.proximity-reader.payment.acceptanceBooleantrue; enable payment acceptance with Apple's approved entitlement.
com.apple.developer.nfc.readersession.formatsArray of strings["TAG"]; enables the tag-reading format used by this configuration.

If your project has no entitlements file:

  1. In Xcode, choose File > New > File, select Resource > Property List, and click Next.
  2. Name the file TapToPay.entitlements and click Create.
  3. Open your application target's Build Settings, then select All and Combined.
  4. Search for Code Signing Entitlements and enter the path to the file you created in step 2, relative to your project directory.

Use the following complete property list for a new TapToPay.entitlements file. If your file already contains other entitlements, merge these three entries into its existing <dict> instead of replacing the file.

<?xml version="1.0" encoding="UTF-8"?>
<plist version="1.0">
  <dict>
    <key>com.apple.developer.devicecheck.appattest-environment</key>
    <string>development</string>
    <key>com.apple.developer.proximity-reader.payment.acceptance</key>
    <true/>
    <key>com.apple.developer.nfc.readersession.formats</key>
    <array>
      <string>TAG</string>
    </array>
  </dict>
</plist>

From the directory containing the file, run:

plutil -lint TapToPay.entitlements

Expected output:

TapToPay.entitlements: OK

If validation reports a parsing error, check for missing closing tags or entries outside <dict>. If the file is missing, run the command from its directory. Syntax validation does not confirm that Apple has approved your entitlements or that your provisioning profile includes them.



📘

Plan time to review Apple's User Experience Requirements before requesting publishing entitlements. Apple reviews your implementation as part of the publishing entitlement process; the development configuration above does not establish release readiness.



In addition to the Stax iOS SDKs usual dependencies, you will also need to link against the following to work:

  • CloudCommerce.xcframework
  • idtech

In Xcode, open Application target > General > Frameworks, Libraries, and Embedded Content, add CloudCommerce.xcframework, and set its Embed option to Embed and Sign.

Please look at the Stax iOS SDK - API for Release Documentation supplied
within the release bundle for a more detailed breakdown of required dependencies for running the Stax iOS SDK.


Verify your development setup

  1. Confirm that both property-list validation commands report OK.
  2. Build your application in Xcode using the provisioning profile that includes Apple's approved development entitlements. A successful build has no signing or entitlement errors.
  3. Test on an internet-connected, US-based device running iOS 17.4 or later, signed in to your Apple sandbox account, and grant location access when prompted.

If the build fails with entitlement or signing errors, check that your application's Identifier has all three capabilities enabled and that you selected the newly created provisioning profile. If SDK configuration fails, check location permission, internet connectivity, and the US-only restriction on the Stax-provided testing merchant.

Your project configuration is ready when the property lists validate and the app builds with the approved capabilities. To check the SDK connection at runtime without starting a payment, run the optional connection check below. A successful build or connection does not confirm payment acceptance or Apple's publishing approval.

Optional: Verify the SDK connection in Swift

  1. Enable Tap to Pay for your Stax account through your Account Manager, use an iPhone XS or later, and enable an iPhone passcode. Without a passcode, Tap to Pay can report an error that resembles a connection failure.
  2. Initialize and retain an Omni instance using iOS SDK using a Mobile Reader. Obtain an ephemeral token (a temporary authentication credential) from your backend, keep your long-term API key on your server, and wait for the SDK's initialization completion callback.
  3. Add this helper to a Swift file in your app target, then call verifyTapConnection(omni:) with your initialized Omni instance. Keep the device connected to the internet and grant location access before attempting the connection.
import Fattmerchant

func verifyTapConnection(omni: Omni) {
    guard #available(iOS 17.4, *) else {
        print("Tap to Pay requires iOS 17.4 or later.")
        return
    }

    // Check the connection separately so setup validation does not initiate a charge.
    omni.connectToTap(completion: {
        print("Connected to Tap to Pay. No payment was started.")
    }, error: { _ in
        // Avoid logging potentially sensitive SDK error details.
        print("Tap to Pay connection failed. Check device requirements, passcode, account enablement, SDK initialization, location permission, and connectivity before retrying.")
    })
}

A successful connection prints:

Connected to Tap to Pay. No payment was started.

On an earlier iOS version, the helper prints Tap to Pay requires iOS 17.4 or later. and returns without connecting. If the error callback runs, check the listed requirements and the US-only testing restriction before retrying; do not proceed to payment processing after a failed connection.

After a successful connection, follow Starting a Tap to Pay Transaction to validate the payment flow separately. This connection check does not submit a transaction or confirm publishing approval.


Did this page help you?