Logo de Cancellations Pauses Winback

Cancellations Pauses Winback

Organização
RevenueCat
cancellations-pauses-winback

Use this skill when surfacing cancellation, pause, and winback state on Android with RevenueCat. Covers reading unsubscribeDetectedAt, billingIssueDetectedAt, pause state and resume date via SubscriptionInfo.autoResumeDate, showManageSubscriptions for the deep link, and the SUBSCRIPTION_PAUSED webhook.

Visão geral

Publicado porRevenueCat
Repositórioplay-billing-skills
Nome da habilidadecancellations-pauses-winback
Estrelas
58
Forks
0
Arquivos incluídos
Somente instruções
LicençaApache-2.0
Links
  • Instruções em Markdown

    Um arquivo SKILL.md que o modelo carrega sob demanda, consumindo tokens apenas quando uma solicitação é realmente relevante para a habilidade.

  • Funciona com qualquer LLM

    As habilidades de IA são escritas em Markdown simples, não em código específico de um provedor. Por isso, funcionam com GPT, Claude, Gemini, Grok ou um modelo local.

  • Sem arquivos extras

    Tudo de que o modelo precisa está nas instruções — sem arquivos extras para sincronizar.

  • Código aberto

    Publicada por RevenueCat no GitHub. Leia os arquivos da habilidade antes de instalá-la.

Instalação

Instale a habilidade de IA Cancellations Pauses Winback no TypingMind para usá-la com qualquer LLM ou adicione-a a outro agente que leia SKILL.md.

1

Instalar no TypingMind

O TypingMind instala uma habilidade diretamente da pasta dela no GitHub — lê o arquivo SKILL.md, reúne os arquivos de recursos em um pacote e armazena o resultado localmente.

  1. Abra o app e vá para Plugins → Habilidades.
  2. Escolha "Instalar do GitHub".
  3. Cole a URL abaixo, que aponta para a pasta da habilidade, e confirme.
    https://github.com/RevenueCat/play-billing-skills/tree/main/revenuecat/cancellations-pauses-winback
  4. Ative a habilidade em cada chat em que quiser disponibilizá-la.
Plugins → Habilidades → Adicionar habilidade → Via URL do GitHub. Depois, cole a URL da pasta e pressione Continuar.
2

Instalar em outro agente

Qualquer agente que leia o formato Agent Skills pode usar esta habilidade — copie a pasta para o diretório de habilidades desse agente.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/RevenueCat/play-billing-skills.git /tmp/play-billing-skills
mkdir -p .claude/skills
cp -r /tmp/play-billing-skills/revenuecat/cancellations-pauses-winback .claude/skills/cancellations-pauses-winback
Reinicie Claude Code após copiar para que a nova habilidade seja reconhecida.

Use no TypingMind

Ative Cancellations Pauses Winback em qualquer chat do TypingMind e o modelo cuida do resto. O nome e a descrição da habilidade ficam no prompt do sistema e, assim que uma solicitação relevante aparece, o modelo carrega as instruções completas automaticamente — sem precisar de acionamento manual e sem consumir tokens até que ela seja realmente usada.

O modelo carrega Cancellations Pauses Winback automaticamente assim que uma solicitação é relevante para essa habilidade.

Funciona com qualquer modelo de IA

Habilidades de IA são instruções em Markdown simples, não código específico de um provedor. Por isso, Cancellations Pauses Winback não fica vinculada ao modelo para o qual foi criada. Instale-a uma vez no TypingMind e use-a com GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama ou um modelo local executado por conta própria — tudo com suas próprias chaves de API.

  • Carregada apenas quando necessário

    O prompt do sistema contém apenas o nome e a descrição. As instruções são buscadas na primeira solicitação relevante, então uma habilidade sem uso não gera custo.

  • Troque de modelo durante a conversa

    Como a habilidade é composta de instruções, não de código, trocar de modelo não afeta seu funcionamento — o próximo modelo lê o mesmo arquivo SKILL.md.

Instruções da habilidade

Este é o conteúdo de SKILL.md que o modelo carrega. Leia antes de instalar — uma habilidade é um conjunto de instruções que seu modelo seguirá.

Cancellations, Pauses, and Winback

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.

Phase 1: Scope

Decide what state you need to surface to the user.

StateSignal in CustomerInfoNotes
Canceled, still has accessentitlement.unsubscribeDetectedAt != null and isActive == trueShow "ends on [expirationDate]"
Billing issue (grace or hold)entitlement.billingIssueDetectedAt != nullPayment failed. Recovery is in progress unless the subscription already ended, which can leave the field set; see revenuecat/payment-recovery
Pausedentitlement.isActive == false while product is still ownedResume date: autoResumeDate
Active and renewingentitlement.willRenew == trueNormal state

Backend win back campaign segmentation uses the CANCELLATION webhook cancel_reason field (UNSUBSCRIBE, BILLING_ERROR, DEVELOPER_INITIATED, PRICE_INCREASE).

Phase 2: Prepare

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:

  • Prefer 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()).
  • Do not compute access manually from expirationDate. Read isActive and willRenew.
  • Pause resume date is SubscriptionInfo.autoResumeDate in the SDK (REST: auto_resume_date).

Phase 3: Execute

Detect cancellation with remaining access

kotlin
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.

Detect pause

kotlin
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.

Open the subscription management screen

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.

kotlin
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.

Look up pause resume date via REST

From your backend, call the subscribers endpoint and read subscriber.subscriptions[<product_identifier>].auto_resume_date (ISO 8601, Google Play only, null unless paused):

bash
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.

Resubscribe before expiry

Google's resubscribe before expiry flow fires SUBSCRIPTION_RESTARTED. RevenueCat clears unsubscribeDetectedAt and sets willRenew = true. No extra code required, just re-read customerInfo.

Resubscribe after expiry

A resubscribe after expiry fires INITIAL_PURCHASE (usual on Google Play) or RENEWAL. Handle both the same way: revenuecat/webhooks re-reads the customer after either, which restores access.

Phase 4: Verify

CheckHow
Cancellation banner showsCancel in Play Store, pull fresh CustomerInfo, confirm unsubscribeDetectedAt != null and isActive == true
Management deep link opensTap the link, verify Play subscriptions screen opens for the correct product
Pause is reflectedPause in Play Store sandbox, confirm entitlement.isActive == false
Pause resume dateCall /v1/subscribers/{id}, confirm auto_resume_date is non null
Win back acceptedAccept a Play configured win back offer, confirm the purchase surfaces as a normal subscription in CustomerInfo

Notes

  • Deferral and revocation go through the RevenueCat REST API with your secret key: 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).
  • Win back campaigns need no SDK code. They are configured in Play Console or the RevenueCat dashboard.
  • RevenueCat sends a 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.

References

Perguntas frequentes

O que a habilidade de IA Cancellations Pauses Winback faz?

Use this skill when surfacing cancellation, pause, and winback state on Android with RevenueCat. Covers reading unsubscribeDetectedAt, billingIssueDetectedAt, pause state and resume date via SubscriptionInfo.autoResumeDate, showManageSubscriptions for the deep link, and the SUBSCRIPTION_PAUSED webhook.

Por que usar Cancellations Pauses Winback no TypingMind?

Porque basta instalar uma vez para usar com qualquer modelo. A habilidade Cancellations Pauses Winback é escrita em Markdown simples, e não em código específico de um provedor, então a mesma habilidade funciona com GPT-5, Claude, Gemini, Grok ou um modelo local — e é possível trocar de modelo no meio do chat sem que ela deixe de funcionar. No TypingMind, você usa suas próprias chaves de API e paga diretamente aos provedores, em vez de pagar uma assinatura por licença de usuário. Suas habilidades e chats permanecem no seu próprio armazenamento.

Como instalar Cancellations Pauses Winback no TypingMind?

Abra Plugins → Habilidades → Instalar do GitHub no TypingMind e cole https://github.com/RevenueCat/play-billing-skills/tree/main/revenuecat/cancellations-pauses-winback. O TypingMind lê o arquivo SKILL.md e instala a habilidade para que possa ser ativada em cada chat.

Quais modelos de IA podem usar Cancellations Pauses Winback?

Qualquer modelo conectado no TypingMind. As habilidades de IA são instruções em Markdown simples, e não código específico de um provedor. Assim, GPT, Claude, Gemini, Grok e modelos locais podem carregar esta habilidade quando uma solicitação corresponder a ela.

Quantos modelos de IA posso usar com Cancellations Pauses Winback?

Quantos quiser. Desde que o modelo ofereça suporte a habilidades, é possível usar Cancellations Pauses Winback com ele — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama e outros — tudo no TypingMind com suas próprias chaves de API.

A habilidade de IA Cancellations Pauses Winback é gratuita?

Sim. A habilidade é publicada no GitHub por RevenueCat sob a licença Apache-2.0. O pagamento é feito apenas ao seu provedor de IA pelos tokens usados.

O que são habilidades de IA?

Uma habilidade de IA é um conjunto reutilizável de instruções que ensina um modelo de IA a realizar uma tarefa específica. Ela segue o formato aberto Agent Skills: um arquivo SKILL.md com nome e descrição, além de scripts, templates ou arquivos de referência de que o modelo possa precisar. O modelo lê as instruções apenas quando sua solicitação corresponde à habilidade, então uma habilidade instalada não gera custos até ser usada.

Qual é a diferença entre habilidades de IA e plugins ou servidores MCP?

Um plugin ou servidor MCP oferece ao modelo novas ferramentas que ele pode acionar — código que é executado em algum lugar e retorna um resultado. Já uma habilidade de IA dá ao modelo o conhecimento e as orientações de que ele precisa: como abordar uma tarefa, quais etapas seguir e como deve ser um bom resultado. As habilidades são escritas em Markdown simples, por isso não precisam de servidor, chave de API nem ambiente de execução, e funcionam com qualquer modelo.

Ver lista completa

Crie seu próprio espaço de trabalho com IA agora

Inscreva-se na nossa newsletter para receber avisos sobre novos recursos e futuros sorteios 👇