#prycellek-react-checkou
1 messages ยท Page 1 of 1 (latest)
Don't use any of this, it's been deprecated for a long time
Either create a Checkout Session server-side: https://stripe.com/docs/api/checkout/sessions/create
Or use PaymentLinks https://stripe.com/docs/payments/payment-links
awesome!
@swift imp I just reviewed this options and them will not suit for my project. Can i just confirm if there is any other option like express checkout where you can pass dynamic data instead of defining this objects first and reference by id?
I mean this is literally option 1!
if you want dynamic pricing, you create a Checkout Session with the relevant line item(s)
Sorry if I'm not understanding properly but in .net example I have to specify Price item id LineItems = new List<SessionLineItemOptions>
{
new SessionLineItemOptions
{
Price = "price_H5ggYwtDq4fbrJ",
Quantity = 2,
},
},
is it posssible to do like price: 100, currency: "usd" instead of predefining it first and reference to price?
kind of
easiest is to just create the PRice before, it's just code, https://stripe.com/docs/api/prices/create
but you can use price_data: https://stripe.com/docs/api/checkout/sessions/create#create_checkout_session-line_items-price_data-unit_amount
thank you ๐
Does that solve your issue?
yes, I will be able to process further with that! Thank you for great support!