How to manage a stripe plan upgrade

Hi everyone, I'm trying to upgrade a user's subscription plan using Better-Auth and Stripe. Here’s the snippet I'm using:
const { error } = await authClient.subscription.upgrade({
plan: planName,
...
subscriptionId: subscription.subscriptionId,
});
const { error } = await authClient.subscription.upgrade({
plan: planName,
...
subscriptionId: subscription.subscriptionId,
});
What is the correct way to handle a subscription upgrade better-auth/stripe? I missing something essential in this method call Do I need to build my own plugin or custom logic to handle the subscription upgrade properly ?
0 Replies
No replies yetBe the first to reply to this messageJoin

Did you find this page helpful?