Setting Up Stripe
May 17, 2020
In this section we will get a stripe account setup. Head over to Stripe and sign up for an account, once you're all setup, you will land on the dashboard. We need to get the API Keys, so click on the "Developers" link on the left hand side:
Then click on API Keys:
Then copy the Secret key:
Next up create a .env
file in the root of your project and the secret key :
STRIPE_SECRET_KEY = sk_test_stuff
Then in your serverless.yml
file add the key in the environment part in the provider block:
provider:
name: aws
runtime: nodejs10.x
stage: dev
region: us-east-1
profile: personalAccount
environment:
stripeSecretKey: ${env:STRIPE_SECRET_KEY}
This should be enough for us to complete the function now.