/revenuecat-play-billing:rc-cancellations-pauses-winbackfrom revenuecat-play-billing
Detects cancellation, pause, and winback states on Android using RevenueCat's CustomerInfo. Covers unsubscribeDetectedAt, billingIssueDetectedAt, autoResumeDate, and showManageSubscriptions.
Ships in revenuecat-play-billing. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Detect cancellation, pause, and winback states on Android by reading CustomerInfo. Most of these events are passive: your app observes them rather than initiates them. Open Google Play's manage screen with Purchases.sharedInstance.showManageSubscriptions(activity), which falls back to the Play subscriptions page when managementURL is null. Read the pause resume date from SubscriptionInfo.autoResumeDate.
Decide what state you need to surface to the user.
| State | Signal in CustomerInfo | Notes |
|---|---|---|
| Canceled, still has access | entitlement.unsubscribeDetectedAt != null and isActive == true | Show "ends on [expirationDate]" |
| Billing issue (grace or hold) | entitlement.billingIssueDetectedAt != null | Payment failed. Recovery is in progress unless the subscription already ended, which can leave the field set; see rc-payment-recovery |
| Paused | entitlement.isActive == false while product is still owned | Resume date: autoResumeDate |
| Active and renewing | entitlement.willRenew == true | Normal state |
Backend win back campaign segmentation uses the CANCELLATION webhook cancel_reason field (UNSUBSCRIBE, BILLING_ERROR, DEVELOPER_INITIATED, PRICE_INCREASE).
Confirm you already have a fetched CustomerInfo from Purchases.sharedInstance.getCustomerInfo(...) or a listener. You do not need to call queryPurchasesAsync with QueryPurchasesParams.newBuilder().includeSuspendedSubscriptions(true). RevenueCat resolves pause state from the server side subscription state.
Rules:
showManageSubscriptions(activity). If you read managementURL yourself, it is Uri? and null for paused and account hold subscribers; do not call Uri.parse(url.toString()).expirationDate. Read isActive and willRenew.SubscriptionInfo.autoResumeDate in the SDK (REST: auto_resume_date).val entitlement = customerInfo.entitlements["pro_access"]
if (entitlement?.unsubscribeDetectedAt != null && entitlement.isActive) {
entitlement.expirationDate?.let { expiry ->
showCancellationBanner(expiry)
}
}
unsubscribeDetectedAt is set when RevenueCat receives the SUBSCRIPTION_CANCELED RTDN. isActive stays true until the billing period ends.
val entitlement = customerInfo.entitlements["pro_access"]
val hasAccess = entitlement?.isActive == true
val sub = entitlement?.let { customerInfo.subscriptionsByProductIdentifier[it.productIdentifier] }
val resumesAt: Date? = sub?.autoResumeDate // non null only while paused (Google Play)
autoResumeDate is non null only while the subscription is paused; isActive == false alone cannot distinguish a pause from expiry or account hold.
Send the user to Google Play's subscription page with Purchases.sharedInstance.showManageSubscriptions(activity) (SDK 10.18.0+). It uses managementURL when present and otherwise opens Google Play's subscriptions page directly, which covers paused and account hold subscribers, where managementURL is null.
Purchases.sharedInstance.showManageSubscriptions(activity)
If you need the URL itself, managementURL is typed as Uri?. Pass it straight to an Intent; do not call Uri.parse(url.toString()), which is redundant and error prone.
From your backend, call the subscribers endpoint and read subscriber.subscriptions[<product_identifier>].auto_resume_date (ISO 8601, Google Play only, null unless paused):
curl -H "Authorization: Bearer $RC_SECRET_API_KEY" \
https://api.revenuecat.com/v1/subscribers/$APP_USER_ID
Prefer SubscriptionInfo.autoResumeDate in the SDK (see Detect pause above) for display in the app. Use the REST field when your backend needs it directly, for example for win back segmentation.
Google's resubscribe before expiry flow fires SUBSCRIPTION_RESTARTED. RevenueCat clears unsubscribeDetectedAt and sets willRenew = true. No extra code required, just re-read customerInfo.
A resubscribe after expiry fires INITIAL_PURCHASE (usual on Google Play) or RENEWAL. Handle both the same way: rc-webhooks re-reads the customer after either, which restores access.
| Check | How |
|---|---|
| Cancellation banner shows | Cancel in Play Store, pull fresh CustomerInfo, confirm unsubscribeDetectedAt != null and isActive == true |
| Management deep link opens | Tap the link, verify Play subscriptions screen opens for the correct product |
| Pause is reflected | Pause in Play Store sandbox, confirm entitlement.isActive == false |
| Pause resume date | Call /v1/subscribers/{id}, confirm auto_resume_date is non null |
| Win back accepted | Accept a Play configured win back offer, confirm the purchase surfaces as a normal subscription in CustomerInfo |
POST /v1/subscribers/{app_user_id}/subscriptions/{product_identifier}/defer (body expiry_time_ms or extend_by_days) and POST /v1/subscribers/{app_user_id}/subscriptions/{product_identifier}/revoke (refunds and revokes). RevenueCat updates CustomerInfo and sends the matching webhook (SUBSCRIPTION_EXTENDED, CANCELLATION).SUBSCRIPTION_PAUSED webhook (Google Play only) when a pause is scheduled, with auto_resume_at_ms. Do not revoke on it; access ends with an EXPIRATION whose expiration_reason is SUBSCRIPTION_PAUSED.What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub revenuecat/ai-toolkit --plugin revenuecat-play-billing20 skills in this plugin
/rc-alternative-billingUse this skill when scoping Google Play alternative billing work with RevenueCat Android SDK 11.x. Documents the support status as of purchases-android 11.1.0, which flows RevenueCat abstracts, and which require direct integration./rc-backendUse this skill when your backend needs to read or update RevenueCat state on Android. Covers the RevenueCat REST API (v1 subscribers endpoint, grant/revoke entitlements, attributes), secret vs public SDK API key usage, and why you do not build a receipt verification backend with RevenueCat./rc-catalog-managementUse this skill when managing the Android product catalog through the Play Console and the RevenueCat dashboard. Covers the two sided catalog flow (create in Play Console, import or map in RevenueCat), entitlement and offering maintenance, and why you do not call the Google Play Developer API directly./rc-configuring-the-sdkUse this skill when adding and configuring the RevenueCat Android SDK (purchases-android, artifact com.revenuecat.purchases:purchases) in an app. Covers the Gradle dependency, Purchases.configure with PurchasesConfiguration, initial app user id strategy, and log level./rc-error-handlingUse this skill when handling errors from the RevenueCat Android SDK. Covers PurchasesError, the PurchasesErrorCode enum, the userCancelled flag on PurchasesTransactionException, and the recommended UI response per code./rc-one-time-productsUse this skill when selling one time products on Android with RevenueCat. Covers fetching offerings, running awaitPurchase on a non subscription package, and relying on the SDK to acknowledge or consume automatically.Other plugins' skills for the same job