#matrix - Checkout Multiple Products

1 messages · Page 1 of 1 (latest)

trail shell
#

Hello! What language are you using?

weak herald
#

node

trail shell
#

Can you show me the code you have so far that's not working?

weak herald
#

this is what i have

#

'const session = await stripe.checkout.sessions.create({
line_items: data.line_items,
payment_method_types: ['card', ],
mode: data.mode,
success_url: data.successUrl,
cancel_url: data.cancelUrl,
}, {
stripeAccount: data.myStripeVendorAccount,
});'

#

i think the problem is with data.line_items

trail shell
#

Where is data.line_items set?

weak herald
#

in another file, hold on

#

data.line_items: = [{
price: 'firstprice',
quantity: 1,
}, {
price: 'secondprice',
quantity: 2,
}, ],

#

is the syntax correct?

trail shell
#

The syntax looks right, although it's formatted a bit strangely. What error are you getting when this runs?

weak herald
#

i cant see the error, checking in firebase

#

maybe the error is with the mode, now re runinng. hold on