React Native IAP
React Native IAP is a powerful in-app purchase solution for Expo and React Native applications that conforms to the Open IAP specification. It provides a unified API for handling in-app purchases across iOS and Android platforms with comprehensive error handling and modern TypeScript support.
If you're shipping an app with react-native-iap, we’d love to hear about it—please share your product and feedback in Who’s using React Native IAP?. Community stories help us keep improving the ecosystem.
Promotion

Compile-time CSS-in-JS for React Native
✨ Banishing runtime overhead, one style at a time with kstyled - fully type-safe styling that compiles away.
Sponsors & Community Support
We're building the OpenIAP ecosystem—defining the spec at openiap.dev, maintaining openiap for the shared type system, and shipping native SDKs such as openiap Apple and openiap Google. These modules power react-native-iap, flutter_inapp_purchase, kmp-iap, and react-native-iap. After simplifying fragmented APIs, the next milestone is a streamlined purchase flow: initConnection → fetchProducts → requestPurchase → (server receipt validation) → finishTransaction.
Your sponsorship keeps this work moving—ensuring more developers across platforms, OS, and frameworks can implement IAPs without headaches while we expand to additional plugins and payment systems. Sponsors receive shout-outs in each release and, depending on tier, can request tailored support. If you’re interested—or have rollout feedback to share—you can view sponsorship options at openiap.dev/sponsors.
📚 Guides
- Installation: Complete guide to implementing in-app purchases
- Purchase Lifecycle: Understanding connection management and best practices
- Purchase Implementation: Detailed purchase flow and event handling
- FAQ: Frequently asked questions and solutions
- Support: Getting help and community resources
🚀 Quick Start
Installation
Install the package using your favorite package manager:
npm install react-native-iap react-native-nitro-modules
Starting from v14.4.0, react-native-iap uses Nitro Modules for native bridging. For more details, see the announcement discussion.
Basic Usage
import {useIAP, ErrorCode} from 'react-native-iap';
const {connected, products, fetchProducts, requestPurchase, finishTransaction} =
useIAP({
onPurchaseSuccess: async (purchase) => {
// Validate on your server, then finish
await finishTransaction({purchase, isConsumable: true});
},
onPurchaseError: (error) => {
if (error.code !== ErrorCode.UserCancelled) {
console.error('Purchase error:', error.message);
}
},
});
// Fetch products when connected
useEffect(() => {
if (connected) {
fetchProducts({skus: ['product_id'], type: 'in-app'});
}
}, [connected]);
// Purchase (platform-specific)
await requestPurchase({
request: {
apple: {sku: 'product_id'},
google: {skus: ['product_id']},
},
type: 'in-app',
});
For complete examples, see Purchase Flow and Subscription Flow.
🏗️ Architecture
React Native IAP is built with a modern architecture that emphasizes:
- Type Safety: Comprehensive TypeScript definitions for all APIs
- Error Resilience: Centralized error handling with meaningful error codes
- Platform Abstraction: Unified API that handles platform differences internally
- Performance: Optimized for minimal bundle size and runtime performance
📱 Platform Support
| Platform | Support | Notes |
|---|---|---|
| iOS | ✅ | StoreKit 1 & 2 (StoreKit 2 requires iOS 15+) |
| Android | ✅ | Google Play Billing v5+ |
| Expo Go | ⚠️ | Limited (requires custom development client) |
| Expo Dev Client | ✅ | Full support |
| Bare React Native | ✅ | Full support |
🎯 What's Next?
📦 Setup & Configuration
- Installation Guide: Install and configure React Native IAP
- iOS Setup: App Store Connect and Xcode configuration
- Android Setup: Google Play Console setup
🔧 Implementation
- API Reference: Complete useIAP hook documentation
- Purchase Flow Example: Simple product purchase flow
- Available Purchases Example: Restore and list prior purchases
📚 Guides
- Installation: Complete guide to implementing in-app purchases
- Purchase Lifecycle: Understanding connection management and best practices
- Purchase Implementation: Detailed purchase flow and event handling
- FAQ: Frequently asked questions and solutions
- Support: Getting help and community resources
🛠️ Advanced Topics
- Purchase Verification: Secure purchase verification
- Error Handling: Comprehensive error management
- Subscriptions Flow Example: Handle recurring subscriptions
- Troubleshooting: Common issues and solutions
🤝 Contributing
We welcome contributions! Please see our Contributing Guide for details.
📝 License
This project is licensed under the MIT License - see the LICENSE file for details.
