Coupons for In-app Billing

坚强是说给别人听的谎言 提交于 2019-12-07 02:18:37

问题


We are about to release an application on the Android Market, with In-app Billing for subscription that unlocks certain features for a the subscription period.

My boss now wants me to implement varying number of "free subscriptions" in the sense that:

  1. The "lucky user" downloads & installs the application from the Android Market like any other customer (always free to install, but premium features require payment via In-app Billing).
  2. The "lucky user" receives some key via email that allows him or her to avoid going through the In-app Billing checkout process (i.e. actually pay).
  3. The key can only be used once.
  4. Entering the key via a menu item, enables subscription for X months, as if he actually paid via In-app Billing.

The "key" basically acts like a coupon, but I haven't found any such option in the Publisher's Console.

Do you know of any such feature or a simple way to implement the above without duplicating the customer database on our (the publishers) server?


回答1:


I actually dove into this subject maybe 2, 3 months ago. My conclusion was that currently there's no way of setting up this system, without using your own server.

Generating unique coupon-codes and expiring them on use is pretty straightforward. Let the user enter the code, send a POST-request to your server, hash the code both client- and server-side and see if they match. Next, expire the code serverside and you're set. It does however make your app vulnerable to piracy (if it isn't already); if you have a high-profile app, make sure to implement security checks (e.g. check SSL certificates to prevent a man-in-the-middle attack).

The hard part is reinstating previously acquired 'freebies' when users reinstall your app or change phones/firmware. For this purpose you're going to need a stable and reliable (cross-device) form of identification (e.g. access to the user's main Google-account on the phone). If you use user-provided e-mailaddresses, it's too easy to just enter someone else's e-mailaddress. If you were to implement a coupon-system, I would advise against reinstating 'freebies'.




回答2:


I know this is a really old thread, but I had a similar need and found an official solution. For anyone who comes here for a solution:

Google introduced Promotional Codes couple of years ago and that is exactly what you're looking for. You can create Promo Codes on the Play Console under Your App -> User Acquisition -> Promotion.

You can use promotions to give users a paid app or in-app product for free with a promo code. You can create promotions to reward loyal fans, acquire new users, and reconnect with previous users. Learn more.




回答3:


yuo can add a screen for enter a coupons.
and the user can go in there and insrert his code and if it is correct you can give him whatever you want.



来源:https://stackoverflow.com/questions/9824238/coupons-for-in-app-billing

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!