In the below line_items.items.price_data.product_data.images array, I input two images, however only one shows. Is there a way to see two images on the checkout page?
app.post('/create-checkout-session', async (req, res) => {
const domainURL = process.env.DOMAIN;
const { quantity, locale } = req.body;
const session = await stripe.checkout.sessions.create({
payment_method_types: process.env.PAYMENT_METHODS.split(', '),
mode: 'payment',
locale: locale,
line_items: [
{
// price: process.env.PRICE,
price_data: {
currency: 'usd',
unit_amount: 1000,
product_data: {
name: 'Product name ...',
images: [
'https://picsum.photos/280/320?random=4',
'https://picsum.photos/280/320?random=2',
],
},
},
quantity: quantity,
description: 'My description ...',
},
],
success_url: `${domainURL}/success.html?session_id={CHECKOUT_SESSION_ID}`,
cancel_url: `${domainURL}/canceled.html`,
});
res.send({
sessionId: session.id,
});
});
The documentation (https://stripe.com/docs/api/checkout/sessions/create#create_checkout_session-line_items-price_data-product_data-images) suggests that I can:
line_items.price_data.product_data.images optional A list of up to 8 URLs of images for this product, meant to be displayable to the customer.
... but it doesn't work when I add two; only the first in the array shows.