Magento configuration

Install and configure the TrueLayer Payments for Magento plugin.

You should have already created your TrueLayer account in Console. If you haven't, take a look at our Console configuration docs to learn how.

Installation using Composer

First, download and install Composer. Then, 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. Wait while Composer downloads the extension for you. When it’s finished, clean the cache and 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.
3840

A screenshot of Magento, showing the path to access the TrueLayer Payments plugin.

Configuration in Magento

🚧

Start in sandbox

Don't go straight to production — make sure to test payments using sandbox credentials first. Check that Mode under the General tab of the plugin in Magento 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. Under TrueLayer Payments, open the General tab.
  2. Enter the credentials explained in the table below. The location column explains where to find the relevant credentials in Console:
CredentialLocationExample value
Merchant account IDConsole > Payments > Merchant Account > ID363aglc4-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
Public key KIDConsole > Payments > Settings > Signing keys.

This assumes you have already uploaded your public key into the Payments section of Console. If you haven't, learn how to configure Console.
c7d2f140-7fdd-4272-b948-23c32a613546
  1. Go to the Settings tab of TrueLayer Payments in Magento, enter this information:
AttributeValue
TitleInstant bank payment
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

Also enable Debug Mode under Debug & Logging.