Skip to main content
Create an online store to sell products with shopping cart and checkout.

What We’re Building

An e-commerce store with:
  • Product catalog with categories
  • Product detail pages
  • Shopping cart
  • Checkout with Stripe
  • Order confirmation

Prerequisites

  • Kleap account
  • Stripe account (for checkout)
Product data can be hardcoded in your site or stored in Kleap Database — a managed database built into Kleap (no separate account to connect).

Step 1: Store Your Products

Your catalog can live in one of two places:
  • Static data — hardcode the product list in your site. Simplest, great for a small catalog that rarely changes.
  • Kleap Database — a managed database built into Kleap (no separate account). Best when you want to add or edit products without redeploying.

Option: Kleap Database

Orders and payments are handled by Stripe’s hosted checkout (Step 5), so you don’t need orders tables in your site — Stripe records every order for you.

Add Sample Products

Step 2: Product Catalog

Homepage

Products Page

Product Card

Step 3: Product Detail Page

Step 4: Shopping Cart

Cart State

Cart Sidebar

Cart Icon

Step 5: Checkout with Stripe

Your store is a static Astro site, so checkout runs on Stripe’s hosted pages. You only ever use your Stripe publishable key — no secret key (sk_...) and no server code live in your site.

Set Up Stripe

  1. In your Stripe Dashboard, create a Payment Link or Buy Button for each product (or a Pricing Table for a set of products).
  2. Copy each product’s link or Buy Button embed snippet.

Add Checkout

Stripe Payment Links and Buy Buttons each sell one product (or a fixed bundle). A fully dynamic cart that totals arbitrary items into a single Stripe Checkout Session needs a backend beyond a static site — for that, use a Payment Link per product, a Stripe Pricing Table, or add a small server/serverless function as an advanced step.

Order Confirmation

Stripe emails the receipt and records the order in your Stripe Dashboard.

Step 6: Orders (Optional)

Every order and payment lives in your Stripe Dashboard — view orders, payment status, and customer details there without adding anything to your site. An in-app orders page or admin panel (past orders, status updates, sales stats) needs to read payment data from a backend, which is beyond a static site. Use the Stripe Dashboard for order management, or add a small server/serverless layer as an advanced step.

Step 7: Polish

Loading States

Error Handling

Mobile Optimization

Step 8: Launch

Pre-Launch Checklist

  • All products display correctly
  • Add to cart works
  • Cart updates correctly
  • Buy buttons open Stripe checkout
  • Payment processes successfully
  • Order confirmation shows
  • Mobile works well

Deploy

  1. Click Publish
  2. Test checkout in Stripe test mode
  3. Switch your Payment Links / Buy Buttons to live mode
  4. Connect a custom domain

Enhancements

After launching, consider adding:
  • User accounts - Save shipping info, order history
  • Reviews - Product ratings and reviews
  • Wishlists - Save products for later
  • Search - Search products by name
  • Inventory tracking - Update stock on purchase
  • Email notifications - Order confirmation emails
  • Discount codes - Coupon system

Complete Prompt Flow

  1. Database setup
  2. Homepage with featured products
  3. Products listing page
  4. Product detail page
  5. Shopping cart functionality
  6. Stripe checkout (Payment Links / Buy Buttons)
  7. Order confirmation
  8. Polish and mobile optimization

Stripe Integration

Complete Stripe setup guide