Cosmic Function to charge a customer using Stripe.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.gitignore
README.md
function.json
index.js
package-lock.json
package.json
test-checkout.html

README.md

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!