Skip to main content

🛒 flutter_inapp_purchase

A comprehensive Flutter plugin for implementing in-app purchases on iOS and Android platforms.

flutter_inapp_purchase Logo

🚀 What is flutter_inapp_purchase?

This is an In App Purchase plugin for Flutter. This project has been forked from react-native-iap. We are trying to share same experience of in-app-purchase in flutter as in react-native.

We will keep working on it as time goes by just like we did in react-native-iap.

✨ Key Features

  • Cross-platform: Works seamlessly on both iOS and Android
  • StoreKit 2 Support: Full StoreKit 2 support for iOS 15.0+ with automatic fallback
  • Billing Client v8: Latest Android Billing Client features
  • Type-safe: Complete TypeScript-like support with Dart strong typing
  • Comprehensive Error Handling: Detailed error codes and user-friendly messages
  • Subscription Management: Advanced subscription handling and validation
  • Receipt Validation: Built-in receipt validation for both platforms

🎯 What this plugin does

  • Product Management: Fetch and manage consumable and non-consumable products
  • Purchase Flow: Handle complete purchase workflows with proper error handling
  • Subscription Support: Full subscription lifecycle management
  • Receipt Validation: Validate purchases on both platforms
  • Store Communication: Direct communication with App Store and Google Play
  • Error Recovery: Comprehensive error handling and recovery mechanisms

🛠️ Platform Support

FeatureiOSAndroid
Products & Subscriptions
Purchase Flow
Receipt Validation
Subscription Management
Promotional OffersN/A
StoreKit 2N/A
Billing Client v8N/A

🔄 Version Information

  • Current Version: 6.0.0-rc.1
  • Flutter Compatibility: Flutter 3.x+
  • iOS Requirements: iOS 11.0+
  • Android Requirements: API level 21+

⚡ Quick Start

Get started with flutter_inapp_purchase in minutes:

flutter pub add flutter_inapp_purchase:^6.0.0-rc.1
import 'package:flutter_inapp_purchase/flutter_inapp_purchase.dart';

// Initialize connection
await FlutterInappPurchase.instance.initConnection();

// Get products
final products = await FlutterInappPurchase.instance.getProducts(['product_id']);

// Request purchase
await FlutterInappPurchase.instance.requestPurchase(
RequestPurchase(
ios: RequestPurchaseIosProps(sku: 'product_id'),
android: RequestPurchaseAndroidProps(skus: ['product_id']),
),
PurchaseType.inapp,
);

📚 What's Next?

🏁 Getting Started

Learn how to install and configure flutter_inapp_purchase in your project.

Get Started →

📖 Guides

Follow step-by-step guides for implementing purchases and subscriptions.

View Guides →

🔧 API Reference

Comprehensive API documentation with examples and type definitions.

API Docs →

💡 Examples

Real-world examples and implementation patterns.

See Examples →

🤝 Community & Support

This project is maintained by hyochan.


Ready to implement in-app purchases in your Flutter app? Let's get started! 🚀