移动开发

rc-payment-recovery

revenuecat/ai-toolkit

Use this skill when handling failed renewals on Android with RevenueCat. Covers how Grace Period and Account Hold are reflected in CustomerInfo automatically, when to prompt the user, and how to trigger Google's in app messaging via showInAppMessages.

  • 650 次安装
  • 76 星标
  • 收录于

安装命令

npx skills add https://github.com/revenuecat/ai-toolkit --skill rc-payment-recovery

SKILL.md

Payment Recovery

Failed renewals on Google Play move a subscription through two states: grace period (user keeps access while Google retries the card) and account hold (access revoked until the user fixes the payment method). With RevenueCat, both states land in CustomerInfo automatically, and Google's in app message shows by default.

Phase 1: Understand

Three things happen when a renewal fails:

State Access How RevenueCat surfaces it User sees
Grace period Retained entitlement.isActive == true and billingIssueDetectedAt != null Google in app snackbar by default
Account hold Revoked entitlement.isActive == false and billingIssueDetectedAt != null Google in app snackbar by default
Recovered Retained billingIssueDetectedAt == null Nothing

Two signals matter in the SDK:

  • EntitlementInfo.billingIssueDetectedAt is non null from the moment Google reports a billing problem until the user resolves it.
  • EntitlementInfo.isActive tells you whether they still have access.