Stripe Plugin bug
authClient.subscription.upgrade()
does not work with prisma, it says a column is missing even though the prisma studio shows it exists, the neon dashboard says it exists, and I can access the field using the prisma adapter in my code no problem.
Solution:Jump to solution
Probably because you made
stripeSubscriptionId
required in your schema.
Just go to your schema.prisma and remove the ? on stripeSubscriptionId: String?
It has to be optional because this val comes from stripe, and is put in the db down the line by the webhook handler built into better-auth...2 Replies
Solution
Probably because you made
stripeSubscriptionId
required in your schema.
Just go to your schema.prisma and remove the ? on stripeSubscriptionId: String?
It has to be optional because this val comes from stripe, and is put in the db down the line by the webhook handler built into better-auththat sucks... I used the generate command from the docs so I didn't even set it up
yep that was it:
it wasn't optional