What are InAppPurchases?

Learn about in-app purchases in Android using Flutter.

InAppPurchases

This package will help us sell products to consumers via an underlying store which may be either the App Store or Google Play. The products will include consumables, permanent upgrades, and subscriptions.

Products

  • Consumables: If we want to sell a coin in our app, and once the consumer purchases it, they are allowed again to purchase it. Then such products are called consumables.

  • Permanent upgrades: These are the products that the consumer buys and owns forever. Products like costumes in a gaming app are an example of this.

  • Subscriptions: Most people are familiar with this type of product. These are the products we own for a fixed period and then have the option to renew further or cancel.

Installation

To install this package, we have to run the following command in the terminal inside the project folder. This will add the dependency in the pubspec.yaml file.

flutter pub add in_app_purchase

Setup

Let’s jump directly to the setup now.

Get hands-on with 1200+ tech skills courses.