What you’ll build
- A paywall screen that displays available plans with pricing
- A purchase flow that handles payments through Whop
- Error handling for cancelled or failed purchases
Prerequisites
- Install the SDK
- A Whop company with at least one product and plan
- An API key with the
iap:readpermission from your Developer Settings
Step 1: Configure the SDK
Initialize the SDK in your app’s entry point with your API key:Find your company ID in the URL of your Whop Dashboard (starts with
biz_). Find your plan IDs in the Products tab under each plan (starts with plan_).Step 2: Display available plans
Use theplans property to show available subscription options:
Step 3: Handle the purchase flow
When a user taps “Subscribe”, the SDK automatically:- Presents a checkout sheet with the Whop payment flow
- Handles payment processing
- Dismisses the sheet when complete
- Returns the result or throws an error

