https://github.com/kevinhellos/nextjs-buy-a-unicorn
Template for a checkout/ purchase of digital product (e.g. course) with Next JS and Stripe
https://github.com/kevinhellos/nextjs-buy-a-unicorn
nextjs stripe
Last synced: 2 months ago
JSON representation
Template for a checkout/ purchase of digital product (e.g. course) with Next JS and Stripe
- Host: GitHub
- URL: https://github.com/kevinhellos/nextjs-buy-a-unicorn
- Owner: kevinhellos
- License: mit
- Created: 2024-09-07T11:07:41.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2025-03-09T06:51:57.000Z (over 1 year ago)
- Last Synced: 2025-03-15T05:41:58.506Z (over 1 year ago)
- Topics: nextjs, stripe
- Language: TypeScript
- Homepage: https://nextjs-buy-a-unicorn.vercel.app
- Size: 1.39 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Next JS Stripe
Template for a checkout/ purchase of digital product (e.g. course) with Next JS and Stripe
## Setup
### Step 1 - Stripe API Key
- Go to https://dashboard.stripe.com/ to obtain your Stripe Secret Key.
- Paste Stripe Secret Key as a value to the environment variable ```STRIPE_SECRET_KEY``` in the ```.env```
### Step 2 - Configure productData.ts
- Change the product name, price, currency, labels, etc...
### Step 3 - Configure product.tsx
- Your paid contents/ videos goes in this page
- Note: this page is a server component, without a correct url, the product page will not get rendered and not discoverable as client side codes
## Payment API Flowchart
