Urgent.News

What's breaking now, across thousands of outlets.

Tech

The fifteen ways a Google Play subscription breaks quietly

You run your own Google Play Billing backend. You did not pick a subscription platform, for control or cost or because your app is a wrapped web app. Everything works. Then a support ticket arrives at 11 pm, and it is one of these fifteen. Each one is either something that happened in an app I run, or a behaviour Google documents. Each one has a rule id in Billing Doctor , a free local tool that…

Google Play offers subscription services that allow users to access apps and content on a recurring basis. However, these subscriptions can sometimes break unexpectedly, leaving users without the expected access. Here are fifteen common issues that can cause Google Play subscriptions to break:

1. A paying user loses access to their subscription. The purchase was initially granted, but a background account swap replaced the session before the real one could restore, making the grant belong to nobody.

2. A refund is processed, but the user continues to have access to the subscription tier. The voided-purchase notification indicates that the money has been refunded, but the user's tier remains active.

3. A voided purchase notification states that the money has been returned, but the user's tier remains active. The handler that checks if the subscription is still active after the void keeps the tier in place.

4. Google acknowledges a purchase, but refunds it three days later nonetheless. The acknowledge call fails, and the client is told the purchase was successful, but Google still refunds and revokes the purchase after three days.

5. A renewal for the same subscription is processed twice, resulting in the user receiving double credit. The endpoint returns a 500 status code, and Pub/Sub redelivers the message, but the handler lacks a message-id check, causing the issue.

6. A user who canceled their subscription in January still has access as of March. The CANCELED status is treated as EXPIRED, or EXPIRED is never handled, allowing the user to retain access until the expiryTime.

7. Users in the IN_GRACE_PERIOD are cut off from their subscription. Google retries the payment and extends the expiry, allowing the user to retain access.

8. Users with account holds keep access for a month. The ON_HOLD status is treated as active, and the grace period ends without payment, causing access to end.

9. After an upgrade, a user ends up with both tiers. The new resource includes the old token in linkedPurchaseToken, and nobody invalidates it, leading to access issues.

10. Renewals stop mapping to users, and no obfuscated account id is set at purchase time. The verify call never runs for those tokens, causing notifications to match nobody.

11. Notifications stop being sent. The topic loses its publisher grant for Google's notification account or exists in a Cloud project that nobody expected.

12. Test purchases inflate revenue and entitlements. License-tester purchases renew every five minutes and carry testPurchase, which is not excluded, causing issues in the system.

13. Fulfilment silently stops writing to the database. The role loses its grants after a migration, and the verify endpoint writes nothing, even though it returns a success message.

14. The handler receives type 20 events but is not designed to handle them. Types 17 to 22 fall through to a default branch that logs and ignores the events.

15. Access changes when a void arrives. Google handles RENEWED and CANCELED events, but type 20 events are not addressed. Pending refunds are questions with a 24-hour window, not actual refunds, and access changes accordingly.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

WCAG 2.2 CSS Lint - Focus & Target Size

Fourteen findings, eleven success criteria, sixty-one lines of CSS. That is what came back from one stylesheet of the kind a frontend developer at an EU SaaS ships every week - a pricing card, a…

More from Sunday 13 September →