https://github.com/ctrachte/sunfire-storefront
Store front webapp using Node/Express, Tailwind and Stripe API
https://github.com/ctrachte/sunfire-storefront
Last synced: 2 months ago
JSON representation
Store front webapp using Node/Express, Tailwind and Stripe API
- Host: GitHub
- URL: https://github.com/ctrachte/sunfire-storefront
- Owner: ctrachte
- License: mit
- Created: 2022-12-22T21:14:37.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-12-22T21:16:10.000Z (over 3 years ago)
- Last Synced: 2025-01-16T13:19:46.259Z (over 1 year ago)
- Language: CSS
- Size: 16.7 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Checkout page with subscriptions
Explore a full, working code sample of an integration with Stripe Checkout and Customer Portal. The client- and server-side code redirects to a prebuilt payment page hosted on Stripe. More at [https://stripe.com/docs/api/checkout/sessions](https://stripe.com/docs/api/checkout/sessions)
## Setup/Prerequisites
- [You will need a Stripe account](https://stripe.com/)
- In addition to running `npm install` you will need to create a `.env` in the root directory of this project, and add to it your test and secret keys.
- be sure they are named as they appear in `server.js` (TEST_KEY, SECRET_KEY)
## Running the sample
1. Build the server Prerequisite: You will need node.js and npm installed globally.
~~~
npm install
~~~
2. Add or update price items by editing create_price.js and running
~~~
node create_price.js
~~~
- Update checkout.html to include a new product and form element related with the `price_id` you just created.
3. Run the server
~~~
npm run start
~~~
1. Go to [http://localhost:4242](http://localhost:4242)