Stripe
Liferay DXP 2024.Q2+/Portal 7.4 GA120+
Liferay provides a client extension that integrates with Stripe. It uses the payment integration client extension as a base. See Configuring Payment Methods to read more about the payment methods available out-of-the-box with Liferay.
Currently, the Stripe client extension is only compatible with Liferay SaaS.
Install and Deploy the Stripe Client Extension
-
Go to the Liferay Marketplace and search for
Liferay Commerce Connector to Stripe
. -
Click Get App, select your account or create one, and accept the end user license agreement and terms of service.
-
Click Continue.
-
Select a project from the ones available to you.
-
Click Get App.
-
Note the order ID. You must use it to install the app from your Cloud dashboard.
-
Click Go to Console.
-
Go to Services, and click New App.
-
Enter the order ID from before and complete the installation.
-
Log in as an administrator and verify that the OAuth Application User Agent was added to Liferay. Open the Global Menu () and go to Control Panel → OAuth2 Administration.
Verifying the Addition of Stripe as a Payment Method
-
Open the Global Menu () and go to Control Panel → Sites.
-
Add a new Minium site.
-
Now, open the Global Menu () and go to Commerce → Channels.
-
Select Minium Portal and scroll down to the Payment Methods section. Verify the addition of Stripe as a new payment method here. It is inactive by default.
-
Select the new payment integration and activate it using the Active toggle.
-
Click Save. Two new tabs, Eligibility and Configuration, appear for the payment integration.
The configuration tab contains an input field. You must enter an API key that you can obtain from your Stripe Dashboard.
You can go to the Eligibility tab to select specific order types or payment terms to be eligible for the payment integration. By default, it is eligible for all order types and payment terms.
-
Click Save.
-
Open the site and use the account selector to create a new account.
-
Add a few items to your cart.
-
Open the mini cart and click Submit. This starts the checkout flow.
-
Continue checking out until you reach the order summary page. Click Continue to redirect to Stripe. Enter the necessary details and click Pay. After confirming payment, you’re automatically redirected back to Liferay. Open the Global Menu () and go to Commerce → Payments to verify the payment’s completion.
The above flow uses Stripe’s test mode. Stripe provides numerous test card numbers to replicate different payment scenarios. See How to use test cards for more information.