Company
Date Published
Author
Jason Lengstorf, Thor 雷神
Word count
3263
Language
English
Hacker News points
None

Summary

Is it possible to sell products on the Jamstack? Absolutely! We can use Stripe Checkout and Netlify Functions to process payments and securely create Checkout sessions. To get started, we need to set up a new site for local development with Netlify, then create a serverless function that returns product data. We'll use JavaScript to load JSON data into an HTML page, and add styles to make the products look presentable. Next, we'll connect to Stripe and set up automatic deployments using the Netlify CLI. We'll also handle the product purchasing flow with Stripe Checkout, creating a success page to display after purchase. Finally, we'll test the checkout workflow and push the site to production.