Skip to content

cosmicjs/stripe-charge-function

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Stripe Charge Function

Cosmic Function that enables you to charge a customer using Stripe.

Deploying the Function

  1. Login to Cosmic JS 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
  1. Edit test-checkout.html to include the deployed Function endpoint and your Stripe public test key.
  2. Open test-checkout.html in the browser and attempt a test charge.

Maintainence

That's it! No managing or maintaining a server, just code and deploy!

Releases

No releases published

Packages

No packages published