Skip to content

Latest commit

 

History

History
39 lines (25 loc) · 954 Bytes

README.md

File metadata and controls

39 lines (25 loc) · 954 Bytes

Stripe subscription with SvelteKit

This is a demo showing how to intergrate subscriptions with SvelteKit and Stripe. You can find a full write up here, while below you'll find the how to get the demo up and running.

Demo

Running

To run this application you'll need to first clone the repo:

git clone https://github.com/kilroyjones/sveltekit-stripe-demo

Then cd into the folder and install the libraries:

cd sveltekit-stripe-demo
npm i

Next, change the template.env to .env and add your public and private Stripe test keys:

PUBLIC_STRIPE=
PRIVATE_STRIPE=
PUBLIC_DOMAIN=http://localhost:5173

You can leave the domain unless you plan on running elsewhere.

After that you should be good to go:

npm run dev

Navigate to http://localhost:5173 and you should be presented with a subscribe button.