#camer

1 messages · Page 1 of 1 (latest)

gentle timberBOT
severe bridge
#

Where are you trying to show this? Can you share a bit of context?

weak pulsar
#

in the checkout page

#

I have it working so that it shows one item but I have to hard code which item it shows

severe bridge
#

This is your own custom checkout flow?

weak pulsar
#

its the quickstart guide checkout

#

so my attempt was to use my react context that holds the cart array and pull directly from that but it was giving me errors

severe bridge
#

This is mostly up to you. You might manage products in a client side cart then eg send the "items" to your /create-checkout-session endpoint and iterate those to use the correct prices

#

the example doesn't include any dynamic cart behaviour though

weak pulsar
#

i found some tutorial on something like that but it was weird because they used a function to call the backend which the example on stripe didn't do. i wanted to stick with the example on stripe because thats what the docs is going to help with

#

so is there a place in the docs that would talk about a dynamic cart?

#

I have looked but I can't seem to find it.

#

more specifically when you say send them to my /create-checkout-session, that is where I am having trouble

severe bridge
#

Kind of like this example, but you might have both itemId and quantity in the body

#

or an array with many item ids and quantities

weak pulsar
#

sweet

#

thanks for putting me on another path! ill let you know how it goes