LokiCheckout_IwocaPay

This module is available free of charge as part of Loki Checkout. Please note that support for this module is not included and is available on an hourly basis.
Payment
PHP 8.1 - 8.4
Magento 2.4.7 | 2.4.8
CSP Yes
Unit Tests 46
Integration Tests 9
PHPStan 5
Magento PHPCS 10

Magento version PHP version License Latest Version

This Magento 2 module is an add-on package to the LokiCheckout.

It makes the iwocapay_paylater and iwocapay_paynow payment methods of the iwocaPay module (Iwoca_Iwocapay) work inside the Loki Checkout.

Requirements

Iwoca_Iwocapay is a composer dependency of this package, so it is installed along with it. Without it enabled, this module stays completely inert.

Installation

Install this package via composer:

composer require loki-checkout/magento2-iwoca-pay

Next, enable this module:

bin/magento module:enable LokiCheckout_IwocaPay

Configuration

All settings are the ones of the iwocaPay module itself, under Stores > Configuration > Sales > Payment Methods > iwocaPay. The ones that change how this module behaves:

| Setting | Effect | |---|---| | Enabled (payment/iwocapay/active) | Master switch. Also needs a Seller ID, a Seller Access Token and a base currency listed in payment/iwocapay/allowed_currencies (["GBP"] by default) before either method is offered. | | Allowed payment terms (payment/iwocapay/allowed_payment_terms) | Pay Later Only hides Pay Now in the checkout. | | Show checkout banner (payment/iwocapay/price_banner_checkout_enabled) | Renders the instalment banner in the checkout. | | Instalment terms (payment/iwocapay/price_banner_{30d,3m,12m}_enabled) | The terms the banner advertises. With none enabled, the banner is not rendered. | | Banner VAT (payment/iwocapay/price_banner_vat) | excluding finances - and labels - the total minus tax. |

How it works

iwocaPay is an off-site gateway that is handed the order after Magento has placed it. Upstream drives that hand-off from its Knockout renderer, which Loki Checkout never loads. This module reproduces it, along with everything else upstream only implements in its Luma JavaScript:

  1. Observer\CheckMethodEligibility withholds a method the shopper is not eligible for. Upstream only applies these limits client-side, in js/view/payment/iwocapay.js; server-side both methods are active whenever payment/iwocapay/active is set. Pay Later needs an order value between £150 and £30,000, Pay Now up to £30,000. Because it observes payment_method_is_active, the rule holds in the checkout, over REST and in GraphQL alike, and an ineligible method is refused by Magento\Quote\Model\Quote\Payment::importData() rather than merely hidden.
  2. Payment\Icon\IconResolver renders the iwocaPay logo next to both methods.
  3. loki-checkout.payment.methods.<code>.additional shows the configured subtitle under the selected method.
  4. Payment\Redirect\RedirectResolver sends the shopper to iwocapay/process/createOrder once the order is placed. That upstream controller creates the order in iwocaPay and redirects on to the hosted payment page; its iwocapay/process/callback return leg then invoices the order and forwards to the success page.
  5. ViewModel\CheckoutBanner renders the instalment banner, either in the order summary or underneath the payment methods once the shopper reaches them.

The rest of the upstream module needs no adaptation: the order confirmation email is already held back until iwocaPay confirms the payment, the success page already rehydrates a dropped session, and the back-button cart restore already recognises the Loki Checkout, which serves the standard checkout route.

Note on "Pay Later Only"

Upstream expresses this to its own checkout as isPayLaterOnly, a strict comparison of the whole stored array against ["PAY_LATER"]. This module instead tests whether PAY_NOW is among the configured terms. The two agree on every value the admin field can produce today; the membership test additionally survives a reordering of the stored terms and a future third option.

Note on the banner

Upstream publishes the banner configuration as window.iwocapayBannerConfig from an inline script. Under a nonce-based Content Security Policy that script is blocked, so this module renders the terms, theme and VAT setting server-side instead of reading that global.

Current status

Static Tests Unit Tests Integration Tests Playwright DI Compilation

WARNING: This module has no releases yet. If you want to use it, make sure to add the version @dev to the composer command.

Support

For getting support, create an Issue under the following project URL:

https://gitlab.yireo.com/loki-checkout/LokiCheckout_IwocaPay.git

Module Dependencies

The following dependencies are declared in the module its `etc/module.xml` file:

Iwoca_Iwocapay LokiCheckout_Core Loki_Base Loki_Components Loki_CssUtils Loki_FieldComponents Loki_MapComponents Magento_AdminNotification Magento_Backend Magento_Catalog Magento_CatalogInventory Magento_CatalogWidget Magento_Checkout Magento_CheckoutAgreements Magento_Cms Magento_Config Magento_Csp Magento_Customer Magento_Directory Magento_Eav Magento_Indexer Magento_MediaStorage Magento_Newsletter Magento_PageBuilder Magento_Payment Magento_Quote Magento_Rule Magento_Sales Magento_SalesRule Magento_SalesSequence Magento_Search Magento_Shipping Magento_Store Magento_Tax Magento_Theme Magento_Ui Magento_User Magento_Variable Magento_Vault Magento_Widget Yireo_CspUtilities
Composer details
Magento module name
LokiCheckout_IwocaPay
Composer name
loki-checkout/magento2-iwoca-pay
Composer version
No release yet
Default branch
main
Requirements
iwoca/iwocapay-magento: ^2.9
loki-checkout/magento2-core: ^2.0
loki/magento2-components: ^2.0
loki/magento2-css-utils: ^1.0
magento/framework: ^103.0
magento/module-checkout: ^100.0
magento/module-payment: ^100.0
magento/module-quote: ^101.0
magento/module-store: ^101.1
php: >=8.2 <8.6
Releases
Changelog

[0.1.0] - 18 September 2026

Added

  • Support for the iwocapay_paylater and iwocapay_paynow payment methods of Iwoca_Iwocapay within the Loki Checkout: the hand-off to iwocapay/process/createOrder after the order is placed, the payment method icon and the configured subtitle per method.
  • Server-side eligibility gating through a payment_method_is_active observer, reproducing the per-method order value limits and the "Pay Later Only" setting that upstream only applies in its Luma JavaScript. It applies in every area, so an ineligible method is refused over REST and GraphQL as well, not merely hidden in the checkout.
  • The iwocaPay instalment banner, rendered in the order summary and underneath the payment methods once the shopper reaches them.

[0.0.1] - 11 September 2026

  • Initial start

Last modified: September 18, 2026