PayLaterPayLater
Get Production Keys

Magento

The PayLater plugin lets merchants integrate Buy Now, Pay Later (BNPL) into their Magento 2 stores, giving customers flexible payment options. This comprehensive guide walks you through the step-by-step installation and configuration process for a seamless integration.

Download plugin

Magento 2 / Adobe Commerce v4.1.5 · latest

Always install the latest version. Older releases are deprecated — see the release notes for the full version history.

PHP requirement

The PayLater plugin needs PHP 8.2 or newer. Keep PHP up to date with the latest security release for your version.

Compatibility

ComponentSupported
PlatformMagento 2.4.x, Adobe Commerce 2.4.x, Mage-OS (tested on Mage-OS 3.6.0, Magento 2.4.9 code base)
PHP8.2 or newer (tested on 8.3)
CronMagento cron must be running. The plugin reconciles pending PayLater orders every 10 minutes.
Store currencyQAR
Install methodManual (app/code). The package is not available through Composer.

Manual setup

The zip already contains the PayLater/PayLaterpay folder, so extract it straight into app/code/. Do not create the PayLater/PayLaterpay folder yourself first, or the module ends up one level too deep and Magento cannot find it.

Run every command below as the user that owns the Magento files (usually the web server user, for example www-data), not as root. Files created by root stop the store and later commands from writing to generated/ and var/.

  • Extract the zip into your Magento 2 [ROOT]/app/code/ directory.
  • Check that [ROOT]/app/code/PayLater/PayLaterpay/registration.php exists.
  • Enable the module:
cd [ROOT]
unzip PayLater_PayLaterpay-<version>.zip -d app/code/
php bin/magento module:enable PayLater_PayLaterpay
  • Then run the following commands in order. Run setup:static-content:deploy only if your store is in production mode (check with php bin/magento deploy:mode:show). In default and developer mode Magento builds static files itself and refuses to run it.
php bin/magento setup:upgrade
php bin/magento setup:di:compile
php bin/magento setup:static-content:deploy
php bin/magento cache:flush

Upgrading

  • Put the store into maintenance mode: php bin/magento maintenance:enable.
  • Delete [ROOT]/app/code/PayLater/PayLaterpay, then extract the new zip into app/code/ as above. Your admin settings are kept, because they are stored in the database.
  • Run the four commands above, then php bin/magento maintenance:disable.

Removing the plugin

php bin/magento module:disable PayLater_PayLaterpay
rm -rf app/code/PayLater/PayLaterpay
php bin/magento setup:upgrade
php bin/magento setup:di:compile
php bin/magento cache:flush

In production mode, also run setup:static-content:deploy before cache:flush. setup:upgrade clears the compiled code, so the store shows errors until it is compiled again.

Before you remove it, wait until no orders are still waiting for a PayLater payment. Pending orders are only reconciled while the module is enabled.

Frontend widgets

PLP — Product List Page

PayLater widget on the Magento product list page

PDP — Product Detail Page

PayLater widget on the Magento product detail page
PayLater instalment breakdown on the Magento product detail page

Log in to your Magento Admin Panel.

Magento Admin Panel login screen

Admin configuration

Admin configuration is a crucial step in setting up the PayLater plugin in your Magento 2 store. In this section you'll access the Magento Admin Panel and navigate through specific settings to tailor the PayLater payment gateway to your preferences.

  • Log in to your Magento Admin Panel.
  • Navigate to Stores → Configuration → Sales → Payment Methods and expand the Other Payment Methods tab. You will see the PayLater — Shop Now Pay Later option.
PayLater under Other Payment Methods in Magento configuration

Payment settings

SettingWhat to enter
EnabledTurns the PayLater payment method on or off.
TitleThe payment method name shown at checkout.
Client IDYour OAuth client ID from PayLater, for example merchant-815.
Client SecretYour OAuth client secret from PayLater.
Webhook SecretProvided by PayLater after they register your webhook URL (see below).
Minimum Order AmountSmallest order total that can use PayLater. Must be 300 or higher; lower values are rejected on save.
Outlet IDYour outlet ID from PayLater.
Payment ModeUAT for testing with the test credentials, Live for production. Use the credentials that match the mode.
Enable LoggingLogs every PayLater action. Useful while testing; turn it off in production.
Pre-Checkout Inventory CheckChecks stock before redirecting the shopper to PayLater. Turn it off for stores that use multi-source inventory or external stock management. Magento still checks stock when the order is placed.
Sort OrderPosition of PayLater in the list of payment methods.

Your webhook URL is https://<your-store>/ppaylater/webhook/notify. Send it to the PayLater team; they register it and give you the Webhook Secret.

Under Widget Settings you can turn the PayLater widget on or off for the product list page and the product detail page, and set its main heading, sub heading and terms text.

PayLater payment settings in the Magento admin
PayLater payment settings — Client ID, Client Secret and Outlet ID fields
  • Save the configuration and clear the cache.

Testing

To ensure smooth functionality, it's recommended to test the PayLater payment option:

  • Add a product to your cart and proceed to checkout.
  • During checkout, select PayLater as the payment method.
  • You will be redirected to the secure PayLater platform to complete the BNPL payment process.
  • Use a test shopper account from the Test environment.
  • Please use 300 QAR as the amount to test.
Order numbers PayLater has already seen

The test credentials are shared by many stores, and a new Magento store numbers its orders from 000000001. If PayLater already holds an order number, the plugin retries once with a short suffix, for example 000000123-a7f2. That reference is what appears in the PayLater merchant portal for the order; the Magento order number does not change. Versions before 4.1.1 cancelled the order instead, so upgrade if you see Order ID already exists.

Credentials

Get your Client ID, Client Secret, and Outlet ID from your PayLater account dashboard. For your Webhook Secret, share your webhook endpoint with the PayLater team. For sandbox values and test shoppers, see the Test environment.

Last updated