[PR #3696] [MERGED] fix(stripe): fallback to subscription id instead of picking the first if subId is provided #4959

Closed
opened 2026-03-13 12:05:34 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/3696
Author: @Bekacru
Created: 7/30/2025
Status: Merged
Merged: 7/30/2025
Merged by: @Bekacru

Base: mainHead: fix/subscription-id


📝 Commits (2)

  • 87b8444 fix(stripe): fallback to subscription id instead of picking the first if subId is provided
  • e21d7ec chore(changeset): add changeset for fallback to subscription id in stripe

📊 Changes

2 files changed (+8 additions, -2 deletions)

View changed files

.changeset/angry-items-boil.md (+5 -0)
📝 packages/stripe/src/index.ts (+3 -2)

📄 Description

closes #3690


Summary by cubic

Updated Stripe logic to use the provided subscription ID as a fallback when selecting the active subscription, instead of always picking the first one. This ensures the correct subscription is used when a specific ID is given.


🔄 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/3696 **Author:** [@Bekacru](https://github.com/Bekacru) **Created:** 7/30/2025 **Status:** ✅ Merged **Merged:** 7/30/2025 **Merged by:** [@Bekacru](https://github.com/Bekacru) **Base:** `main` ← **Head:** `fix/subscription-id` --- ### 📝 Commits (2) - [`87b8444`](https://github.com/better-auth/better-auth/commit/87b844430f5b573b5ff49c636651ce4717e9dc52) fix(stripe): fallback to subscription id instead of picking the first if subId is provided - [`e21d7ec`](https://github.com/better-auth/better-auth/commit/e21d7ecd3686457035e4ebf39c74a64cd02dce71) chore(changeset): add changeset for fallback to subscription id in stripe ### 📊 Changes **2 files changed** (+8 additions, -2 deletions) <details> <summary>View changed files</summary> ➕ `.changeset/angry-items-boil.md` (+5 -0) 📝 `packages/stripe/src/index.ts` (+3 -2) </details> ### 📄 Description closes #3690 <!-- This is an auto-generated description by cubic. --> --- ## Summary by cubic Updated Stripe logic to use the provided subscription ID as a fallback when selecting the active subscription, instead of always picking the first one. This ensures the correct subscription is used when a specific ID is given. <!-- 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-03-13 12:05:34 -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#4959