Stripe Plugin webhook error

Getting this error in better auth stripe webhook :

2025-04-16T20:24:59.891Z ERROR [Better Auth]: Stripe webhook failed. Error: Invalid time value
POST /api/auth/stripe/webhook 200 in 175ms
POST /api/auth/stripe/webhook 200 in 14ms
POST /api/auth/stripe/webhook 200 in 14ms
POST /api/auth/stripe/webhook 200 in 13ms
2025-04-16T20:25:01.676Z 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>)


In stripe there is no error. Checkout is finalized successfully.
Does enyone knows what casues this error and how to fix it ?
Solution
use stripe sdk version v17.7.0, anything above is not supported yet
Was this page helpful?