Apple In-App Purchase
Apple In-App Purchase (IAP) is required whenever your iOS app sells digital products or services. If your website already has a payment system, it works fine inside the app for physical goods and real-world services. But for digital content — premium features, virtual items, subscriptions — Apple mandates that purchases go through their own payment system.
When Is IAP Required?
| Selling | Requires Apple IAP |
|---|---|
| Premium features, subscriptions | Yes |
| Digital content (ebooks, videos, courses) | Yes |
| Virtual currency or in-app items | Yes |
| Physical products (clothing, furniture) | No |
| Real-world services (consulting, delivery) | No |
Supported Product Types
| Type | Description |
|---|---|
| Consumable | Can be purchased multiple times. Examples: credits, coins, extra lives. |
| Non-Consumable | Purchased once and owned permanently. Examples: removing ads, unlocking a feature. |
| Auto-Renewable Subscription | Renews automatically. Examples: monthly premium, yearly membership. |
Setting Up Products in App Store Connect
- Log in to App Store Connect and open your app.
- Create the product:
- Enter the Product ID in the format
bundle_id.product_slug, for example:com.example.app.premium_monthly. - Set the price, availability, and localization. Save.
- Go to your App Version page, scroll to In-App Purchases, click Add, and attach the product.
Integrating with Your Website
When your website is running inside the iOS app, your existing payment buttons need to be intercepted and rerouted through the JavaScript Bridge. See the Apple In-App Purchase JavaScript Bridge article for full implementation details, including how to trigger the purchase and handle the response.
Important Notes
- Product IDs must match exactly between App Store Connect and your JavaScript code.
- Always verify purchases on your backend server before delivering the product.
- Use Apple's Sandbox environment for testing before submitting to the App Store.
- This is iOS-only. On Android, your website's payment system works as normal.