Quick triage
API request errors
Whop returns standard HTTP status codes. When a request fails, the response body tells you why. Most errors include a code and a message:error and error_description fields instead. See OAuth errors for those cases.
Rate limits
For/api/v1 requests, Whop tracks request volume per API operation and API credential. The default limit is 600 requests per minute.
When you exceed the limit, the API returns 429 with:
API authentication
Use the credential that matches where the code runs.
If an API request fails:
- Confirm the base URL matches the key: use
https://api.whop.com/api/v1for production keys andhttps://sandbox-api.whop.com/api/v1for sandbox keys. - Confirm IDs use Whop tag prefixes like
biz_,user_,mem_,plan_,prod_,app_,pay_, orch_, not internal numeric IDs. - Log the HTTP status, response body, endpoint, and request ID if Whop returns one.
- Retry only when the error is transient or rate-limited. Don’t retry
401,403, or validation errors without changing the request.
Permissions and scopes
403 and insufficient_scope errors usually mean the credential is valid but can’t perform that action.
- For Whop apps, confirm the app requests the required permissions in Permissions, then save the app settings and reinstall or reauthorize when needed.
- For OAuth, request only the scopes your feature needs, then make sure the user completed the OAuth flow after you added those scopes.
- For dashboard-created API keys, confirm the key belongs to the company you are passing as
company_id. - For connected accounts, confirm whether the parent company or child company should own the action before choosing the
company_id.
OAuth errors
OAuth errors return a standard payload or redirect query string witherror and error_description.
Checkout errors
Embedded checkout and iOS checkout can fail for different reasons. Debug them the same way: check the plan or checkout configuration, inspect the callback, and confirm fulfillment on your server.Embedded checkout
- If checkout redirects to
returnUrlwithstatus=error, show a retry state and remount checkout. - If you pass
planId, confirm the plan exists, is active, and belongs to the company you expect. - If you pass
sessionId, confirm your server created the checkout configuration and the session hasn’t expired. - If external payment methods redirect away from your page, provide a
returnUrlthat points to a route capable of rendering success and retry states. - Use webhooks for fulfillment. Client-side
onCompleteor redirect status is useful for UI, but your server should rely onpayment.succeeded.
iOS checkout
Handle expected and unexpected failures with different paths:
Webhook delivery
Common webhook issues:- No event received: confirm the webhook URL is publicly reachable, uses
https, and belongs to the right company and environment. - Signature verification fails: pass the raw request body to
whopsdk.webhooks.unwrap. Don’t parse JSON before verification. - Retries keep happening: return a
2xxresponse quickly after verification, before starting long-running work in a background job. - Duplicate fulfillment: Whop delivers webhooks at least once. Store
webhook-idor another event identifier and make the handler idempotent. - Unexpected order: don’t assume events arrive in chronological order. Fetch the current resource state when ordering matters.
Embedded element errors
SDK elements such asVerifyElement and ResetAccountElement emit error when initialization or operation fails.
Always attach an error handler while developing:
- Confirm you created the session token for the company and user you expect.
- Confirm the container exists and is empty before calling
mount. - Listen for
readyso you know whether the element initialized. - If the element enters an unrecoverable state, call
unmount()and create a new element instance. - For payout and verification elements, confirm the user is eligible for that flow in the current environment.
Sandbox and production
Sandbox data and production data are separate.
When switching from sandbox to production:
- Create new production API keys.
- Remove the SDK
baseURL/base_urlsandbox override. - Recreate sandbox-only products, checkout links, webhooks, and connected-account records in production.
- Confirm webhook URLs point to production infrastructure, not a local tunnel.
What to include when asking for help
Include as much of the following as you can:- The endpoint, SDK method, or element name that failed.
- The environment: sandbox or production.
- The status code, error body, OAuth
error_description, or elementonErrorvalue. - The Whop IDs involved, with secrets removed.
- The webhook event ID or
webhook-idheader for webhook issues. - A short code snippet showing how you create the client, checkout, OAuth URL, webhook handler, or element.
OAuth
Build the OAuth 2.1 + PKCE flow and handle token refresh.
Webhooks
Verify signatures before processing events, and handle retries.
Permissions
Choose app permissions and explain them to creators.
Test in sandbox
Test API calls and checkout flows without touching production.

