Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/simalexan/api-lambda-stripe-charge
AWS Serverless Application Repository Stripe Charge Serverless Component
https://github.com/simalexan/api-lambda-stripe-charge
api-gateway lambda serverless stripe
Last synced: 22 days ago
JSON representation
AWS Serverless Application Repository Stripe Charge Serverless Component
- Host: GitHub
- URL: https://github.com/simalexan/api-lambda-stripe-charge
- Owner: simalexan
- Created: 2018-05-29T15:27:53.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2024-07-21T01:59:43.000Z (7 months ago)
- Last Synced: 2025-01-14T01:07:22.455Z (29 days ago)
- Topics: api-gateway, lambda, serverless, stripe
- Language: JavaScript
- Homepage:
- Size: 1.16 MB
- Stars: 89
- Watchers: 6
- Forks: 25
- Open Issues: 16
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# API Gateway -> Lambda -> Stripe Charge Payment (Checkout)
## Description
This is a serverless component consisting of an API and Lambda functions that charge / capture / refund a Stripe account based on the API Gateway request data. Supports CORS. Written in Node.js.
## Requirements (Setup)
1. Create a Stripe account
2. Get your Stripe API Keys (both public and secret)
3. Store your Stripe Secret Key into AWS SSM as a SecureString by running the following, but be sure to replace the `lambda-stripe-charge/stripe-secret-key` with your preferred SSM Parameter Path (though it can be just `lambda-stripe-charge/stripe-secret-key`):```ssh
aws ssm put-parameter --name /lambda-stripe-charge/stripe-secret-key --value YOUR_STRIPE_SECURE_KEY --type SecureString --overwrite
```4. Want to use Stripe's Checkout ? - [https://stripe.com/docs/checkout](https://stripe.com/docs/checkout)
(most likely others are supported too, but can't guarantee, need to check)
5. Set your frontend part as specified in the [https://stripe.com/docs/checkout#integration](https://stripe.com/docs/checkout#integration)
6. Extend your form with hidden input HTML elements for **amount** and **currency**. Those fields you will need to populate with the values chosen by the user. If not familiar with that approach I recommend this StackOverflow post - [https://stackoverflow.com/questions/37798593/stripe-checkout-how-to-pass-a-value-through-to-webhook](https://stackoverflow.com/questions/37798593/stripe-checkout-how-to-pass-a-value-through-to-webhook)Will provide a video link on YouTube soon, as I will stream using this AWS App Repo template.
### Latest Release - 4.4.1
Changing to Node.js 10.x Runtime For Lambda
#### Previous Release 4.4.0
- Added Active X-Ray Tracing