Skip to main content
Version: 3.x

Payzen

The Payzen extension allows customer to pay using Payzen.

The implementation use PayZen embedded form / Javascript with REST API to create payments.

info

If you intend to use Payzen as a Magento 2 Payment with native Magento module, you can skip this guide and directly go to the Use as Magento2 Payment guide.

Installation

First, you need to install the @front-commerce/payzen package:

Command to install @front-commerce/payzen
$ pnpm add @front-commerce/payzen

Lyra Collect support

Lyra Collect is a payment solution that shares the same infrastructure and API with Payzen. In Front-Commerce, it is the exact same module that is used. The only differences are:

  • the FRONT_COMMERCE_PAYZEN_PRODUCT environment variable (to be set to lyra_collect)

Configure your environment

Define environment variables

Get your access keys by following the Payzen documentation. Update your .env with the following values:

Follow the environment variable reference to learn how to set them.

.env
FRONT_COMMERCE_PAYZEN_PUBLIC_KEY=58039770:testpublickey_xxxxxxx
FRONT_COMMERCE_PAYZEN_PRIVATE_KEY=58039770:testpassword_yyyyyyy
FRONT_COMMERCE_PAYZEN_SHA256=xxxxxxxxx
#FRONT_COMMERCE_PAYZEN_PRODUCT=payzen # use lyra_collect to switch to Lyra Collect's API URLs

Configure notifications in your account

You must also configure notifications in Payzen or Lyra "expert mode" to ensure only one notification is sent upon payment, to prevent multiple orders being created for a single payment:

PayZen notification rules configuration with only one notification enabled for "URL de notification à la fin du paiement"

Ensure Lyra's IP addresses are allowed

If your server has a firewall, or your staging environment is protected by a HTTP basic authentication, you must allow Lyra's IP addresses to access your server. This is necessary for the payment confirmation to be sent to your server.

The list of IP addresses can be found in the PayZen documentation. As of 2024-10-15, the IP range to allow is: 194.50.38.0/24

Then follow one of this guide to integrate Payzen

Contacting Lyra's support

If you ever have to contact Lyra's support team, here are some recommendations in order to increase efficiency and ensure your issue could be handled by people more aware of Front-Commerce.

Checklist for an efficient support request
  • mention the fact that you are using Front-Commerce
  • don't mention your backend (i.e: Magento)
  • ask that the "support grand comptes" handles your request (Nicolas, Rémi or Maxime)