Period fields not populated after stripe subscription
Hello,
period_start
and period_end
fields in the subscription object are not populated after a user subscribes via subscription.upgrade
.
Stripe : 17.7.0
Better-auth : 1.2.75 Replies
Heya, I experience the same issue. But I see an update error on prisma, saying:
Do you also see an error from your ORM or something?
I also checked BA's code where they populate these fields (in
packages/stripe/src/hooks.ts
line 44):
There they reference the fields current_period_end
and current_period_start
, but when I retrieve the subscription myself I cannot find these fields in the subscription object.
In my stripe plugin I added an event hook to check the subscription myself like this:
And it logs this subscription object:
(shortened some things, because the message would have been too long and I dont have discord nitro)
Do we have to populate any metadata or something? π€
@Ping Sorry for the ping, but its breaking the subscription flow a bit π
Can you confirm whether this is a bug or if we r missing any configurations? If it's a bug I can create an issue in github when necessarywhat version is your stripe?
18.0.0
Ooh i see it now. They have breaking changes in v18 π
That explains a lotIt will be fixed soon, but for now, yeah just downgrade to 17.7.0
Perfect, thanks a lot for checking in!