[PR #4632] [CLOSED] fix(stripe): differentiate annual plan for subscription upgrades #31094

Closed
opened 2026-04-17 22:01:42 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/4632
Author: @vaporvee
Created: 9/13/2025
Status: Closed

Base: canaryHead: canary


📝 Commits (2)

  • 4c70fd3 fix(stripe): differentiate annual plan for subscription upgrades
  • f53bccf chore: formatting

📊 Changes

1 file changed (+2 additions, -1 deletions)

View changed files

📝 packages/stripe/src/index.ts (+2 -1)

📄 Description

Co-Authored-By: Pukimaa me@pukima.site


Summary by cubic

Fixes subscription upgrades to correctly handle annual plans. Users can switch from monthly to annual without hitting a false “already subscribed” error.

  • Bug Fixes
    • Use the correct Stripe price for annual vs. monthly in both checkout and billing portal flows (annualDiscountPriceId/annualDiscountLookupKey, with monthly fallback to priceId/lookupKey).
    • Prevent false “already subscribed” when upgrading from monthly to annual by checking the selected billing interval.
    • Add helper to resolve price IDs from lookup keys.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/better-auth/better-auth/pull/4632 **Author:** [@vaporvee](https://github.com/vaporvee) **Created:** 9/13/2025 **Status:** ❌ Closed **Base:** `canary` ← **Head:** `canary` --- ### 📝 Commits (2) - [`4c70fd3`](https://github.com/better-auth/better-auth/commit/4c70fd36a5ee110465b47c1b3eec74f127a7d26f) fix(stripe): differentiate annual plan for subscription upgrades - [`f53bccf`](https://github.com/better-auth/better-auth/commit/f53bccf9c38745ff68be87ef21f1a37e14200793) chore: formatting ### 📊 Changes **1 file changed** (+2 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `packages/stripe/src/index.ts` (+2 -1) </details> ### 📄 Description Co-Authored-By: Pukimaa <me@pukima.site> <!-- This is an auto-generated description by cubic. --> --- ## Summary by cubic Fixes subscription upgrades to correctly handle annual plans. Users can switch from monthly to annual without hitting a false “already subscribed” error. - **Bug Fixes** - Use the correct Stripe price for annual vs. monthly in both checkout and billing portal flows (annualDiscountPriceId/annualDiscountLookupKey, with monthly fallback to priceId/lookupKey). - Prevent false “already subscribed” when upgrading from monthly to annual by checking the selected billing interval. - Add helper to resolve price IDs from lookup keys. <!-- End of auto-generated description by cubic. --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-04-17 22:01:42 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/better-auth#31094