#Yharoo

1 messages · Page 1 of 1 (latest)

sleek jayBOT
celest trellis
#

What do you mean? The sample code you shared is to create a Checkout Session

mellow tulip
#

oh

#

uhhh

#

I want to display the items before createing a checkout session like pictured above

#

Not sure how to go about it just by looking at the example code

#
                    {
                        // Provide the exact Price ID (for example, pr_1234) of the product you want to sell
                        price_data: {
                            tax_behavior: 'exclusive',
                            currency: 'usd',
                            //price of item
                            unit_amount: 15000,
                            product_data: {
                                name: 'Gaming chair',
                                description: 'For gamers',
                            },
                        },
                        quantity: 1,
                        tax_rates: [taxRate.id],
                    }```
#

This is in my checkout_sessions.js

#
      <section>

//Am I missing something here?

        <button type="submit" role="link">
          Checkout
        </button>
      </section>
<form>```
celest trellis
#

I see! The display item have nothing to do with Checkout Sessions in the sample code. It's manually display at frontend in checkout.html:

<div class="product">
  <img src="https://i.imgur.com/EHyR2nP.png" alt="The cover of Stubborn Attachments" />
  <div class="description">
    <h3>Stubborn Attachments</h3>
    <h5>$20.00</h5>
  </div>
</div>
mellow tulip
#

Ahh I see. Thank you!