Overview
This plugin allows Elastic Path Commerce to connect to Stripe for payment capabilities. It follows the Stripe guidelines for set up future payments, which allows Elastic Path Commerce to store a tokenized form of the customer's payment details and charge that payment method multiple times during checkout.
Payment Flow
The Stripe payment flow works as follows:
- When the shopper is ready to enter their payment details, the front-end makes a call to the Cortex "Request Instructions" endpoint, which calls Stripe to create a customer and a Setup Intent. The Setup Intent creates a "Client Secret" that is used in the next step.
- The front-end then uses Stripe Payment Elements to render a UI component that accepts the payment details from the customer. The front-end passes the Client Secret to the Payment Elements component.
- When the shopper finishes entering their payment details, the front-end calls Confirm Setup, which creates a payment method ID.
- The front-end then makes a call to the Cortex "Create Payment Instrument" endpoint, which stores the customer ID and payment method ID for later use.
- When the shopper clicks the final checkout button, the front-end makes a call to the Cortex "Create Purchase" endpoint. This causes Cortex to call Stripe to create a Payment Intent with capture method set to manual so that the payment is reserved, but not charged.
- Depending on whether the purchase contains shippable or non-shippable products, Cortex may capture the payment intent immediately, or do so after the purchase ships.
Account options
To configure the Elastic Path Commerce Stripe plugin, you will need a Stripe secret key, and optionally a connected account ID. The procedure for determining these values will depend on which option you choose for setting up your Stripe account with Elastic Path Commerce.
Standard (Non-Connected) Account
This option doesn't require you to go through the connected account process with Elastic Path. You can simply setup a Stripe account and get started right away. Follow these steps:
- Login to your Stripe Dashboard.
- Make sure that you are either in test mode or production mode depending on whether you're configuring a production environment or a test environment. This can be changed with the toggle in the top-right corner of the dashboard.
- Browse to the Elastic Path Self Managed Commerce Stripe Plugin and install the app within the Stripe dashboard.
- Click on "View App Settings" and then click "View API Keys".
- Copy the "Publishable key" value. This is the value you will use when configuring Payment Elements on your front-end.
- Reveal and copy the "Secret key" value. This is the value you will use for the "Stripe secret API key" plugin setting in Commerce Manager. You will also need the "Publishable key" for configuring Payment Elements on your front-end.
Stripe Connected Account
This option means that your Stripe account will be connected to the Elastic Path Platform account. To find out more about this account option, contact your Elastic Path Customer Success manager at customersuccess@elasticpath.com
. Follow these steps:
- Login to your Stripe Dashboard.
- Make sure that you are either in test mode or production mode depending on whether you're configuring a production environment or a test environment. This can be changed with the toggle in the top-right corner of the dashboard.
- Click on the "Settings" link in the top-right corner, then click "Account Details", and find the account ID in the top-right corner (starting with
acct_
). This is the value you will use for the "Connected Stripe account ID" plugin setting in Commerce Manager. - Browse to the Elastic Path Self Managed Commerce Stripe Plugin and install the app within the Stripe dashboard.
- Click on "View App Settings" and then click "View API Keys".
- Copy the "Publishable key" value. This is the value you will use when configuring Payment Elements on your front-end.
- Reveal and copy the "Secret key" value. This is the value you will use for the "Stripe secret API key" plugin setting in Commerce Manager. You will also need the "Publishable key" for configuring Payment Elements on your front-end.
- Contact your Elastic Path Customer Success manager to get the Stripe onboarding link that will link your account to the Elastic Path platform account.
Stripe Unified Account
This option means that your Stripe account will be connected to the Elastic Path Platform account. To find out more about this account option, contact your Elastic Path Customer Success manager at customersuccess@elasticpath.com
. Follow these steps:
- Login to your Stripe Dashboard.
- Make sure that you are either in test mode or production mode depending on whether you're configuring a production environment or a test environment. This can be changed with the toggle in the top-right corner of the dashboard.
- Click on the "Settings" link in the top-right corner, then click "Account Details", and find the account ID in the top-right corner (starting with
acct_
). This is the value you will use for the "Connected Stripe account ID" plugin setting in Commerce Manager. - Contact your Elastic Path Customer Success manager and ask to link your account as a unified account. They will send you the following:
- A Stripe unified onboarding link. Following this link will connect your account to the Elastic Path Platform account.
- Your organization's secret key. This is the value you will use for the "Stripe secret API key" plugin setting in Commerce Manager.
- Your organization's publishable key. This is the value you will use configuring Payment Elements on your front-end.