This is a simple Sinatra webapp that you can use to run the Stripe Terminal example apps. To get started:
-
Set up a free Heroku account.
-
Obtain your Stripe secret, test mode API Key, available in the Dashboard. Note that you must use your secret key, not your publishable key, to set up the backend. For more information on the differences between secret and publishable keys, see API Keys. For more information on test mode, see Test and live modes.
-
Click the button below to deploy the example backend. You'll be prompted to enter a name for the Heroku application as well as your Stripe API key.
Next, navigate to one of our example apps. Follow the instructions in the README to set up and run the app. You'll provide the URL of the example backend you just deployed.
SDK | Example App |
---|---|
iOS | https://github.com/stripe/stripe-terminal-ios |
JavaScript | https://github.com/stripe/stripe-terminal-js-demo |
Android | https://github.com/stripe/stripe-terminal-android |
Note that this backend is intended for example purposes only. Because endpoints are not authenticated, you should not use this backend in production.
If you prefer running the backend locally:
- Create a file named
.env
and add the following line
STRIPE_TEST_SECRET_KEY={YOUR_API_KEY}
-
Run
bundle install
-
Run
ruby web.rb
-
The example backend should now be running at
http://localhost:4567