/pagokit:subscription-lifecyclefrom PagoKit — Payment Integration Agent
Covers subscription billing after creation: trials, proration, dunning, retry schedules, grace periods, involuntary churn from expired cards, cancellation timing, bank-mandate lifecycle (SEPA, Bacs, PAD, UPI AutoPay, Pix Automatico), stored-credential framework, and network transaction IDs for recurring charges.
Ships in PagoKit — Payment Integration Agent. 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.
Creating a subscription is one API call. Everything that follows is where the money is lost.
trialing ──► active ──► past_due ──► canceled
│ │ ▲ │
│ │ └─────────┘ (retry succeeded)
│ ▼
│ paused / grace
└──► canceled (trial abandoned)
past_due is the state that matters. A subscription there is still delivering value and no
longer being paid for. How long you tolerate that, and what the customer sees while it lasts,
is a product decision the code has to encode explicitly — the default of "keep serving forever
because nobody wrote the branch" is the expensive one.
Most subscription cancellations are not decisions. They are expired cards, changed cards, and issuer declines on a merchant-initiated transaction. Concretely:
The first charge is customer-initiated (CIT), with the customer present. Every later charge is merchant-initiated (MIT), and the networks require it to reference the original.
Persist the network transaction id from the first charge and send it on every subsequent one. Mastercard requires the stored Trace ID on economically-related MITs from 23 October 2026, and Visa's Original Transaction ID already drives approval rates today. An unlinked MIT is not a warning — it is a decline.
That means a column: network_transaction_id on the stored payment method or the subscription.
Read recurring.network_txn_id_required from the provider entry.
When a plan changes mid-cycle, someone is owed money. The three defensible answers:
Pick one, write it down, and make the checkout say what will be charged before the click. The support burden of an unexplained mid-cycle charge exceeds its revenue.
Cancel-at-period-end is almost always right: the customer keeps what they paid for, and you keep the revenue you already earned. Immediate cancellation with a refund is a separate, deliberate choice.
Two things that are not optional: cancellation must be possible without contacting support (a legal requirement in several markets, not a UX preference), and the customer must be told exactly when access ends.
For SEPA, Bacs, PAD, UPI AutoPay, Pix Automático and PAC, read
fragments/billing/subscription_mandate.md. The differences that break card-shaped code:
Never model these as a card on file. supports.subscriptions: true does not mean the rails
behave alike.
past_due handled explicitly.network_transaction_id persisted and sent.What SKILL.md sets; muted values are Claude Code's defaults
- Generating or reviewing subscription billing - The user asks about trials, proration, dunning, failed payments, cancellation or churn - A recurring integration uses a bank mandate rather than a card
Three short reads, in order
npx claudepluginhub hainrixz/agente-pagokit --plugin pagokit8 skills in this plugin
/doctorAudits an existing PagoKit integration in the current project against the generated per-provider checklist, so it covers every provider in the catalog rather than a hardcoded few. Checks .gitignore covers .env, that env vars are present and use test-key prefixes, that the webhook secret looks valid, that the webhook handler verifies signatures, that the minimum events for the integrated provider are routed, and that PAGOKIT_INTEGRATION.md exists. Used by /pagokit:doctor. Read-only — never writes files./integration-builderComposes a complete payment integration by resolving capability fragments against the chosen provider's catalog entry, then emits a structured file plan for integration-specialist to execute. Selects fragments by verification family, notification model and checkout pattern rather than by provider name, so a provider new to the catalog composes correctly without new templates. Refuses to emit a signature verifier when the provider's scheme is not verified, emitting re-fetch and an explicit TODO instead./payment-advisorRecommends the single best payment provider for the user's project after a short interactive wizard, then hands off to the implementer. Runs a deterministic local ranking engine instead of scoring by hand, so the same situation always yields the same answer and every rejection has an exact reason. Computes real fees on a concrete transaction, always states whether PagoKit can actually BUILD the integration or only advise on it, discloses when the data was last verified, and refuses sanctioned markets outright. Bilingual ES/EN/PT, language inferred from the user's first prompt./payment-migratorPlans and executes a migration from one payment provider to another without downtime. Establishes what cannot move (stored card tokens usually cannot), maps the two providers' event vocabularies, flags architectural differences such as a change of notification model or a move to a merchant of record, and sequences a coexistence period rather than an atomic switch. Powers /pagokit:migrate./project-analyzerDetects a project's technology stack, framework, deploy target, ORM, primary language, and active payment use cases by reading package.json/pyproject.toml/composer.json/Gemfile, schema files, route files, and deploy configs. Use this skill at the start of any PagoKit flow to ground recommendations in the real project context. Emits a structured detection result for payment-advisor and integration-specialist to consume./tax-advisorExplains what a merchant owes the tax authority once a payment succeeds, and whether a merchant of record removes that obligation. Covers the merchant-of-record trade-off, e-invoicing mandates (CFDI, NF-e, DTE, SUNAT, DIAN, SRI, SdI, KSeF, ZATCA), EU VAT OSS, US economic nexus with home-rule jurisdictions, and when a tax engine is genuinely required. Reads the obligation from the catalog rather than recalling it. Never gives legal advice — it names the obligation and points at who can discharge it.Other plugins' skills for the same job