in app purchase - Android In-App Billing Subscription status change callbacks -


i'm writing app support in-app subscriptions. subscriptions enable users use number of services , benefits outside android world. know can use google play developer api query status of subscription, due nature of offered services , benefits, not convenient that. wondering if there way notified status of subscription when changes. web hook example.

i wanted post comment in response yours, apparently long. in addition that, kind of answer question, thought might thing post answer instead. maybe solves problem.

so, regarding comment. don't have way. now, don't know system requirements, i'll share mine , hope helps out.

save users , subscriptions on server (database tables). have check_at column on subscriptions table, besides renew_at one. suppose user has monthly subscription created on 1st of january. on first day, call server android after purchase finished, save subscription details, set renew_at february 1st , check_at february 4th, considering set 3 days delay transaction failure in google play developer console. way, user has time 1st february 3rd february change credit card details if payment fails on 1st. on 4th check google play api subscription details. don't disable premium functionality during 1st-4th february. disable on 4th if subscription canceled. way, premium content not delayed nor tampered in way. if subscription end date returned api in future, renewed, should keep premium activated. now, how check monthly on 4th may ask. use kind of scheduler schedule tasks on database.

this way remove need rely on webhooks. although agree, webhooks would've been more efficient , easier implement.

let me know if have questions or there flaws in system described.


Comments