#benjiperez

1 messages · Page 1 of 1 (latest)

terse marlinBOT
austere ginkgo
#

When you say "create two checkout sessions", what do you mean? What are you trying to achieve by creating multiple checkout sessions at once?

iron lynx
#

So I tried adding two products to one checkout session(do you mind if i DM u code or post it right here), but basically I added to product prices onto a singular checkout session, however it seems that what that does it just allow the user to buy the both products together. My goal is too have two products, in which customers can buy separately. How do I go about doing that?

austere ginkgo
#

Just post the code in the thread if it's relevant but hold off on that for now. Let's nail down specifically what you're wanting.

#

You can create Products separate from the Checkout Session, so why not create the Products first, then only create a Checkout Session once the customer is ready to check out?

iron lynx
#

That is what I've done. I created one product in test mode. When the user clicks a button it leads them to page which confirms if they actually wanna buy this product, that creates a checkout session with the product. This works for sure. However I don't know how I would be able to create a second session because I wanna add a second product. I tried adding the second product to the first checkout session I created along with the first product but all this does is bundle both products into one price , it won't allow the user to modify the order. I want the user to be able to buy each item separately.

austere ginkgo
#

I see. Do you have any session tracking to store cookies that contain the products the customer wants to buy? In other words, have you set up a cart that the customer can add products to?

iron lynx
#

No I haven't done that, I assumed I could just create two checkout sessions. Can you send me a stripe doc on how to do that in flask?

austere ginkgo
#

Unfortunately I don't have any Stripe-approved cart tutorials/docs and there isn't a Stripe cart product. I would recommend reading up on session tracking and cookies, then (if you're unsure on where to start) Google something like 'shopping cart tutorial for Python and Flask'

iron lynx
#

oh alright thanks