---
title: "Learn How to Accept Money on Jamstack Sites in 38 Minutes"
description: "Learn how to accept money on Jamstack sites in this tutorial (with videos)! Use Stripe Checkout &#38; Netlify Functions to add e-commerce in minutes."
source: "https://www.netlify.com/blog/2020/04/13/learn-how-to-accept-money-on-jamstack-sites-in-38-minutes/"
last_updated: "2026-07-14T19:44:00.000Z"
---
Is it possible to sell products on the Jamstack? Absolutely!

Jason and Thor pair programmed on an episode of _Learn With Jason_ where we learned how to [add Stripe Checkout to a Jamstack site using Netlify Functions](https://www.learnwithjason.dev/sell-products-on-the-jamstack).

This post is a cleaned up version of the code we wrote live [on the show](https://www.learnwithjason.dev/sell-products-on-the-jamstack).

## tl;dr

You can sell products on Jamstack sites using Stripe Checkout to process payments and Netlify Functions to securely create Checkout sessions.

-   [Demo](https://checkout-netlify-serverless.netlify.com)
-   [Source code on GitHub](https://github.com/stripe-samples/checkout-netlify-serverless)
-   [Watch this as a 38-minute video collection on egghead](https://jason.af/egghead/stripe-products)

## Set up a new site for local development with Netlify

[Set up a new site for local development with Netlify Dev](https://egghead.io/lessons/netlify-set-up-a-new-site-for-local-development-with-netlify-dev)

Our first step is to create a new site that will display our products. The Stripe and serverless setup we’re going to build will work with any Jamstack-friendly development approach, including your favorite static site generator. For this example, we’ll be using plain HTML, CSS, and JavaScript with no build tools or frameworks.

### Create a new directory and build out the basic structure

Start by creating a directory and initializing it as a Git repository:

```
# create a new directory and move into itmkdir stripe-checkout-netlify-serverlesscd stripe-checkout-netlify-serverless/
# initialize Git and a package.jsongit initnpm init -y
# create a `.gitignore` with `node_modules` and `.netlify` in itecho "node_modules" >> .gitignoreecho ".netlify" >> .gitignore
# create a directory where the public assets are storedmkdir public
```

### Create a home page and add styles

Now that we’ve got the foundations of the project in place, we can build our home page as plain HTML and add some styles to make it look nice.

Create `public/index.html` and place the following code inside:

```
<!DOCTYPE html><html lang="en">  <head>    <meta charset="UTF-8" />    <meta name="viewport" content="width=device-width, initial-scale=1.0" />    <title>Stripe Checkout + Netlify Functions!</title>  </head>  <body>    <header>      <a href="/" rel="home">Serverless Workflow for Stripe Checkout</a>    </header>
    <main>      <h1>Buy Our Products!</h1>    </main>  </body></html>
```