Skip to content

docs(subscriptions): document mainnet release changes#1562

Merged
dev-jodee merged 15 commits into
mainfrom
docs/subscriptions-mainnet-release-updates
Jul 13, 2026
Merged

docs(subscriptions): document mainnet release changes#1562
dev-jodee merged 15 commits into
mainfrom
docs/subscriptions-mainnet-release-updates

Conversation

@dev-jodee

Copy link
Copy Markdown
Contributor

DO NOT MERGE — draft for review ahead of the Subscriptions program's first post-mainnet release. Hold until the release ships and the final audit clears.

Summary

Updates apps/docs/content/docs/en/payments/subscriptions/ for the four release changes:

  • Supported Tokens (overview.mdx): program now supports Token-2022 mints with a configured TransferHook (e.g. PYUSD) — it forwards the mint's hook accounts (hook program, ExtraAccountMetaList validation PDA, extras) into the TransferChecked CPI. Removes the stale claim that configured hooks are rejected, and documents SDK auto-resolution (resolveTransferHookAccounts / plugin client).
  • Close Subscription Authority (close-subscription-authority.mdx): corrects the inaccurate claim that closing revokes the token delegate approval — it does not. Adds a Revoke The Delegate Approval section for the new RevokeSubscriptionAuthority instruction.
  • Recurring Delegation (recurring-delegation.mdx): documents the startTs = 0 sentinel (start on transaction landing; requires non-zero expiryTs).
  • New page — Revoke Abandoned Delegation: documents RevokeAbandonedDelegation, the recorded payer's path to reclaim rent from a fixed/recurring delegation whose Subscription Authority has been closed or rotated (the only recovery path for expiry_ts == 0 delegations). Added to meta.json nav.

Notes for reviewers

  • Code samples follow the existing TS-plugin-client / Rust-Builder style. RevokeAbandonedDelegation has no hand-written plugin overlay, so its TS sample uses the generated getRevokeAbandonedDelegationInstruction.
  • English source only; translations are handled by Lingo.
  • Prettier-clean (proseWrap: always, printWidth 80).

@vercel

vercel Bot commented Jun 15, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
solana-com-docs Ready Ready Preview, Comment Jul 13, 2026 3:46pm
5 Skipped Deployments
Project Deployment Actions Updated (UTC)
solana-com Skipped Skipped Jul 13, 2026 3:46pm
solana-com-accelerate Skipped Skipped Jul 13, 2026 3:46pm
solana-com-breakpoint-2 Skipped Skipped Jul 13, 2026 3:46pm
solana-com-media Skipped Skipped Jul 13, 2026 3:46pm
templates Skipped Skipped Jul 13, 2026 3:46pm

Request Review

@vercel vercel Bot temporarily deployed to Preview – solana-com June 15, 2026 14:28 Inactive
@vercel vercel Bot temporarily deployed to Preview – templates June 15, 2026 14:28 Inactive
@vercel vercel Bot temporarily deployed to Preview – solana-com-breakpoint-2 June 15, 2026 14:28 Inactive
@vercel vercel Bot temporarily deployed to Preview – solana-com-media June 15, 2026 14:28 Inactive
@vercel vercel Bot temporarily deployed to Preview – solana-com-accelerate June 15, 2026 14:28 Inactive
@vercel vercel Bot temporarily deployed to Preview – solana-com June 15, 2026 14:39 Inactive
@vercel vercel Bot temporarily deployed to Preview – solana-com-media June 15, 2026 14:39 Inactive
@vercel vercel Bot temporarily deployed to Preview – solana-com-accelerate June 15, 2026 14:39 Inactive
@vercel vercel Bot temporarily deployed to Preview – templates June 15, 2026 14:39 Inactive
@vercel vercel Bot temporarily deployed to Preview – solana-com-breakpoint-2 June 15, 2026 14:39 Inactive
@vercel vercel Bot temporarily deployed to Preview – solana-com-media June 15, 2026 14:40 Inactive
@vercel vercel Bot temporarily deployed to Preview – solana-com-accelerate June 15, 2026 14:40 Inactive
@vercel vercel Bot temporarily deployed to Preview – solana-com-breakpoint-2 June 15, 2026 14:40 Inactive
@vercel vercel Bot temporarily deployed to Preview – templates June 15, 2026 14:40 Inactive
@vercel vercel Bot temporarily deployed to Preview – solana-com June 15, 2026 14:40 Inactive
@vercel vercel Bot temporarily deployed to Preview – solana-com-accelerate June 15, 2026 14:41 Inactive
@vercel vercel Bot temporarily deployed to Preview – templates June 15, 2026 14:41 Inactive
@vercel vercel Bot temporarily deployed to Preview – solana-com-breakpoint-2 June 15, 2026 14:41 Inactive
@vercel vercel Bot temporarily deployed to Preview – solana-com June 15, 2026 14:41 Inactive
@vercel vercel Bot temporarily deployed to Preview – solana-com-media June 15, 2026 14:41 Inactive
@vercel vercel Bot temporarily deployed to Preview – solana-com-accelerate June 15, 2026 14:42 Inactive
@vercel vercel Bot temporarily deployed to Preview – templates June 15, 2026 14:42 Inactive
@vercel vercel Bot temporarily deployed to Preview – solana-com-breakpoint-2 June 15, 2026 14:42 Inactive
@vercel vercel Bot temporarily deployed to Preview – solana-com-media June 15, 2026 14:42 Inactive
@vercel vercel Bot temporarily deployed to Preview – solana-com June 15, 2026 14:42 Inactive
@vercel vercel Bot temporarily deployed to Preview – solana-com-accelerate June 29, 2026 14:39 Inactive
@vercel vercel Bot temporarily deployed to Preview – solana-com June 29, 2026 15:28 Inactive
@vercel vercel Bot temporarily deployed to Preview – solana-com-media June 29, 2026 15:28 Inactive
@vercel vercel Bot temporarily deployed to Preview – templates June 29, 2026 15:28 Inactive
@vercel vercel Bot temporarily deployed to Preview – solana-com July 8, 2026 13:54 Inactive
@vercel vercel Bot temporarily deployed to Preview – solana-com-breakpoint-2 July 8, 2026 13:54 Inactive
@vercel vercel Bot temporarily deployed to Preview – solana-com-accelerate July 8, 2026 13:54 Inactive
@vercel vercel Bot temporarily deployed to Preview – templates July 8, 2026 13:54 Inactive
@vercel vercel Bot temporarily deployed to Preview – solana-com-media July 8, 2026 13:54 Inactive
dev-jodee added 13 commits July 13, 2026 08:51
Update the subscriptions docs for the first post-mainnet release:

- Supported Tokens: the program now supports Token-2022 mints with a
  configured TransferHook (e.g. PYUSD); it forwards the mint's hook
  accounts into the TransferChecked CPI. Removes the stale claim that
  configured hooks are rejected.
- Close Subscription Authority: correct the claim that closing revokes
  the token delegate approval. It does not — document the new
  RevokeSubscriptionAuthority instruction that clears it.
- Recurring delegation: document the startTs=0 sentinel (start on
  landing; requires a non-zero expiry).
- Add a Revoke Abandoned Delegation page for reclaiming sponsor rent
  from a delegation whose Subscription Authority is closed or rotated.
- close-subscription-authority: the RevokeSubscriptionAuthorityBuilder
  sample was missing the required subscription_authority account (the
  builder panics without it); make the sample self-contained like the
  close sample above it
- bump solana-instruction to ^3 in the three install snippets (the
  subscriptions crate depends on ~3.4)
- revoke-abandoned-delegation: scope the recovery-path claim to the
  recorded payer and note the fully-spent fixed-delegation exception
@greptile-apps

greptile-apps Bot commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR updates the Subscriptions program docs for its first post-mainnet release, covering four changes across eight files. It adds a new revoke-abandoned.mdx page and updates existing pages with corrected claims, new instructions, and version bumps.

  • overview.mdx removes the stale TransferHook rejection claim and documents SDK auto-resolution and all emitted on-chain events.
  • close-subscription-authority.mdx corrects the close-revokes-delegate misconception and adds a new RevokeSubscriptionAuthority section; recurring-delegation.mdx and fixed-delegation.mdx document the startTs = 0 sentinel and expiryTs hard-stop; subscription-plan.mdx adds Resume A Subscription and plan update constraints.
  • revoke-abandoned.mdx is a new page documenting RevokeAbandonedDelegation and RevokeAbandonedSubscription as the only rent-recovery paths for stranded accounts.

Confidence Score: 5/5

Documentation-only PR; all changes are additive or corrective prose with no executable logic.

Every change corrects a factual error, adds new instruction guides, or bumps dependency version strings in code samples. No executable code is introduced. The two findings are minor wording gaps in Notes sections and a cross-link that covers only half its target audience.

subscription-plan.mdx (Notes missing 'resume') and revoke-abandoned.mdx (table link for fixed delegation).

Important Files Changed

Filename Overview
apps/docs/content/docs/en/payments/subscriptions/overview.mdx Removes stale rejection claim for TransferHook mints; adds explicit event list and SDK resolution guidance — clean and accurate.
apps/docs/content/docs/en/payments/subscriptions/close-subscription-authority.mdx Corrects the revocation claim; adds RevokeSubscriptionAuthority section with Token-2022 program-ID note in prose; Rust sample hardcodes classic token program (flagged in prior review).
apps/docs/content/docs/en/payments/subscriptions/revoke-abandoned.mdx New page documenting RevokeAbandonedDelegation and RevokeAbandonedSubscription; table link for ordinary fixed-delegation revoke is missing.
apps/docs/content/docs/en/payments/subscriptions/recurring-delegation.mdx Version bump to 0.4.0; adds startTs=0 sentinel and expiryTs hard-stop notes — accurate and complete.
apps/docs/content/docs/en/payments/subscriptions/subscription-plan.mdx Adds Resume A Subscription section and UpdatePlan constraints; Notes still omits 'resume' from the subscriber-signed transactions list.
apps/docs/content/docs/en/payments/subscriptions/fixed-delegation.mdx Version bump to 0.4.0 and new expiryTs hard-stop note — straightforward and correct.
apps/docs/content/docs/en/payments/subscriptions/create-subscription-authority.mdx Adds sponsor-payer note to Notes section — accurate and consistent with other pages.
apps/docs/content/docs/en/payments/subscriptions/meta.json Inserts revoke-abandoned into the nav array between close-subscription-authority and pay-sh.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A([User]) -->|initSubscriptionAuthority| B[Subscription Authority PDA]
    B -->|createFixedDelegation| C[Fixed Delegation PDA]
    B -->|createRecurringDelegation| D[Recurring Delegation PDA]
    B -->|subscribe| E[Subscription PDA]
    C -->|transferFixed| F([Delegatee])
    D -->|transferRecurring| F
    E -->|transferSubscription| G([Merchant / Puller])
    E -->|cancelSubscription| H{Cancelled}
    H -->|resumeSubscription| E
    H -->|revokeSubscription after expiry| Z1([Closed])
    C -->|revokeDelegation| Z2([Closed])
    D -->|revokeDelegation| Z3([Closed])
    B -->|closeSubscriptionAuthority| Z4([Closed])
    B -->|revokeSubscriptionAuthority| I([Delegate approval cleared])
    subgraph Abandoned Recovery
        C2[Stranded Fixed/Recurring PDA] -->|RevokeAbandonedDelegation| R1([Rent to recorded payer])
        E2[Stranded Subscription PDA] -->|RevokeAbandonedSubscription| R2([Rent to recorded payer])
    end
    Z4 -.->|Authority closed| C2
    Z4 -.->|Authority closed| E2
Loading
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
flowchart TD
    A([User]) -->|initSubscriptionAuthority| B[Subscription Authority PDA]
    B -->|createFixedDelegation| C[Fixed Delegation PDA]
    B -->|createRecurringDelegation| D[Recurring Delegation PDA]
    B -->|subscribe| E[Subscription PDA]
    C -->|transferFixed| F([Delegatee])
    D -->|transferRecurring| F
    E -->|transferSubscription| G([Merchant / Puller])
    E -->|cancelSubscription| H{Cancelled}
    H -->|resumeSubscription| E
    H -->|revokeSubscription after expiry| Z1([Closed])
    C -->|revokeDelegation| Z2([Closed])
    D -->|revokeDelegation| Z3([Closed])
    B -->|closeSubscriptionAuthority| Z4([Closed])
    B -->|revokeSubscriptionAuthority| I([Delegate approval cleared])
    subgraph Abandoned Recovery
        C2[Stranded Fixed/Recurring PDA] -->|RevokeAbandonedDelegation| R1([Rent to recorded payer])
        E2[Stranded Subscription PDA] -->|RevokeAbandonedSubscription| R2([Rent to recorded payer])
    end
    Z4 -.->|Authority closed| C2
    Z4 -.->|Authority closed| E2
Loading

Reviews (3): Last reviewed commit: "docs(subscriptions): address PR review f..." | Re-trigger Greptile

amilz
amilz previously approved these changes Jul 13, 2026

@amilz amilz left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMO the 2 new guides would be better as a single "revoking authority/subscriptions" guide and include a table visually comparing the difference between the two (when you can use one vs the other).

Comment thread apps/docs/content/docs/en/payments/subscriptions/close-subscription-authority.mdx Outdated
Comment thread apps/docs/content/docs/en/payments/subscriptions/close-subscription-authority.mdx Outdated
Comment thread apps/docs/content/docs/en/payments/subscriptions/subscription-plan.mdx Outdated
Drop redundant token-program inline comments from the revoke examples
(the surrounding prose already covers the SPL Token vs Token-2022
choice), document that a revoked subscription is closed and requires a
new subscribe, and merge the two revoke-abandoned pages into a single
guide with a comparison table of the two instructions.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants