mirror of
https://github.com/better-auth/better-auth.git
synced 2026-07-30 17:12:35 -05:00
fix: use subscription Id to fetch the current active subscription from stripe (#1770)
This commit is contained in:
@@ -240,7 +240,7 @@ export const stripe = <O extends StripeOptions>(options: O) => {
|
||||
customer: customerId,
|
||||
status: "active",
|
||||
})
|
||||
.then((res) => res.data[0])
|
||||
.then((res) => res.data.find(subscription => subscription.id === ctx.body.subscriptionId))
|
||||
.catch((e) => null)
|
||||
: null;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user