BA
Better Auth•2mo ago
yoyojoe

Stripe one time payments?

Hi everyone. Is there a way to utilize products with the stripe plugin. I understand that subscriptions are the focus of the plugin atm. I need this soon and don't mind creating a plugin for it.
8 Replies
regex
regex•2mo ago
I was also wondering about this, i'd like to implement single time payments rather than subscriptions
MarkMiklos
MarkMiklos•2mo ago
🆙
bekacru
bekacru•2mo ago
for single time payments, you can use the stripe sdk directly. Better Auth can handle creating and assigning cusomter id for you.
Isaiah Smith
Isaiah Smith•2mo ago
This is the thought I had as well. Would you recommend still plugging into the BA stripe webhooks to handle checkout complete? I believe there’s a “on Strive event” better-auth hook that we can tie into
bekacru
bekacru•2mo ago
yes! It will handle mounting the webhooks and also verifying the signature for you
yoyojoe
yoyojoeOP•2mo ago
Hey thank you @bekacru so glad you guys thought about extending the webbooks. I don't mind this implementation at all, but are there any plans to add one time payments into the stripe plugin in the future?
bekacru
bekacru•2mo ago
How do you think better auth should help in that regard?
yoyojoe
yoyojoeOP•2mo ago
@bekacru I haven't given it much thought from a design perspective but something similar to how subscriptions are handled (my guess is it'll be a lot simpler). My use case might be somewhat niche. I'm trying to build an application where usage is tied to a token system. The user will buy more tokens in order to gain more usage. For more context, its an AI agent SaaS powered by Mastra.ai. Once I get more into the build I can give better examples of how it could be implemented into the stripe plugin. Also, I've seen a few people requesting a usage plugin which I think I'll end up building soon. A usage plugin tied to an API key would be so cool.

Did you find this page helpful?