[PR #7947] [MERGED] fix(stripe): prevent duplicate line item when priceId equals seatPriceId #7646

Closed
opened 2026-03-13 13:44:15 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/7947
Author: @bytaesu
Created: 2/12/2026
Status: Merged
Merged: 2/12/2026
Merged by: @bytaesu

Base: canaryHead: 2026-02-13/fix/stripe-seat-only-plan-checkout


📝 Commits (3)

  • ee7d96b fix(stripe): prevent duplicate line item when priceId equals seatPriceId
  • 3d82b54 fix: extend seat-only duplicate fix to portal upgrade path
  • 4ba863d fix: atleast one quantity

📊 Changes

2 files changed (+224 additions, -16 deletions)

View changed files

📝 packages/stripe/src/routes.ts (+23 -13)
📝 packages/stripe/test/seat-based-billing.test.ts (+201 -3)

📄 Description

Summary by cubic

Fixes duplicate items for seat‑only Stripe plans and ensures base items include a quantity. Applies to checkout and portal upgrades so totals and Stripe requests are correct.

  • Bug Fixes
    • Skip the base item when priceId === seatPriceId in checkout and portal upgrades to avoid duplicates.
    • Always send a quantity for the base item (quantity: 1 when seats are auto‑managed); updated tests for checkout and portal to reflect this.

Written for commit 4ba863dcb1. Summary will update on new commits.


🔄 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/7947 **Author:** [@bytaesu](https://github.com/bytaesu) **Created:** 2/12/2026 **Status:** ✅ Merged **Merged:** 2/12/2026 **Merged by:** [@bytaesu](https://github.com/bytaesu) **Base:** `canary` ← **Head:** `2026-02-13/fix/stripe-seat-only-plan-checkout` --- ### 📝 Commits (3) - [`ee7d96b`](https://github.com/better-auth/better-auth/commit/ee7d96b3ec10d95590c06bc464fa9810cc3f6a47) fix(stripe): prevent duplicate line item when priceId equals seatPriceId - [`3d82b54`](https://github.com/better-auth/better-auth/commit/3d82b54bc7cce5dec95d81a2d112f067c3c0b5ea) fix: extend seat-only duplicate fix to portal upgrade path - [`4ba863d`](https://github.com/better-auth/better-auth/commit/4ba863dcb14006f3eba833a3a5cf0e0cbf0f6c45) fix: atleast one quantity ### 📊 Changes **2 files changed** (+224 additions, -16 deletions) <details> <summary>View changed files</summary> 📝 `packages/stripe/src/routes.ts` (+23 -13) 📝 `packages/stripe/test/seat-based-billing.test.ts` (+201 -3) </details> ### 📄 Description <!-- This is an auto-generated description by cubic. --> ## Summary by cubic Fixes duplicate items for seat‑only Stripe plans and ensures base items include a quantity. Applies to checkout and portal upgrades so totals and Stripe requests are correct. - **Bug Fixes** - Skip the base item when priceId === seatPriceId in checkout and portal upgrades to avoid duplicates. - Always send a quantity for the base item (quantity: 1 when seats are auto‑managed); updated tests for checkout and portal to reflect this. <sup>Written for commit 4ba863dcb14006f3eba833a3a5cf0e0cbf0f6c45. Summary will update on new commits.</sup> <!-- 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 13:44:15 -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#7646