#matrix - Checkout Multiple Products
1 messages · Page 1 of 1 (latest)
node
Can you show me the code you have so far that's not working?
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
Where is data.line_items set?
in another file, hold on
data.line_items: = [{
price: 'firstprice',
quantity: 1,
}, {
price: 'secondprice',
quantity: 2,
}, ],
is the syntax correct?
The syntax looks right, although it's formatted a bit strangely. What error are you getting when this runs?