Stripe for Phoca Cart

1. Getting Started

This plugin provides integration of Stripe the processing and payment service to Phoca Cart - e-commerce extension for Joomla. Using Stripe your business can accept all major debit and credit cards from customers in every country in 135+ currencies.

We offer 2 payment plugins for Phoca Cart:

System Requirements:

  • for Joomla 3: Joomla 3.9+ and Phoca Cart 3.5+
  • for Joomla 4: Joomla 4.1+ and Phoca Cart 4.0+
  • Valid SSL certificate

SSL certificate is a must-have to ensure card details of your customers are safe.

2. Stripe Dashboard settings

Sign in to Stripe dashboard and proceed to Developers > API keys.

Get API keys in Stripe dashboard
Get API keys in Stripe dashboard

You need API keys for live and test environment. These keys should be added to Phoca cart payment method settings.

2.1. Webhooks

Now it is time to set up Webhooks. Proceed to Stripe Dashboard > Developers > Webhooks, then click on Add Endpoint button.

Add Endpoint in Stripe dashboard
Add Endpoint in Stripe dashboard
  • Endpoint URL: the URL can be taken from Phoca Cart payment method settings. Read more.
Add Endpoint URL and select events
Add Endpoint URL and select events

Then please select the following events if you use Stripe plugin:

payment_intent.canceled
payment_intent.payment_failed
payment_intent.succeeded
charge.refunded

Then please select the following events if you use Stripe Checkout plugin:

checkout.session.completed
checkout.session.async_payment_succeded
checkout.session.async_payment_failed
charge.refunded

  • Note: Stripe and Stripe Checkout uses different events. Please be careful and make sure which plugin is in use before events will be added!

2.2. Screenshots for Stripe events:

Select events to send
Select events to send


Select events to send
Select events to send


Stripe - the final result
The final result

The Webhook has been created. Now click on it and you will get its settings:

Get Webhook Secret in Stripe dashboard
Get Webhook Secret in Stripe dashboard

Find Click to reveal button and copy the Webhook Secret for further usage in Phoca Cart payment method.

2.3. Screenshots for Stripe Checkout events:

Select events to send
Select events to send


Select events to send
Select events to send


Stripe - the final result
The final result

The Webhook has been created. Now click on it and you will get its settings:

Get Webhook Secret in Stripe dashboard
Get Webhook Secret in Stripe dashboard

Find Click to reveal button and copy the Webhook Secret for further usage in Phoca Cart payment method.

3. Plugin installation

Stripe for Phoca Cart can be installed as a typical Joomla extension. Make sure you have downloaded the latest version of the plugin. Proceed to Administrator panel > Extensions > Manage > Install and select the package downloaded from NorrNext site.Then go to plugins and enable Stripe for Phoca Cart plugin.

4. Adding new payment method in Phoca Cart

There are several tabs with settings. Let's look on each tab.

4.1. General Options tab

Stripe General Options
Stripe General Options
  • Title - Payment method title
  • Cost - Set Shipping cost. E.g. 2€ for packing
  • Tax Rate - select tax rate (to be created at Taxes section)
  • Calculation Type - set calculation type (Percentage or Fixed)
  • Default - set this payment method as default (Yes / No)
  • Payment Method - Select Stripe for Phoca Cart or Stripe Checkout for Phoca Cart value
  • Image - set up image for this payment method (2CO logo)
  • Ordering - set item ordering
  • Access - The access level group that is allowed to view this item
  • Customer Group - set Customer Groups this payment type is available to

The following tabs are standard to each payment method:


4.2. Amount Rule tab

  • Lowest Amount - Set lowest amount
  • Highest Amount - Set highest amount
  • Amount Rule Active - Yes / No

4.3. Country rule tab

  • Countries - here you can select multiple countries for which this payment method will work
  • Country Rule Active - set Yes if country rule will be active. If you don't want to limit this payment method by countires, set it to No

4.4. Regions rule tab

  • Regions - set region or regions
  • Region Rule Active - Set if region rule will be active

4.5. Shipping rule tab

  • Shipping - Set shipping method(s)
  • Shipping Rule Active - Set if shipping rule will be active

The following tab is related to the selected Stripe method, so you must fill it correctly.

4.6. Payment Method Options tab

Stripe Payment Method Options
Stripe Payment Method Options
  • Sandbox Mode - If Sandbox Mode is enabled, no real money are transfered. Sandbox is used to test the payments.

Order Statuses

  • Payment Completed - Select the order status that will be applied based on successfull payment transaction result. By default it is Completed
  • Payment Failed - Select the order status that will be applied based on failed payment or error during transaction processing. By default it is Cancelled.
  • Payment Cancelled - Select the order status that will be applied based on cancelled payment or error during transaction processing. By default it is Cancelled.
  • Payment Unpaid - Select the order status that will be applied based on unpaid payment or error during transaction processing. By default it is Confirmed.
  • Payment Refunded - Select the order status that will be applied based on refunded payment or error during transaction processing. By default it is Refunded.
  • Payment Partially Refunded - Select the order status that will be applied based on partially refunded payment or error during transaction processing. By default it is Refunded. Please select Partially Refunded
    Payment Partially Refunded: Please select Partially Refunded.
  • Payment Methods - Card is selected by default. If you need additional payment methods, just add what you need here. Please make sure you've enabled such method(s) in Stripe dashboard. Read more here.
Note: Payment Method param is avaiable in Stripe Checkout plugin only.

API Keys

Stripe Payment Method Options - API Keys
API Keys and Webhook settings
  • Publishable Key - Set your Publishable Key. You can find it in Stripe Dashboard > Developers > API keys.
  • Secret Key - Set your Secret Key. You can find it in Stripe Dashboard > Developers > API keys.
  • Webhook Secret - Set your Webhook Signing Secret. You can find it in Stripe Dashboard > Developers > Webhooks.
  • Webhook URL - a URL to paste in Stripe dashboard.

Stripe plugin Example:

https://mysite.com/index.php?option=com_phocacart&view=response&task=response.paymentwebhook&type=stripe&tmpl=component&pid=5

Stripe Checkout plugin Example:

https://mysite.com/index.php?option=com_phocacart&view=response&task=response.paymentwebhook&type=stripeco&tmpl=component&pid=6

Where is mysite.com - set up your domain and make sure you have a valid SSL certificate. You need to copy this URL and paste it in Stripe dashboard > Webhooks.

Note: API keys are required fields to save the configuration. Fill them if even you are going to use sandbox mode.

API Test Keys

  • Publishable Key - Set your test Publishable Key. You can find it in Stripe Dashboard.
  • Secret Key - Set your test Secret Key. You can find it in Stripe Dashboard.
  • Webhook Secret - Set your Webhook Signing Secret. You can find it in Stripe Dashboard > Developers > Webhooks.

4.7. Publishing Options tab

  • Published - set the status of the payment method: published or unpublished

5. Configuring the plugin

5.1. Download Key tab

The plugin has the only option:

Download key tab
Download key tab

This feature allow to get an update of the plugin via back-end in few clicks. Set your download key to enable the update using Joomla! Update System. You can find the key in your Stripe for Phoca Cart subscription on the NorrNext website.

If you set the key for the first time or have changed it, please click on the Update Key button to save it for Joomla! Update System.

Read official tutorial: How to enable one-click update for NorrNext commercial extensions

Make sure the plugin is enabled!

6. F.A.Q.

6.1. Does your plugin support 3D Secure?

Yes, 3D Secure is implemented automatically if it is provided by the bank which has issued the debit/credit card.

6.2. The payment is successful in Phoca Cart, but it has pending status in Stripe dashboard.

You missed Webhooks settings. Please, get Webhook URL and add it to Stripe settings.

6.3. How can I test payments?

Enable Sandbox mode, add test API keys and use Test card numbers and tokens or Testing 3D Secure payments.

6.4. Stripe accept extra payments methods as iDEAL, Klarna, Sofortüberweisung, Apple Pay and other. How I can add them?

We provide two versions of Stripe plugin. Stripe plugin accepting payments via cards only. Stripe Checkout plugin accepting cards as well as allowing to include additional payment methods. You need Stripe Checkout plugin to enable and use additional methods!

The list of supported methods: (to be updated)

You can activate required payment methods from Stripe Dashboard. Go to Dashboard > Settings > Payment methods.

Enable additional payment methods in Stripe
Enable additional payment methods in Stripe.

Then enable and configure the required method(s). Do not forget to add the same methods in Phoca Cart Payment Method options.

6.5. I get error: 0 - Invalid API Key provided

This error means that one of the keys used in your plugin settings is invalid. Make sure that Publishable Key and Secret Key are valid.

6.6. There is no 3D Secure function to appear when a user makes payment.

3D Secure is a security layer supported by default, there is no longer a option allowing to enable/disable this important part of the payment making it secure (this option was in the earlier versions, but now it is obsolete). The appearance of 3D Secure depends on the bank-issuer of the card. If the bank supports 3D Secure layer, then the user will confirm the payment.

7. Template customization

You can change colors and design of the plugin using template overrides in Joomla.

The path to the files: /plugins/pcp/stripe/tmpl/ Here are the folloing files: elements_style.php and stripe.php which can be customized via the template override.

How to Create Template Overrides for Joomla Plugins

7.1 Dark colors

Add custom CSS to your Joomla template:

.stripe-payment-form .card-container {background-color:#222}
.stripe-payment-form fieldset {background:#555}
.stripe-payment-form fieldset legend {color:#fff}

Open elements_style.php and change color: "#32325D", to color: "#999",

You will get the following result:

Stripe for Phoca Cart - override styles to get dark colors
Dark colors

8. Stripe API Update

We do the best to update the plugin to compy to the latest version of Stripe API which supposedly updates a few times per year. We are operating with Stripe API via calls in the code, however, Stripe will continue to send webhook messages in the format based on the API version set in your Stripe Dashboard.

Every time you are going to update Stripe plugin for Phoca Cart, please sign in to your Stripe Dashboard and check out if there is an upgrade of the API available.

Steps to Update Your Stripe API Version

  • Sign in to your Stripe Dashboard
  • Proceed to “Developers”
  • Find the first box labeled as “API Version”.
  • If an update is available, the button at the top right of this box will be active. Click to upgrade your API Version.
Check your Stripe API
Check your Stripe API

Thanks for reading. We wish you good sales!