#Dave

1 messages · Page 1 of 1 (latest)

raw kestrelBOT
vivid spruce
#

Hi again!

#

Mostly yes, but you want to use a Price ID for the different sizes

#

So it would be 1 Product with 3 Prices (one Price for each size)

storm crescent
#

So those docs are talking about setting prices up inside Stripe itself, and then getting the price ID and price data from inside Stripe (eg: price_H5ggYwtDq4fbrJ) Is that right?

vivid spruce
#

Yep exactly

#

Or, if you wanted to, you could create the Price inline when you create the Checkout Session using price_data

storm crescent
#

If I create the product in the Stripe dashboard, and set up multiple pricing also in the Stripe dashboard - can I override the product image in line items still? In product_data?

          {
            price_data: {
              currency: 'gbp',
              product_data: {
                name: 'T-shirt',
                images: ['https://images.jpg'],
              },
              unit_amount: 2000,
            },
            quantity: 1,
          },
        ],```
vivid spruce
#

No don't believe so

#

You would only do one or the other - use line_items.price or line_items.price_data

storm crescent
#

Okay - so if I'm going down the line_items.price_data route, which allows me to add a custom image on the Stripe checkout page for each customer (line_items.price_data.product_data.images) - I also need to set the product up though the line_items.price_data API (line_items.price_data.product_data) and not set up a product through the Stripe dashboard.

Is that right?

vivid spruce
#

Nope that's up to you. You can either re-use a Product you already created, or create a new Product each time

#

Notice there is a line_items.price_data.product param and a line_items.price_data.product_data param

storm crescent
#

Thanks a lot - that's really helped clear it all up in my head.

vivid spruce
#

Happy to hear it!

storm crescent
#

Are there any blog posts about doing the above, or just the API docs?

vivid spruce
#

By blog posts do you mean like an integration guide?

storm crescent
#

Yeh I guess. Anything which has a runthrough of what we've been talking about.

vivid spruce
storm crescent
#

Okay perfect - thanks again bismark

vivid spruce
#

Sure thing!