Hi!, is there any tutorial that show how can I use “promo codes” for iap with iap-badger libray? in Google Play/App Store, thanks!
Hi there,
According to this page it looks like:
- you generate a promo code using Google Play console
- you issue the promo code to the user
- when the user redeems to code, they are taken into a standard IAP checkout flow in Google Play
The next part is speculation, because I’ve never used it, but then I would imagine:
- the product is then associated/listed against the customer’s Google Play account
- when you do a product restore, IAP Badger would then pick it up (as though the user were restoring a product they’ve bought in the past, after an app reinstall)
- As Google’s advice is to do a product restore whenever your app starts, if you implement that, then the new product should be picked up the next time the user starts the app.
There might be a small fly in the ointment here because I coded IAP Badger to ignore consumable products on a restore cycle. This is because until now, none of the stores have allowed you to restore consumable IAPs (only non-consumables) - so if IAP Badger ever received one, it could indicate something dodgy is going on (a hack etc.)
Let me know about your progress, and if the above doesn’t help, or I do need to open up the restore cycle to consumable products, let me know.
Simon
Thanks Simon! and thank you very much for your awesome libray!
Chiming in here. Google has done away with the concept of consumable items anyway. Now everything is a “managed” product and if you want the user to be able to buy the item a second time you have to call the store.consumePurchase() API call to tell Google to allow it for sale again.
Rob
Just so everyone knows, on Google Play, IAP Badger only consumes products that you specify as ’ consumable’ in the product catalogue (the one you pass to IAP Badger’s init function).
This keeps the functionality of ‘consumable’ and ‘non-consumable’ items on Android, even though they’ve gone from Google Play (as Rob says - under the surface, everything is a ‘managed’ product now).
This means the user will be able to repurchase consumable items (coins etc.) but prevents the accidental repurchase of one-time items (such as game unlocks, removing ads etc.)
I’ve updated the documentation for the purchase function to make this clear.
Simon
Thanks to both, I will report on my progress
Very thanks Simon! The in-app purchase in the app works like a charm in Android, but now in iOS I have a problem because the in-app dialog not show when I press “buy” button, how can I debug this bug?
Well, I finally got it to work on Android (all ok) and iOS (more or less). When I use a promotional code through iTunes, I get the app download but the app purchase is not available. I try with the “restore” button but the timeout listener is called and never restore the purchase.
The app has only one in-app purchase that unlock full version, what are the steps to process correctly promo codes with an in-app purchase on iOS?
Sorry I made a big mistake! I generated promo codes for app not for in-app purchase, now all is fine! thanks for everybody
Hi there,
According to this page it looks like:
- you generate a promo code using Google Play console
- you issue the promo code to the user
- when the user redeems to code, they are taken into a standard IAP checkout flow in Google Play
The next part is speculation, because I’ve never used it, but then I would imagine:
- the product is then associated/listed against the customer’s Google Play account
- when you do a product restore, IAP Badger would then pick it up (as though the user were restoring a product they’ve bought in the past, after an app reinstall)
- As Google’s advice is to do a product restore whenever your app starts, if you implement that, then the new product should be picked up the next time the user starts the app.
There might be a small fly in the ointment here because I coded IAP Badger to ignore consumable products on a restore cycle. This is because until now, none of the stores have allowed you to restore consumable IAPs (only non-consumables) - so if IAP Badger ever received one, it could indicate something dodgy is going on (a hack etc.)
Let me know about your progress, and if the above doesn’t help, or I do need to open up the restore cycle to consumable products, let me know.
Simon
Thanks Simon! and thank you very much for your awesome libray!
Chiming in here. Google has done away with the concept of consumable items anyway. Now everything is a “managed” product and if you want the user to be able to buy the item a second time you have to call the store.consumePurchase() API call to tell Google to allow it for sale again.
Rob
Just so everyone knows, on Google Play, IAP Badger only consumes products that you specify as ’ consumable’ in the product catalogue (the one you pass to IAP Badger’s init function).
This keeps the functionality of ‘consumable’ and ‘non-consumable’ items on Android, even though they’ve gone from Google Play (as Rob says - under the surface, everything is a ‘managed’ product now).
This means the user will be able to repurchase consumable items (coins etc.) but prevents the accidental repurchase of one-time items (such as game unlocks, removing ads etc.)
I’ve updated the documentation for the purchase function to make this clear.
Simon
Thanks to both, I will report on my progress
Very thanks Simon! The in-app purchase in the app works like a charm in Android, but now in iOS I have a problem because the in-app dialog not show when I press “buy” button, how can I debug this bug?
Well, I finally got it to work on Android (all ok) and iOS (more or less). When I use a promotional code through iTunes, I get the app download but the app purchase is not available. I try with the “restore” button but the timeout listener is called and never restore the purchase.
The app has only one in-app purchase that unlock full version, what are the steps to process correctly promo codes with an in-app purchase on iOS?
Sorry I made a big mistake! I generated promo codes for app not for in-app purchase, now all is fine! thanks for everybody