#yanne_docs

1 messages ¡ Page 1 of 1 (latest)

echo burrowBOT
#

👋 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.

cerulean edge
#

Hi there, sorry for the delay

sturdy reef
#

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

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

sturdy reef
#

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

cerulean edge
#

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

#

This essentially creates a one-off Price object that is automatically archived/can't be reused after the Checkout Session is completed

sturdy reef
#

but don't I have to create a new product everytime I use checkout, if I want a custom price amount?

cerulean edge
sturdy reef
#

so, if I create a price data...I don't have to attach a product ID?

cerulean edge
#

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

sturdy reef
#

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?

cerulean edge
#

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

sturdy reef
#

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)

cerulean edge
#

How are you creating Sessions now? Do you have a Session ID you can share?

sturdy reef
#

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.

cerulean edge
#

I see, okay

#

That's good context

sturdy reef
#

I'm using stripe shell to test this out

cerulean edge
#

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

sturdy reef
#

well, if I capture payment for this session, couldn't I retrieve the session later and update the amount?

cerulean edge
#

No