TAM
BABetter Auth
•Created by TAM on 4/8/2025 in #help
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)
}
}
2 replies
BABetter Auth
•Created by TAM on 4/7/2025 in #help
How to fix Stripe error
[Better Auth]: Error fetching subscription from Stripe RangeError: Invalid time value
at Date1.toISOString (<anonymous>)
at Array.map (<anonymous>)
at Array.map (<anonymous>)
at Array.map (<anonymous>)
11 replies