API Reference
Welcome to the Expo IAP API documentation. Here you'll find comprehensive guides and references for all the features and functionality available in Expo IAP.
Available APIs
🎣 useIAP Hook
The main React hook for handling in-app purchases in your application.
- Purchase products and subscriptions
- Restore previous purchases
- Handle purchase states and loading
- Complete transactions
⚠️ Error Codes
Comprehensive list of all error codes that can be returned by Expo IAP.
- Centralized error management
- Platform-specific error mappings
- Troubleshooting guidelines
- Error handling best practices
Quick Start
import {useIAP} from 'expo-iap';
function MyComponent() {
const {products, purchaseProduct, restorePurchases, isLoading, error} =
useIAP();
// Your component logic here
}
TypeScript Support
Expo IAP is built with TypeScript and provides full type safety for all APIs. All types are automatically exported when you install the package.
Need Help?
- Check our Getting Started Guide
- Visit our GitHub repository
- Read our Blog for latest updates