How to handle Google play Redeem Promo code in Flutter? - flutter

I'm developing a free Flutter app (Android and iOS), that offers premium content (in-app subscription) using official Flutter in-app-purchase plugin - latest version 2.0.1.
We'd like to use Google Play Promo codes to give premium content for free (with no extra charges) to some users.
What I've tried so far:
Promo codes for SUBSCRIPTION: They only give a longer free trial (and charge user afterwards if they don't cancel). The Promo codes worked fine but this is not really suitable for us because it can charge users.
Promo codes for PRODUCT: A friend suggested to create an in-app Product that unlocks premium content and promo code would give this product for free. I've generated promo codes for it and started testing it through Internal testing. The Google Play documentation says it's possible to Redeem the code from A) Google Play or B) from your app.
Problems with both options:
A) Google play: When we Redeem the code from Google Play, the code is accepted and message is displayed saying the product was applied. However:
we don't get any purchase notification in our backend system (there was no received message in play_billing Pub sub topic where we usually receive purchase notifications from Google Play).
The purchase is also not visible in Google Play Developer Console > Orders.
When we try to buy the product from the app (for same Google account) we get Google in-app purchase dialog with Error: You already own this item. We tried clearing Google play app's cache and data but that didn't help.
there is no method in Flutter in-app-purchase plugin that we can use to query if user has already purchased the product (and just unlock the premium content then)
B) From the app: I don't think this is supported by official Flutter in-app-purchase plugin. The plugin documentation only mentions Apple store Promo codes. Also when we press the button to buy the product the Google in-app purchase dialog doesn't contain any option to use Promo code. And no, I didn't use Licence testing (test card) but my real private credit card.
I feel so stuck!!! Any help is much appreciated! I need to start a promotion campaign next week to get as many user feedback as possible (to apply for funding).
-------UPDATE-----------------------
Thanks to another developer we were able to identify the reason why "Redeem code" option didn't appear in the billing dialog.
B) From the app: The Redeem code option in the billing bottom-sheet dialog appears only
when in production mode
for new users (it's not visible if the user applied the one-time code before or if the user is a tester user)

Related

Set Offer Token using Flutter in app purchase package for Google Play Store

I am trying to offer a subscription with a specified offer for specific users using Flutter in app purchases in the Google Play console.
I created an offer in Google Play Store with the "Eligibility Criteria" set to "Developer Determined", but I cannot figure out how to specify this offer in an in app purchase.
I am looking for something similar to the setOfferToken method provided by the Google Play Billing Library.
I thought that I could use the offer ID as a product ID from the Google developer API docs, but I had misunderstood the documentation.
I have looked through the Flutter in app purchase package and the Google Play Billing Library, but could not find documentation related to my use case.
Is there any documentation specific to Flutter for assigning offer IDs to in app subscription purchases?
Thanks!

Do I need to add products to Google Play Developer Console for Ionic In App Purchase

I am developing an application using ionic3 and the app is about selling books. I created web application for the client so they can add book to the platform. Now I am considering In App Purchase as a means of payment on the mobile app but all the tutorial I have seen requires that I add the products to google developer console and Itunes. My question is Do I really need to add products to Google Play Developer Console for Ionic In App Purchase? Cos my Idea is just to request for the products available in the database and use inApp Purchase basically as a payment gateway
You have to setup product offers in each platform.
The main reason is because Apple and Google performs purchase operation relying on the data stored on their side (app store connect or console), where price tier is fixed etc.
If the platforms would allow a developer server send arbitrary requests it would be super hard to manage for apple/google hence they prefer having products for sale defined on their end.
Client just mirrors data, but source of truth for offers is always Apple or Google side system.

Promotion code for iOS in-app purchases

I'd like to offer 100% discounts via one time use coupons on IAPs. Can it be done? And more than just 100 of them, which I think is the number of coupons Apple allows. My goal is to generate future IAPs by introducing players who don't use them to try them.
From what I've been able to tell, it seems that Apple doesn't officially allow IAP promotion codes.
From: https://developer.apple.com/app-store/review/guidelines/#purchasing-currencies
1.1 Apps that unlock or enable additional features or functionality with mechanisms other than the App Store will be rejected
11.2 Apps utilizing a system other than the In-App Purchase API (IAP) to purchase content, functionality, or services in an App will be
rejected
See also
1) https://forums.coronalabs.com/topic/37264-rejected-by-apple-cause-of-promo-code-custom-solution/
2) How to create a promotion code for iOS in-app purchases
If you still want to power ahead and do this, one way is a URL scheme. Briefly, you enable your app to respond to something like: myAppName://... when that URL is present in an email being read using the Apple Mail app, or when that URL is typed into Safari. Then, your app examines the URL parameters and pulls out, say a code identifying the type of comped purchase (e.g., perhaps consulting a back-end server), and makes the comped purchase available to the user.
See also:
A) Free iOS in app purchase for some users/devices
B) Rewarding iOS app beta testers with in app purchase?
C) iOS In-App Purchase, sending to another account (gifting?)
D) Providing a discount code for an iOS in-app-purchase

How to make payment with different amount via In app purchase in iphone sdk?

Please tell me How to make payment with different amount via In app purchase in iphone sdk?? as i am creating an application in which subscription charges deduced from a website and in the same way i want to make payment using my application and subscription amount change all the time.. as apple don't approve paypal for the same purpose. How to handle this problem??
can we use web services for deduction of charges and get response of success or failure from web services?
For in-app purchases of app content, you're only allowed to use Apple's In-App Purchase system. You're not allowed to use paypal or anything else from in the app.
The only way to set the price of an in-app purchase item is in iTunes Connect. StoreKit (the API you use for in-app purchases) gets product prices from iTunes Connect, and there is no API for overriding the prices from within the app.
There's no public API (as far as I know) for changing the price in iTunes Connect, either. Perhaps you can script the normal web browsing interface, or find code someone else has written that scripts it. But the only way that Apple provides for changing the price of an in-app purchase is to log in to the iTunes Connect web site in a web browser.

iPhone native app + integrate payment / purchase to buy products

I am developing a native iPhone app, where end user can purchase calling cards of different rates.
The problem I am facing is that, I don't what can be several options to integrate payment / online purchase feature and they can be integrated.
Few sites I have read that, you can implement this using In App Purchase, but there using In App purchase Apple will take 30% of payment. Also, I need to register each of my product with Apple -> iTunes Connect -> Manage In App Purchase, which is again not a feasible thing to do. As my products would have different rates and they get updated regularly, so every time I have make changes in iTunes Connect.
Another option can be to integrate Paypal for purchases but, here I have open the web interface (either safari browser or UIWebView) from native app when it comes to make payment. Problem here is that, opening the web interface would fine, but I need to come to native app and same point in the app from where I did the payment. Also, I don't have prior experience of integrating Paypal.
Please guide me to find the best suitable option to integrate payment feature in native app.
You definitely need to read the Apple-iOS-Standard-Agreement, to find answers about InAppPurchase:
Attachment-2 to the iOS-Standard-Agreement Feb. 15th 2011, 1.1, 2.1, 2.2:
... this makes clear that you are not allowed to use InAppPurchase for selling calling cards. InAppPurchase is only allowed for content & functionality you provide the user within your app.
AS InAppPurchase is not the way you can go, you may use the Mobile Payments Library for iOS, PayPal release last year. The lib is well documented and ships with sample code:
https://www.x.com/community/ppx/xspaces/mobile/mep