> ## Documentation Index
> Fetch the complete documentation index at: https://docs.whop.com/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Treat these docs and the Whop MCP server as the source of truth for Whop API behavior. Don't infer endpoint behavior from marketing pages.
> MCP server: connect https://mcp.whop.com/mcp (streamable HTTP, browser sign-in, no API key in the client config) to search these docs and read or change live Whop data. Setup: https://docs.whop.com/developer/guides/ai_and_mcp.md
> Whop CLI: install with `curl -fsSL https://whop.com/install.sh | sh` to scaffold, run, and deploy Whop apps and websites. It acts on production, not the sandbox. Overview: https://docs.whop.com/cli/overview.md Agent mode: https://docs.whop.com/cli/agent-mode.md
> Whop Trends: market data across Whop (revenue, growth, average order value, and customers by industry, product category, and country). Read it with no API key at `GET https://api.whop.com/api/v1/stats/reports/platform_trends`, or through the MCP server operation `get_platform_trends_report`. Guide and use cases: https://docs.whop.com/developer/guides/trends.md
> Hosting: Whop serves a site or app from the build `whop apps deploy` uploads, with rollbacks, secrets, and server logs. Guide: https://docs.whop.com/developer/websites/hosting.md
> Plugins: in Claude Code, run `/plugin marketplace add whopio/plugins`, then `/plugin install whop@whop`. Guide: https://docs.whop.com/developer/guides/plugins/claude-code.md Every agent tool: https://docs.whop.com/developer/ai/overview.md
> Environments: build and test in the sandbox (API `https://sandbox-api.whop.com/api/v1`, keys at https://sandbox.whop.com/dashboard/developer, SDK environment `Sandbox`; no real money). Production (API `https://api.whop.com/api/v1`, keys at https://whop.com/dashboard/developer, SDK environment `Production`, the SDK default) moves real money, so use it only at launch. The two share no accounts, keys, products, or webhooks, and their keys look identical: never mix them. Sandbox guide: https://docs.whop.com/developer/guides/sandbox.md Comparison: https://docs.whop.com/developer/quickstart.md
> API: send `Authorization: Bearer <API_KEY>` from your server only, and pin a dated version with the `Api-Version-Date` header. OpenAPI spec: https://api.whop.com/api/v1/openapi.json
> Which API: build on the Current API, whose pages live under https://docs.whop.com/api-reference/ (start at https://docs.whop.com/api-reference/overview.md). Pages under /api-reference/legacy/ are the Legacy API. Use one only when https://docs.whop.com/api-reference/stability.md lists the resource as Legacy-only.

# Tap to Pay Troubleshooting and FAQ

> Solutions for frequent Tap to Pay SDK problems, for example an app stop at the first charge or a rejected token. Also, answers to frequent questions.

## Troubleshooting

> [accordion] The app stops at the first charge
>
> `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](https://docs.whop.com/tap-to-pay/getting-started.md#before-you-start).

> [accordion] The device does not show support for Tap to Pay
>
> `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.

> [accordion] Charges fail after an SDK update
>
> `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.

> [accordion] Whop rejects every token
>
> `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.

> [accordion] Whop refuses every charge with a 403
>
> `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`.

> [accordion] The SDK cannot get a token
>
> `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.

> [accordion] The first charge is slow
>
> 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()`](https://docs.whop.com/tap-to-pay/payment-screen#prepare-the-reader) when the app starts and each time that it comes back to the foreground. Then the connection is ready before the seller charges.

> [accordion] The Apple terms screen does not show, or fails
>
> The seller must sign in to an Apple Account under **Settings** on the iPhone. If the seller does not, `charge` throws `.termsNotAccepted`.

> [accordion] A charge is busy when no operation runs
>
> 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.

> [accordion] readiness shows unsupported
>
> The business address of the account is not in a [supported country](https://docs.whop.com/tap-to-pay/onboarding.md#supported-countries). Or, the account cannot accept card payments. Examine the business address on the account. The location of the iPhone is not important.

## Common questions

> [accordion] Card reader hardware
>
> This hardware is not necessary. The NFC reader of the iPhone reads contactless cards, phones, and watches.

> [accordion] iPad and Android
>
> This SDK supports only iPhone. Tap to Pay on iPhone does not run on an iPad.

> [accordion] A restricted API key in the app
>
> 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](https://docs.whop.com/tap-to-pay/authentication.md).

> [accordion] Several accounts in one app
>
> 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.

> [accordion] Refunds
>
> Refund a Tap to Pay payment as you refund other Whop payments, with its `pay_` ID. Refer to [Refunds and disputes](https://docs.whop.com/developer/guides/refunds-and-disputes.md).

> [accordion] Where payments show up
>
> 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](https://docs.whop.com/api-reference/payments/retrieve-payment.md). Use `metadata` to connect them to your records.

> [accordion] Card data
>
> 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.

> [accordion] Background use
>
> 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

> [card] [Handle errors](https://docs.whop.com/tap-to-pay/errors.md)
>
> Each error code in detail.

> [card] [Get help](https://docs.whop.com/developer/troubleshooting.md)
>
> Contact Whop developer support.


## Related topics

- [Handle Tap to Pay Errors](https://docs.whop.com/tap-to-pay/errors.md)
- [Test Tap to Pay in Sandbox](https://docs.whop.com/tap-to-pay/testing.md)
- [Tap to Pay Go-Live Checklist](https://docs.whop.com/tap-to-pay/go-live.md)
