use-shopping-cart logouse-shopping-cart
Serverless

formatLineItems()

formatLineItems(cartDetails) Is a function that helps with creating Session IDs server side for products that have been created on the Stripe dashboard. It's preferred to use this with the Price API.

It's important that your product data has a price_id key that provides the given Price ID you get from Stripe's dashboard.

Shopping Cart

Your cart is empty

Try the interactive demos on the docs pages!