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.
-
Connect your Heroku account to GitHub on your Heroku Account page.
-
Obtain your Stripe test secret API Key, available in the Dashboard.
-
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 |
Android | https://github.com/stripe/stripe-terminal-ios |
Note that this backend is intended for example purposes only. You'll likely want to use something more serious for your app 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