Skip to main content

Troubleshooting

NSBluetoothAlwaysUsageDescription or NSLocationWhenInUseUsageDescription is not in Info.plist. If an app uses Bluetooth or location without the usage description, iOS stops the app. Add the two keys. Refer to Before you start.
isSupported is always false. Examine each of these items:
  • The device is an iPhone XS or later with iOS 18 or later. An iPad cannot use Tap to Pay.
  • You sign the app with the Tap to Pay on iPhone entitlement.
  • Your app does not add a version of WhopTTPCore that is different from the version that WhopTTP uses.
charge throws .readerIncompatible. WhopTTP and WhopTTPCore must come from the same release. Add only WhopTTP to your app. Swift Package Manager then adds the correct WhopTTPCore. If you added WhopTTPCore, remove it. Then select File → Packages → Reset Package Caches.Whop also sends this code when it does not accept your SDK version for an account. Update WhopTTP. Then release a new build.
charge throws .invalidCredentials. The token is for the other environment. If you create a TapToPay without environment, it uses production. Thus, your server must use a production API key. In sandbox, the key and TapToPay(…, environment: .sandbox) must both be for sandbox.
charge throws .requestFailed with an underlyingCode of 403. Thus, the token cannot charge this account. Make sure that these conditions are true:
  • Your server creates the token with the same biz_ ID in account_id that you give to TapToPay(accountID:).
  • scoped_actions includes payment:charge and payment:basic:read.
  • The API key has the two permissions on the account.
  • readiness() returns .active.
charge throws .credentialsUnavailable. Your token provider threw an error or returned an empty string. Call your token endpoint manually. Make sure that it returns { "token": "…" }. If a token provider throws a TapToPayError, the SDK gives you that error.
The first charge connects the reader. It can also install a reader update, which .updatingReader(progress:) shows. The charges after it use the same connection and start sooner. Call prepare() when the app starts and each time that it comes back to the foreground. Then the connection is ready before the seller charges.
The seller must sign in to an Apple Account under Settings on the iPhone. If the seller does not, charge throws .termsNotAccepted.
A different TapToPay instance in your app runs a charge, or it did not complete a charge. Only one charge can run on a device at a time. Keep one TapToPay for each account while your payment screen is open. Do not create a new instance for each charge.
The business address of the account is not in a supported country. Or, the account cannot accept card payments. Examine the business address on the account. The location of the iPhone is not important.

Common questions

This hardware is not necessary. The NFC reader of the iPhone reads contactless cards, phones, and watches.
This SDK supports only iPhone. Tap to Pay on iPhone does not run on an iPad.
Do not put a key in your app. A person can remove a key from an app bundle. A key can create tokens. Create short-lived tokens on your server. Refer to Authentication.
Create a TapToPay for each account. Give each instance its own token provider. Only one charge can run on the device at a time, for all accounts.
Refund a Tap to Pay payment as you refund other Whop payments, with its pay_ ID. Refer to Refunds and disputes.
Tap to Pay payments show in the payments of the account on Whop, the same as other payments. They also show in the Payments API. Use metadata to connect them to your records.
The SDK does not keep card data. iOS reads the card. Your app does not receive the card number. The SDK keeps the emails of buyers only in memory.
For a charge, your app must be in the foreground, because iOS shows its Tap to Pay screen over the app. The Bluetooth background mode is not necessary.

Next steps

Handle errors

Each error code in detail.

Get help

Contact Whop developer support.