Skip to content

Latest commit

 

History

History
18 lines (15 loc) · 1.06 KB

File metadata and controls

18 lines (15 loc) · 1.06 KB

Sample project for Stripe Connect

Core Technologies

  • Java, Install using Homebrew: brew install openjdk
  • Apache Maven, Install using Homebrew: brew install maven
  • Spring Boot, Install via Maven dependencies in pom
  • Stripe Java SDK, Install via Maven dependencies in pom

Setup

  1. Create a Stripe account
  2. Create a Stripe sandbox in the account
  3. In the sandbox create and copy the secret Stripe API key (starting with "sk_")
  4. In the sandbox create a (Connected) Account and note its id (starting with "acct_")
  5. Set the Stripe API key as the environment variable STRIPE_SECRET_KEY
    export STRIPE_SECRET_KEY=<sk_...>
    or add it to the runtime in the IDE or Maven with a -D-flag
  6. Set the id of the (Connected) Account for testing with the environment variable TEST_ACCT_KEY
    export TEST_ACCT_KEY=<acct_...>
    or add it to the runtime in the IDE or Maven with a -D-flag
  7. Run unit tests with
    mvn test -DSTRIPE_SECRET_KEY=<sk_...> -DTEST_ACCT_KEY=<acct_...>
  8. Start service with
    mvn spring-boot:run