[PR #5819] fix(stripe): return updated subscription in onSubscriptionUpdate callback #14496

Closed
opened 2026-04-13 09:30:21 -05:00 by GiteaMirror · 0 comments
Owner

Original Pull Request: https://github.com/better-auth/better-auth/pull/5819

State: closed
Merged: Yes


Closes https://github.com/better-auth/better-auth/issues/5560


Summary by cubic

Ensures onSubscriptionUpdate receives the freshly updated subscription from the database after a Stripe subscription change. Fixes callbacks seeing stale data like old seat counts.

  • Bug Fixes
    • Return the result of adapter.update and pass it to onSubscriptionUpdate (fallback to original if unavailable).
    • Added a test that updates seats (1 → 5) and asserts the callback and DB both reflect the new value.

Written for commit 1a80a6e57f. Summary will update automatically on new commits.

**Original Pull Request:** https://github.com/better-auth/better-auth/pull/5819 **State:** closed **Merged:** Yes --- Closes https://github.com/better-auth/better-auth/issues/5560 <!-- This is an auto-generated description by cubic. --> --- ## Summary by cubic Ensures onSubscriptionUpdate receives the freshly updated subscription from the database after a Stripe subscription change. Fixes callbacks seeing stale data like old seat counts. - **Bug Fixes** - Return the result of adapter.update and pass it to onSubscriptionUpdate (fallback to original if unavailable). - Added a test that updates seats (1 → 5) and asserts the callback and DB both reflect the new value. <sup>Written for commit 1a80a6e57f95b5ba99b1898efa565945b42d9536. Summary will update automatically on new commits.</sup> <!-- End of auto-generated description by cubic. -->
GiteaMirror added the pull-request label 2026-04-13 09:30: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#14496