Skip to content

TaylorBriggs/stripe-products-lambda

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

stripe-products-lambda

A Lambda function for fetching Stripe products as part of a Stripe Relay flow.

NOTE: this function is designed to only return active products.

Authentication

Set your Stripe secret key in the .env file. Copy the sample to get started:

$ cp .env.sample .env
$ sed -i '' "s/<YOUR_SECRET_KEY>/$SECRET_KEY/g" .env

Deployment and Usage

Use the script to create your zip archive:

$ npm run zip

Integrate with the AWS API Gateway to access the function via HTTP POST:

$ curl -H "Content-Type: application/json" $API_GATEWAY_URL

Response

Returns products.data from the response under the root key of products:

{
  "products": [
    ...products
  ]
}

About

A Lambda function for fetching Stripe products

Resources

License

Stars

Watchers

Forks

Packages

No packages published