https://github.com/cosmicjs/stripe-charge-function
Cosmic Function to charge a customer using Stripe.
https://github.com/cosmicjs/stripe-charge-function
javascript nodejs serverless
Last synced: about 1 year ago
JSON representation
Cosmic Function to charge a customer using Stripe.
- Host: GitHub
- URL: https://github.com/cosmicjs/stripe-charge-function
- Owner: cosmicjs
- Created: 2018-06-30T20:15:58.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2018-09-06T20:30:52.000Z (over 7 years ago)
- Last Synced: 2025-01-21T10:32:02.031Z (about 1 year ago)
- Topics: javascript, nodejs, serverless
- Language: HTML
- Homepage: https://cosmicjs.com/docs/functions
- Size: 16.6 KB
- Stars: 3
- Watchers: 4
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Stripe Charge Function

Cosmic Function that enables you to charge a customer using [Stripe](https://stripe.com).
### Deploying the Function
1. [Login to Cosmic JS](https://cosmicjs.com) and go to Your Bucket > Settings > Functions > Example Functions
2. Install the Stripe Charge Function
3. Add your STRIPE_SECRET_KEY environment variable
4. Deploy the function and get your endpoint
### Testing the Endpoint
1. Download code
```
git clone https://github.com/cosmicjs/stripe-charge-function
```
2. Edit `test-checkout.html` to include the deployed Function endpoint and your Stripe public test key.
3. Open `test-checkout.html` in the browser and attempt a [test charge](https://stripe.com/docs/testing).
### Maintainence
That's it! No managing or maintaining a server, just code and deploy!