Documentation Home

Stripe Payment Intents Environment Setup

Prerequisites

Once you have registered an account with Stripe, add the Stripe Module dependency to your root pom.xml.

<dependency>
    <groupId>com.broadleafcommerce</groupId>
    <artifactId>broadleaf-stripe</artifactId>
    <version>1.0.1-GA</version>
    <type>jar</type>
    <scope>compile</scope>
</dependency>

Make sure to include the dependency in your core pom.xml as well:

<dependency>
    <groupId>com.broadleafcommerce</groupId>
    <artifactId>broadleaf-stripe</artifactId>
</dependency>

Next, you will need to add properties to your application.

Broadleaf allows you to specify properties based on the application's environment, or you can also store these in the Database by utilizing the blSystemPropertiesService

Set up your Stripe Account

  1. Log in to your Stripe account
  2. Set an account name in the top left of the Stripe dashboard or at https://dashboard.stripe.com/account
  3. Find your API keys by navigating to https://dashboard.stripe.com/account/apikeys
  4. Add these API keys to the desired environment's .properties file, as well as the other properties below:

#####################################

Stripe API

#####################################

gateway.stripe.publicKey={Your Publishable key}
gateway.stripe.privateKey={Your Secret key}
gateway.stripe.auth_and_capture={true || false}
gateway.stripe.use_payment_intents=true
gateway.stripe.level_3_data_enabled={true || false}
gateway.stripe.payment_elements_enabled={true || false}
gateway.stripe.payment_intent_return_url=https://test.localhost:8443/checkout/stripe/confirm_payment_intent

If you have modified your application's domain name or port, modify the success and cancel url's of the properties to match.

auth_and_capture by default is set to false if not included in the properties file. If false, transactions will only authorize.