CodeChai
Published in

CodeChai

Flutter In App Purchase

I’ve implemented react-native-iap module before and there was a request to build one in flutter too since plugins currently out there doesn’t support sufficient features like subscription . So today, I’ve implemented flutter_inapp_purchase module. React Native In App Purchase and Flutter In App Purchase is ready.

Setup your in app products for ios in itunesconnect.

  1. You need to complete the Agreements, Tax and Bankings.
  2. Add In-App Purchases in Features tab. Check that your product’s status is Ready to Submit.

3. Check your xcode setting and make In-App Purchase available.

Now, you’re done with ios side configuration. So lets go for android.

Setup your in-app purchases for android in playstore.

  1. As described in above screenshot, you need to upload apk with billing permission and set up merchant account before creating in-app product.
    <uses-permission android:name="com.android.vending.BILLING" />
  2. If you’ve done it, you can create a managed product as shown in below screenshot.

That’s it. You can now go to your react-native project and include our module as described in the readme.

Summary for integrating flutter_inapp_purchase.

  1. Install dependency
    - dependencies: flutter_inapp_purchase: ^0.3.3
    - flutter packages get
  2. Import and use it.
    - https://pub.dartlang.org/packages/flutter_inapp_purchase#-readme-tab-

Please write up issue, if you have any problem.

Thank you.

The Flutter Pub is a medium publication to bring you the latest and amazing resources such as articles, videos, codes, podcasts etc. about this great technology to teach you how to build beautiful apps with it. You can find us on Facebook, Twitter, and Medium or learn more about us here. We’d love to connect! And if you are a writer interested in writing for us, then you can do so through these guidelines.

--

--

A place for programmers and writers turning coffee/tea into code, one line at a time.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store