Getting Started

Install the SDK, set up the native project and check device requirements.

Requirements

Your app must meet these minimums:

RequirementMinimum
React Native0.83
React19.2
iOS deployment target16.0
Android compileSdk35
Kotlin Gradle Plugin2.2

Install

npm install @lemonway/terminal@beta @stripe/[email protected]

Install the native Tap to Pay module at the exact version above: the SDK is tested with it only. react and react-native must already be in your app.

🚧

Yarn or React Native CLI

Yarn does not install peer dependencies, and the React Native CLI only links native modules listed in your package.json. Make sure the native Tap to Pay module is in your package.json at the version above. To list every peer dependency of the SDK:

npm info @lemonway/terminal peerDependencies
📘

Expo Go is not supported

Tap to Pay needs native code. Use an Expo development build or the React Native CLI.


Configure the native project

Add the config plugin to app.json, then run npx expo prebuild.

{
  "expo": {
    "plugins": [
      [
        "@lemonway/terminal",
        {
          "locationWhenInUsePermission": "Location access is required to accept in-person payments.",
          "iosTapToPayEntitlement": true
        }
      ]
    ]
  }
}
OptionDefaultDescription
locationWhenInUsePermissionLocation access is required to accept in-person payments.Text of the iOS location permission prompt.
iosTapToPayEntitlementtrueAdds the iOS Tap to Pay entitlement. Set it to false until Apple has enabled Tap to Pay on your App ID, or iOS signing fails.

The plugin:

  • adds the location permission and the Android permissions,
  • sets Android minSdkVersion to 26 (it never lowers a higher value),
  • adds the Tap to Pay process guard to MainApplication,
  • adds the iOS Tap to Pay entitlement,
  • disables R8 minification and resource shrinking in Android release builds to prevent startup failures with the Expo 58 template.

List the plugin after any other plugin that configures release shrinking. Run npx expo prebuild again and rebuild the native app after changing these settings.


Device requirements

Tap to Pay runs on a physical phone only, never on an emulator or simulator.

  • iPhone XS or later, on the latest iOS version (not a beta).
  • Apple's Tap to Pay on iPhone entitlement for your bundle identifier. Apple first grants a development entitlement; TestFlight and App Store releases need the distribution entitlement.
  • On the first connection, a merchant admin accepts Apple's Tap to Pay terms with their Apple ID.
  • Apple requires the app to explain Tap to Pay to merchants: follow Apple's Human Interface Guidelines for Tap to Pay on iPhone.
📘

Permissions

On Android, LemonwayTerminalRoot requests foreground location before initializing. It requests ACCESS_COARSE_LOCATION on Android 12 and later and ACCESS_FINE_LOCATION on Android 11 and earlier. Real Tap to Pay requires Android 13 or later. Subscribe to terminal.error before mounting the root to handle a denied permission.


Did this page help you?