#matty-checkout-prefilltax
1 messages · Page 1 of 1 (latest)
matty-checkout-prefilltax
Hi there
Hello!
Are you asking about whether it is possible to create line items dynamically when you create the Checkout Session?
Overall, yes, you use Products/Prices with Stripe Checkout and those include things like name/qty/price etc
Which will all display after you redirect to Checkout
I am wondering if there is a way just to pass the info for the items without having to create the items in Stripe. We have over 25000 products and we change pricing quite often. We also have 1000's of coupons and rewards discounts, so it doesn't make sense to keep updating those items in your system. With PayPal we can just pass the cart and it's displayed back to the user vs. having to create products in their system.
I hate to compare Stripe to PayPal for ANYTHING, but in this case they did something that makes sense. 🙂
lol I understand
What you want to do in this case is create your Products/Prices dynamically inline when you create the Session via line_items.price_data and line_items.product_data: https://stripe.com/docs/api/checkout/sessions/create#create_checkout_session-line_items
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
This looks promising. Are one-time prices not stored in Stripe then? We could just keep posting the same price each time for a same product without having to look it up?
They are stored but immediately archived if you create them in-line. There is no limit so yes you could just keep passing them inline
OK. Another question. We have customers that reserve a product for a $5 or $10 fee. We later use that card to charge them for the product when it is shipped. Can I set the card in the Stripe checkout to allow a future charge like I can in Elements?
Hey, thank you sooo much. I can't begin to tell you how much of a dream it is to work with you all. If only the rest of the world. Have a great day!
❤️