This is a simple example project illustrating how to implement Stripe's OAuth flow to connect standalone accounts to a platform.
Deploy the project on your Heroku account:
When deploying, you'll be prompted for your secret API key (you can find it in the API keys tab of your account settings) and your platform's client_id (you can find in the Connect tab of your account settings).
Once the app is running on Heroku, head back to your Connect settings and set the redirect URI to your app's URL followed by /oauth/callback
. E.g. if the URL of the Heroku app is https://thawing-crag-63114.herokuapp.com
, set the redirect URI to be https://thawing-crag-63114.herokuapp.com/oauth/callback
.
- Java 1.8 or later
- Maven
Clone the repository:
git clone https://github.com/ob-stripe/example-stripe-java8-oauth.git
Compile the project:
mvn compile
Get your secret API key (you can find it in the API keys tab of your account settings) and your platform's client_id (you can find in the Connect tab of your account settings) and run the project:
STRIPE_TEST_SECRET_KEY=sk_test_... \
STRIPE_DEVELOPMENT_CLIENT_ID=ca_... \
mvn exec:java
Head back to your Connect settings and set the redirect URI to http://localhost:4567/oauth/callback
.
In your browser, go to http://localhost:4567.