Skip to main content
Version: 6.8

flutter_inapp_purchase

A comprehensive Flutter plugin for implementing in-app purchases that conforms to the Open IAP specification.

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.

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

Quick Start

Get started with flutter_inapp_purchase in minutes:

flutter pub add flutter_inapp_purchase:^6.8.0
import 'package:flutter_inapp_purchase/flutter_inapp_purchase.dart';

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

// Fetch product details
final result = await FlutterInappPurchase.instance.fetchProducts(
ProductRequest(
skus: ['product_id'],
type: ProductQueryType.InApp,
),
);

final products = result.value;

// Request purchase
final requestProps = RequestPurchaseProps.inApp(
request: RequestPurchasePropsByPlatforms(
ios: RequestPurchaseIosProps(
sku: 'product_id',
quantity: 1,
),
android: RequestPurchaseAndroidProps(
skus: ['product_id'],
),
),
);

await FlutterInappPurchase.instance.requestPurchase(requestProps);

// Restore active purchases (include expired iOS receipts if needed)
final purchases = await FlutterInappPurchase.instance.getAvailablePurchases(
PurchaseOptions(
onlyIncludeActiveItemsIOS: true,
),
);

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 →

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

Sponsors & Community Support

We’re building the OpenIAP ecosystem—defining the spec at openiap.dev, maintaining openiap-gql for the shared type system, and shipping native SDKs such as openiap-apple and openiap-google. These modules power expo-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.

This project is maintained by hyochan.