#yanne_docs
1 messages ¡ Page 1 of 1 (latest)
đ Welcome to your new thread!
â˛ď¸ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.
âąď¸ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.
đ This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1270511886059704362
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
Hi there, sorry for the delay
I don't know how you'd do this in Bubble so I recommend double checking with their support team. When integrating directly with Stripe, line_items is an array so you can pass multiple prices and quantities: https://docs.stripe.com/api/checkout/sessions/create#create_checkout_session-line_items
what about working with paymentintents?
could we hop on a quick call to figure it out? I don't think it's as complex as it seems, I'm just not sure where to look. @cerulean edge
No, I'm not able to work on this over a call
When working with PaymentIntents, there's no concept of line items or working with Prices. You simply pass an amount
does it still have the customer go through the payment portal like the checkout session does?
I essentially want to go through the checkout session process, while being able to pass an amount
No. If you're using Checkout, you wouldn't work with the underlying PaymentIntent at all; this is auto created for you. If you're integrating with PaymentIntents directly, there's no way to "pass" this PI to Checkout; you'd use the PaymentElement or CardElement instead
I see. So you won't pass amount with Checkout but if you're looking to create a "one-off" Price, you can use line_items.price_data: https://docs.stripe.com/api/checkout/sessions/create#create_checkout_session-line_items-price_data
This essentially creates a one-off Price object that is automatically archived/can't be reused after the Checkout Session is completed
but don't I have to create a new product everytime I use checkout, if I want a custom price amount?
When you use price_data, you can either pass an existing Product ID or use product_data to create a "one-off" Product that is also archived automatically: https://docs.stripe.com/api/checkout/sessions/create#create_checkout_session-line_items-price_data-product_data
so, if I create a price data...I don't have to attach a product ID?
Looks like we sent a message at the same time. See my message above yours
You either include a Product ID or use product_data
okay, so... If a customer is shopping on a marketplace of various items of various items, quantities, prices, etc. Whenever they build their cart on my platform, then go to checkout and initiate a checkout, it will launch the checkout session. In the backend, I will populate the checkout sessions line items with the price data, and that price data will include the dynamic data from the customers cart? I bassically just want to charge them their total amount and have that as the inline product, which contains the price amount for the price data. Am i correct on that?
That's correct at a high level. I wonder though if you need to use price_data at all here vs. creating Products and Prices beforehand that match the kind of things in your marketplace
I would create products in stripe but I'm not able to dynamically add them as a list (or at least I'm not sure how)
How are you creating Sessions now? Do you have a Session ID you can share?
I haven't created anything yet because I'm trying to understand it first. But that's why i wondered if you could call so i can screenshare what I'm working with and maybe you;d know better what I'm trying to do
because I just want the customer to be able to build whatever cart (which is a list of random items or just one item) they want, and for the final total (which is dynamic) to be sent to the checkout session to be charged. I will later be allowing customers to add a tip because it's also a courier/DoorDash-like service.
I'm using stripe shell to test this out
We do have an "over capture" feature that allows you to authorize a charge for a specific amount but with the option to capture a higher amount: https://docs.stripe.com/payments/overcapture
This is not available for Checkout. This means, to use this feature, you'd have to integrate directly with PaymentIntents and use the PaymentElement
well, if I capture payment for this session, couldn't I retrieve the session later and update the amount?
No