#obxd-checkout-subscription
1 messages · Page 1 of 1 (latest)
obxd-checkout-subscription
@tawny pike no that code is incorrect. It creates a Subscription, not a Checkout Session. Also you should ~never use redirectToCheckout() it's been deprecated for 2 years.
Follow https://stripe.com/docs/billing/quickstart which walks you through a Checkout integration end to end
thanks, I've seen that docs page but it was kinda confusing because in github examples there was implementaion with clients. should I make clients or make just with checkout session
I mean that's your decision to make, it's a fundamental one that you make before you start coding. Decide whether you want to use Checkout or not.
If you do use Checkout, follow the doc I linked you to which shows an end to end and extremely simple example for you to use
I don't understand how to attach subscription to my users. I mean how can I know from which user webhook request came and whos subsctiption I need to change in my db
it's about checkouts
"it's about checkouts" doesn't really mean anything unfortunately
Are you talking about our Checkout product with a capital C and no S which is our hosted payment page?
I mean that with checkouts Idk how to know from which user webhook request came
with clients I can attach email
Checkout collects an email address, you can also pre-fill it or attach an existing Customer too
so in your opinion what should I use for a simple subscription based saas
sorry for stupid questions, I checked docs pages and tutorials but I still don't know which approach to choose
Checkout is the best and easiest way
thanks
and should I pick prefilling email field instead of attachings clients
I mean how will I detect user in my webhook
there's no such thing as a "client" in our API. So I don't know what you mean unfortunately. Are you talking about a Customer object? If so and you have one you should attach it. You can also use metadata to control what is shared in the Event to do reconciliation
I'm sorry, there are dozens of ways to integrate our various products and it's hard to map that to what you're asking with only a few words
yep, I was talking about customers. Sorry for another dumb question but should I use customers, docs says that it is needed for recurring payments, but I see that I can do that with default checkouts as well
Checkout will create a Customer for you if needed
I think at this point you should try all of this in Test mode. It's going to be drastically easier for you to grasp if you start following the docs and seeing it in action
thank you a lot