Stripe Plugin | Bugs To Fix
1. even if a error happens it still creates a subscription in the database
2. getCheckoutSessionParams cause error
Received unknown parameter: params
(REF1.png files for reference) also causes 1.
bug to happens
3. When "admin" cancels user subscription from stripe dashboard it doesnt update the subscription in the database that is cancelled
4. onSubscriptionDeleted doesnt do anything same goes with the similar ones

32 Replies
5. when user tries to upgrade to the same subscription tier it already has, server does return a error but its an unhandled error so it just gives a prisma error in the console (check message.txt)
6. be able to return multiple objects for organization like both slug and id in the session
Update Regarding 2. getCheckoutSessionParams, docs and types are wrong
the image below represents the correct way of using it (tested)


1. A sub is created on the db before it tries to create stripe session but it's marked incomplete. Migh tbe good idea to remove newly created subs if it fails, but shouldn't be a problem.
2. will be fixed
3. I'll take a look (should be fixed)
4.
onSubscriptionDeleted
is only called when the sub status is set cancelled and it's no longer active. If it's still not being called, I'll check but I doubt that's the case.
5. I think this is cause you haven't marked referenceId
unique in your prisma schema (or we haven't marked that on generate command). If the user has the same tier active sub, it should return a proper error.5. ye its not set as unique but its generate with betterauth cli so
1. at some point it can cause that alot of subscription with incomplete status to be create and its accumulates over the time and could cause a performance issue on the db/storage part
yeah, we'll clean it up
thanks, keep up the great work
i will send here if i found any more bugs
5. well...
user doesnt have any sub
@bekacru
will take a look
can we use that plugin for stripe single payments too, or subscriptions only?
both
could an example be added to the docs, showing if we need different events for the webhook in that case and so on?
i m not a contributor to betterauth source code so i cant answer to that
7. freeTrial doesnt seem to work for stripe plugin at
subscription.plans
and by that i mean a free trial doesnt seem to show at the payment link/page
@bekacruThis should be fixed on latest beta
alr
Including the other issues
ty and sorry for ping
great guys, this plugin is life-changing!
@bekacru when i cancel the sub from stripe dashboard it still doesnt set the status to canceled in the db
using 1.2.2
is the webhook being triggered?
yes


do you see any log on the server when the webhook is hit?
should switch to using updateMany method
this way you dont need to pass the local id
yeah. it passes local test cause we're not using prisma. should have used
id
instead of referenceId
. Will be patched on the next release.alr, v1.2.3?
also the referenceid shouldnt be unique?
in my case is not

yeah
It shouldn't be since we could be creating
incomplete
subs in betweenah i see
also even tho its kinda off-topic, will i see in the near future an option to create a organization (called "personal" for example) automatically when a new user signs up?
like have a organization by "default"
currently i have it integrate it in my app but would be nicer if it was built-in
yk
yeah we should have that soon. in the works already.
perfect thank you, u are amazing fr