Billing Doctor Incident Kit
by tekitana
€9.99+
You run your own Google Play Billing backend. A support ticket says a paying user lost access, or a refunded user still has the tier, or notifications stopped. The free billing-doctor tool (npm, MIT) reads a redacted timeline of the purchase and shows where it broke, with Google's rule quoted and dated.
The rules are Google's documentation turned into checks: 97 of them, each quoting a sentence Google published, with the page and the date it was read. Nothing in the catalogue is an opinion about how billing ought to work.
The Incident Kit is the folder you drop next to it:
The runbook. One entry per rule, 97 in all. The symptom as the user reports it, the mechanism, Google's rule with the date it was read, the fix, and the regression test to add. billing-doctor rule G2 prints the entry when the folder is present. Eight entries also carry a dated observation from a live app, kept separate from Google's sentence and never in place of it.
Forty incident timelines. Failure patterns written the way a support inbox reports them, each with the findings the tool produces, plus the five correct lifecycles that must produce nothing at all. Replay them against your own handler in CI.
A reference backend in TypeScript. A verify endpoint with a fail-closed two-flag ledger, an RTDN handler with message-id idempotency and a fetch before every write, an acknowledgement watchdog, a voided-purchases sweep, a reconciliation job, HMAC account binding, a retention purge, a Postgres schema, tests, and a replay harness that runs it against all forty-five timelines. Node first; the runbook explains the same design for Python and PHP.
Checklists. Play Console and Cloud setup (including the topic-in-another-project case), license testing, managed publishing and the closed-testing rule, Data Safety answers, Billing Library 8 and 9 migration.
Updates for twelve months, as a new zip here when Google's rules change or a rule is added.
No licence server, no key, no phone-home. The tool checks that the folder exists and reads the files.
What it is not. Not an SDK, not a hosted service, not a subscription platform, not legal or financial advice. It does not act on your account at Google; the reference implementation is code you run. It does not cover Apple.
Licence. One developer or one team, no redistribution of the runbook or the fixtures, updates for a year. Full text in LICENSE.txt inside the zip.
Google Play is a trademark of Google LLC. Billing Doctor and the Incident Kit are independent works by Tekitana d.o.o., not affiliated with, endorsed by, or sponsored by Google.