How to use stripe resume subscription
I need to use like this:
// Handle subscription resumption
const handleResumeSubscription = async (subscriptionId: string) => {
if (!subscriptionId) return
try {
// Use the manage method to redirect to Stripe portal where user can resume subscription
const { error } = await authClient.subscription.resume(subscriptionId, {
billing_cycle_anchor: "now",
})
if (error) {
throw new Error(error.message)
}
} catch (error) {
console.error("Resume subscription error:", error)
}
}
0 Replies