Enable TrueLayer for Magento

Set up the TrueLayer plugin and configure your settings to enable you to start accepting payments.

This guide assumes that you have already set up your TrueLayer account in Console. If you haven't, take a look at our Console configuration docs to learn how.

🚧

Start in sandbox

Before moving any real money, make sure to test payments using sandbox credentials first. Check that General > Mode is set to Sandbox.

To access your Sandbox credentials in Console, ensure that the Live toggle in the top right is set to off.

1. Install the plugin using Composer

First, download and install Composer.

To install the plugin:

  1. Download the latest TrueLayer Payments for Magento plugin from GitHub.
  2. Run your SSH Console to connect to your Magento 2 store
  3. Locate the root of your Magento 2 store.
  4. Enter the command below in the command line of your root:
composer require truelayer/magento2
  1. Composer downloads the extension for you.
    When it’s finished, clean the cache.
  2. Deploy the content in your Magento environment using this command in your command line:
php bin/magento setup:upgrade
php bin/magento cache:clean

If Magento is running in production mode, deploy the static content below:

php bin/magento setup:static-content:deploy
  1. Go to your Magento admin portal. Navigate to Stores > Configuration > Sales > Payment Methods > TrueLayer Payments.

2. Configure your settings in Magento

  1. Under TrueLayer Payments, open the General tab.
  2. Enter the credentials in the table below.
CredentialWhere to find itExample value
Merchant account IDConsole > Payments > Merchant Account > Details363aglc4-1451-4089-b143-c2ad0e237322
Client IDConsole > Settingssandbox-ecommerceplugins-1109e0
Client secretConsole > Settings > Saved to your desktop as a .txt file upon generationbf945c77-b697-433c-b4f2-36dcc7e8c886
Path to private keyN/AThe path where your private key has been stored on your server
KIDConsole > Payments > Settings > Signing keys.c7d2f140-7fdd-4272-b948-23c32a613546
  1. Go to the Settings tab of TrueLayer Payments in Magento. Enter this information in the appropriate fields:
FieldValue
TitlePay by bank app
DescriptionFast and secure, with no need to enter your account details.
Order Status for Pending PaymentPending
Generate InvoiceYes
Order Status for Complete PaymentComplete
Send EmailYes
  1. Enable Debug Mode under Debug & Logging.
    This ensures that both you and TrueLayer receive useful information if an error occurs.