Skip to content

feat(skus): add relink-subscription support tool#3065

Draft
Sneagan wants to merge 2 commits into
masterfrom
feat/skus-support-clear-stale-subscription
Draft

feat(skus): add relink-subscription support tool#3065
Sneagan wants to merge 2 commits into
masterfrom
feat/skus-support-clear-stale-subscription

Conversation

@Sneagan

@Sneagan Sneagan commented Apr 16, 2026

Copy link
Copy Markdown
Contributor

Adds bat-go skus relink-subscription CLI command and a new support-authenticated endpoint PATCH /v1/orders/{orderID}/subscription.

When a user cancels and resubscribes via Stripe but the order still points to the old canceled subscription (blocking credential loads), this tool points the order at the new active subscription and renews it — atomically updating the sub ID, paid status, expiresAt, and lastPaidAt in one transaction.

Summary

Type of Change

  • Product feature
  • Bug fix
  • Performance improvement
  • Refactor
  • Other

Tested Environments

  • Development
  • Staging
  • Production

Before Requesting Review

  • Does your code build cleanly without any errors or warnings?
  • Have you used auto closing keywords?
  • Have you added tests for new functionality?
  • Have validated query efficiency for new database queries?
  • Have documented new functionality in README or in comments?
  • Have you squashed all intermediate commits?
  • Is there a clear title that explains what the PR does?
  • Have you used intuitive function, variable and other naming?
  • Have you requested security and/or privacy review if needed
  • Have you performed a self review of this PR?

Manual Test Plan

Sneagan added 2 commits April 16, 2026 12:13
Adds `bat-go skus relink-subscription` CLI command and a new support-authenticated
endpoint PATCH /v1/orders/{orderID}/subscription.

When a user cancels and resubscribes via Stripe but the order still points to the
old canceled subscription (blocking credential loads), this tool points the order at
the new active subscription and renews it — atomically updating the sub ID, paid
status, expiresAt, and lastPaidAt in one transaction.
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.

1 participant