https://github.com/hyochan/flutter_inapp_purchase
Flutter In App Purchase plugin that confirms OpenIAP
https://github.com/hyochan/flutter_inapp_purchase
dart flutter in-app-purchase openiap
Last synced: 4 months ago
JSON representation
Flutter In App Purchase plugin that confirms OpenIAP
- Host: GitHub
- URL: https://github.com/hyochan/flutter_inapp_purchase
- Owner: hyochan
- License: mit
- Created: 2018-07-22T17:32:47.000Z (almost 8 years ago)
- Default Branch: main
- Last Pushed: 2026-02-10T12:18:34.000Z (4 months ago)
- Last Synced: 2026-02-10T16:57:43.324Z (4 months ago)
- Topics: dart, flutter, in-app-purchase, openiap
- Language: Dart
- Homepage: https://hyochan.github.io/flutter_inapp_purchase
- Size: 17.2 MB
- Stars: 590
- Watchers: 11
- Forks: 276
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Agents: AGENTS.md
Awesome Lists containing this project
README
# flutter_inapp_purchase
[](https://pub.dartlang.org/packages/flutter_inapp_purchase) [](https://github.com/hyochan/flutter_inapp_purchase/actions/workflows/ci.yml) [](https://openiap.dev) [](https://codecov.io/gh/hyochan/flutter_inapp_purchase) 
A comprehensive Flutter plugin for implementing in-app purchases that conforms to the [Open IAP specification](https://openiap.dev)
## 📚 Documentation
**[📖 Visit our comprehensive documentation site →](https://hyochan.github.io/flutter_inapp_purchase)**
## 📦 Installation
```yaml
dependencies:
flutter_inapp_purchase: ^8.0.0
```
## 🔧 Quick Start
### Basic Usage
```dart
import 'package:flutter_inapp_purchase/flutter_inapp_purchase.dart';
// Create instance
final iap = FlutterInappPurchase();
// Initialize connection
await iap.initConnection();
// Fetch products with explicit type
final products = await iap.fetchProducts(
skus: ['product_id'],
type: ProductQueryType.InApp,
);
// Request purchase (builder DSL)
await iap.requestPurchaseWithBuilder(
build: (builder) {
builder
..type = ProductQueryType.InApp
..android.skus = ['product_id']
..ios.sku = 'product_id';
},
);
```
## Using with AI Assistants
flutter_inapp_purchase provides AI-friendly documentation for Cursor, GitHub Copilot, Claude, and ChatGPT.
**[AI Assistants Guide](https://hyochan.github.io/flutter_inapp_purchase/docs/guides/ai-assistants)**
Quick links:
- [llms.txt](https://hyochan.github.io/flutter_inapp_purchase/llms.txt) - Quick reference
- [llms-full.txt](https://hyochan.github.io/flutter_inapp_purchase/llms-full.txt) - Full API reference
## Development
See [CONTRIBUTING.md](CONTRIBUTING.md) for development setup and guidelines.
### Singleton Usage
For global state management or when you need a shared instance:
```dart
// Use singleton instance
final iap = FlutterInappPurchase.instance;
await iap.initConnection();
// The instance is shared across your app
final sameIap = FlutterInappPurchase.instance; // Same instance
```
## Sponsors
💼 **[View Our Sponsors](https://openiap.dev/sponsors)**
## 📄 License
MIT License - see [LICENSE](LICENSE) file for details.