This is a no fuss Google Cloud Function that aims to create a wrapper around the Stripe Node.js SDK allowing for a serverless Stripe deployment.
Clone the repository
git clone [email protected]:astr0sl0th/stripe-gcf.git && cd stripe-gfc
Install gcf-stripe
dependencies
yarn
Create a .env
file and set your stripe secret test key
# Your super secret 🔑
STRIPE_SECRET_KEY=sk_test_123456
SUBSCRIPTION_PRICE=price_123456
This will start a local server http://localhost:8080
# 👀 for changes and start server
yarn watch
To deploy gcf-stripe
run
# Build the function
yarn build 🔧
# Deploy to google cloud 🚀
gcloud functions deploy stripe \
--set-env-vars STRIPE_SECRET_KEY=sk_live_123456 SUBSCRIPTION_PRICE=price123456 \
--entry-point ./dist/index.js \
--runtime nodejs14 \
--trigger-http
- Add API documentation
- Support more stripe functions