[PR #6174] [MERGED] fix(stripe): cancel subscription fails with Prisma #6500

Closed
opened 2026-03-13 13:01:20 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/6174
Author: @ping-maxwell
Created: 11/21/2025
Status: Merged
Merged: 11/21/2025
Merged by: @Bekacru

Base: canaryHead: fix/stripe-cancel-subscription-primsa


📝 Commits (1)

  • c1d3147 fix(stripe): cancel subscription fails with Prisma

📊 Changes

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

View changed files

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

📄 Description

Caused by not using updateMany when using a where clause that doesn't include a unique identifier on any of the fields.


Summary by cubic

Fixes subscription cancellation in the Stripe flow when using Prisma by switching from update to updateMany for non-unique where clauses. Prevents runtime errors and correctly sets cancelAtPeriodEnd.

Written for commit c1d314751b. Summary will update automatically 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/6174 **Author:** [@ping-maxwell](https://github.com/ping-maxwell) **Created:** 11/21/2025 **Status:** ✅ Merged **Merged:** 11/21/2025 **Merged by:** [@Bekacru](https://github.com/Bekacru) **Base:** `canary` ← **Head:** `fix/stripe-cancel-subscription-primsa` --- ### 📝 Commits (1) - [`c1d3147`](https://github.com/better-auth/better-auth/commit/c1d314751b42cc6524b60d8531a0d617479aba1c) fix(stripe): cancel subscription fails with Prisma ### 📊 Changes **1 file changed** (+1 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `packages/stripe/src/index.ts` (+1 -1) </details> ### 📄 Description Caused by not using `updateMany` when using a where clause that doesn't include a `unique` identifier on any of the fields. <!-- This is an auto-generated description by cubic. --> --- ## Summary by cubic Fixes subscription cancellation in the Stripe flow when using Prisma by switching from update to updateMany for non-unique where clauses. Prevents runtime errors and correctly sets cancelAtPeriodEnd. <sup>Written for commit c1d314751b42cc6524b60d8531a0d617479aba1c. Summary will update automatically 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:01:21 -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#6500