questionasker
questionasker

Reputation: 2697

Flutter - IAP items not appear using plugin example

I try to run IAP (in-app-purchase) example apps that provided by flutter here: https://github.com/flutter/plugins/tree/master/packages/in_app_purchase/example

I follow all step, except upload signed App Bundle instead of APK to Alpha Phase at Google Play Console.

However, when i open the screen example, it said warning:

Consumable, Upgrade, Subscription Not found, This app need special configuration to run. Please see example/README.md for instructions.

so, all of my IAP items that has been created at play console not appear.

Any idea to solve ?

Screenshot: enter image description here

Upvotes: 6

Views: 1597

Answers (3)

JOH
JOH

Reputation: 101

In order to use in-app-purchase plugin in flutter, need to make sure of the following :

  1. The bundle id match the bundle id you have on apple store or android store , for example for apple store in https://appstoreconnect.apple.com create app if you not yet made one then make sure the bundle id same as you have in flutter application, also you can use this package in flutter to update the package name https://pub.dev/packages/change_app_package_name, note this need to be done once and always you need to update the application with the same bundle id

    apple store after creating app , the bundle id show like in this picture

  2. For apple store need to add permission in app purchase for billing in xcode as in picture and for android in permissions need to add

    add in app purchase in xcode for apple store

  3. In Apple store if its new need to configure the tax, go to https://appstoreconnect.apple.com then select agreement, tax then fill the form for paid app and then the process will take 1-3 days until you see active beside the paid app

  4. You need to create the payment way in store, for example consumable to create it with price and details and the name of it , then you put the name in the configuration in the code as shown in example you can check the example here https://pub.dev/packages/in_app_purchase/example. For example create new name for consumable in store and update that name in the variable _kConsumableId and put in _kProductIds the variables which here _kConsumableId and remove other variables

    this example of details in apple store to create the method of payment

    the code to configure

Upvotes: 0

328713274qqcom
328713274qqcom

Reputation: 51

Because you do not change the Demo product id to your ID !

const String _kConsumableId = 'consumable';
const List<String> _kProductIds = <String>[
  _kConsumableId,
  'upgrade',
  'subscription'
];

Upvotes: 5

jckpn
jckpn

Reputation: 1

I follow all step, except upload signed App Bundle instead of APK to Alpha Phase at Google Play Console.

There's your problem... you need to upload a signed APK or you'll get that error. You can just upload it to the Alpha channel so nobody receives it.

You also need to make sure you have this permission in your manifest:

<uses-permission android:name="com.android.vending.BILLING" />

Hope this helps.

Upvotes: 0

Related Questions