Solved

Listen to android purchases (code redemption) outside of app

  • 9 December 2021
  • 1 reply
  • 69 views

Badge +5

Context:

My app has 2 subscriptions, monthly & yearly. They unlock the same content, so they are technically within the same “subscription group” as apple references them.

The app has added one-time codes to the yearly subscription, which I made redeemable via Google Play (deep link from app to Google Play).

 

Issue:

The issue that I am having only happens to users who are currently subscribed (eg. to the monthly subscription) and redeem the (yearly) promo code via Google Play.

Currently, to “upgrade” a user’s subscription, I have to provide `UpgradeInfo` to the `makePurchase` method. However, if the user makes a purchase/redeems a code from outside of the app, there is no way for me to upgrade from their current subscription.

 

Questions:

Listening to outside purchases:

  1. How can I listen to a purchases outside of the app to perform an “upgrade”?
  2. If I were to receive this outside purchase, how would I upgrade their subscription?

Are there any other solutions to this that I may not be aware of?

icon

Best answer by ryan 10 December 2021, 02:53

View original

1 reply

Userlevel 5
Badge +9

Hmmm. There’s no way for a developer to initiate a purchase outside of the app, including upgrades. Maybe offering this as an in-app upgrade for existing monthly subscribers, and only send out the one-time codes for new subscribers.

Another option could be to listen to webhooks for purchases of the yearly subscription, call GET /subscribers to see if they already have a monthly subscription, then use then hit POST /refund to refund and revoke the monthly subscription. Downside here is that you’re refunding the whole monthly subscription with no proration like an upgrade would do (it also could introduce scary bugs since you wouldn’t want any code that automatically refunds subscriptions to go haywire). 

Reply