Stripe Checkout - Is it possible to have more than one image show up on the checkout page?

Viewed 2560

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.

1 Answers

I contacted customer support today (8/17/2020) and according to Stripe, "Stripe Checkout" only allows for one image at checkout and does not support a custom domain ... when the user is ready to buy, you'll need to redirect him/her to a Stripe URL to complete the payment.

TL;DR: Stripe Checkout supports one image at checkout and does not support a custom domain.

Related