payment-recovery

payment-recovery is a skill for Claude Code, Codex from RevenueCat/play-billing-skills. It costs 50 tokens per session (2,486 once invoked), scanned A, original, Apache-2.0.

A guide to recovering Google Play subscriptions after a renewal payment fails. It explains grace period, when the user keeps access, and account hold, when access is revoked while Google retries payment.

In plain words
What is it for?
Use it to handle renewal failures, payment recovery, and subscription state updates from RTDNs, or Real Time Developer Notifications. It covers restoring access after payment succeeds and ending access after cancellation or expiry.
Why use it?
A failed renewal does not immediately end a subscription, so treating every payment failure the same can wrongly remove or keep access. This guide maps Google's notifications to the correct access changes and in-app prompts.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to handle renewal failures, payment recovery, and subscription state updates from RTDNs, or Real Time Developer Notifications. It covers restoring access after payment succeeds and ending access after cancellation or expiry.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/revenuecat/play-billing-skills/payment-recovery
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add RevenueCat/play-billing-skills --skill payment-recovery
Clone the repo
git clone --depth 1 https://github.com/RevenueCat/play-billing-skills

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for payment-recovery

README.md
[![agentmods](https://agentmods.dev/badge/skills/revenuecat/play-billing-skills/payment-recovery/github.svg)](https://agentmods.dev/skills/revenuecat/play-billing-skills/payment-recovery)
Your own site
<a href="https://agentmods.dev/skills/revenuecat/play-billing-skills/payment-recovery"><img src="https://agentmods.dev/badge/skills/revenuecat/play-billing-skills/payment-recovery/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for payment-recovery

Your own site · 80×15
<a href="https://agentmods.dev/skills/revenuecat/play-billing-skills/payment-recovery"><img src="https://agentmods.dev/badge/skills/revenuecat/play-billing-skills/payment-recovery.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 50 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,486 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00050 $0.02486
Opus 5.5 $0.00020 $0.00994
Sonnet 5.5 $0.00010 $0.00497
Haiku 4.5 $0.00005 $0.00249

Measured 1mo ago against content hash 9d149c3d217d, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

payment-recovery scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

google-play/payment-recovery/SKILL.md · 184 lines

How it starts

The opening of the file, as written. The whole thing — 184 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Payment Recovery: Grace Period and Account Hold

Google Play does not cancel a subscription the moment a renewal charge fails. It runs a two stage recovery process: grace period (user keeps access while Google retries) then account hold (access revoked while Google keeps retrying). Your job is to react to the right RTDNs, toggle entitlements at the right moments, and prompt the user to fix payment without forcing them to leave your app.

Phase 1: Understand

Map the stages, the RTDN for each transition, and the entitlement you should hold.

Stage Entry RTDN Duration User access SubscriptionPurchaseV2 state
Silent grace period none (always applies) ~1 day Active SUBSCRIPTION_STATE_ACTIVE
Configured grace period SUBSCRIPTION_IN_GRACE_PERIOD 0 to 30 days (per base plan) Keep full access SUBSCRIPTION_STATE_IN_GRACE_PERIOD
Account hold SUBSCRIPTION_ON_HOLD 0 to 60 days (default 60 minus grace; grace + hold total 30 to 60) Revoke SUBSCRIPTION_STATE_ON_HOLD
Recovered from grace SUBSCRIPTION_RENEWED n/a Keep, clear warning SUBSCRIPTION_STATE_ACTIVE (renewal date unchanged)
Recovered from hold SUBSCRIPTION_RECOVERED n/a Restore immediately SUBSCRIPTION_STATE_ACTIVE (billing date moves to recovery date)
Terminal failure SUBSCRIPTION_CANCELED (3), then SUBSCRIPTION_EXPIRED (13) n/a Gone canceled/expired

Key facts to internalize before writing any code:

  • The silent grace period of about 1 day always applies, even with a 0 day configuration. It is folded into any longer grace period you set (a 7 day window means 7 total days, not 7 + 1).
  • Client side Purchase objects look identical in grace period and in a healthy renewal: isAutoRenewing = true, purchaseState == PURCHASED. You cannot detect grace period from queryPurchasesAsync(). Source of truth is the server side RTDN plus SubscriptionPurchaseV2.subscriptionState.
  • Grace period expiryTime points to the end of the grace window, not the original renewal date.
  • On recovery from account hold, Google moves the billing date to the recovery date; recovery during grace period keeps the original renewal date. Persist the new expiryTime from SubscriptionPurchaseV2 either way; cached pre failure dates will be wrong.
  • If you disable account hold, the subscription cancels immediately after grace period ends. Google's default enables both, with account hold = 60 days minus the grace period.

Read the full file on GitHub · 184 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago Changed · +7 lines 9d149c3d217d
  2. 3mo ago First seen · 177 lines · 50 tokens per session scan A 6f43d78fa36e

Subscribe to this mod's changes

payment-recovery is a skill published in the GitHub repository RevenueCat/play-billing-skills (60 stars, last pushed 16d ago), licensed Apache-2.0. It adds 50 tokens to every session and 2,486 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

payment-recovery compared with skills from other repositories

payment-recovery next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
payment-recoveryRevenueCat/play-billing-skillsSkill6016d agoApache-2.0A50Claude Code, Codex
amazon-reviews-api-skillbrowser-act/skillsSkill6.5k28d agoMITA124Claude Code, Codex
amazon-competitor-analyzerbrowser-act/skillsSkill6.5k28d agoMITA48Claude Code, Codex
cloudbase-wechat-integrationTencentCloudBase/CloudBase-AI-ToolkitSkill1.2ktodayMITA94Claude Code
asc-subscription-localizationrorkai/app-store-connect-cli-skillsSkill1.2k2d agoMITA60Claude Code
woo-guardamElnagdy/guard-skillsSkill1.3k8d agoMITA216Codex
product-description-generatornexscope-ai/eCommerce-SkillsSkill1.6k21d agoMITA126Claude Code, Codex