LokiCheckout_IwocaPay
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:
Observer\CheckMethodEligibilitywithholds a method the shopper is not eligible for. Upstream only applies these limits client-side, injs/view/payment/iwocapay.js; server-side both methods are active wheneverpayment/iwocapay/activeis set. Pay Later needs an order value between £150 and £30,000, Pay Now up to £30,000. Because it observespayment_method_is_active, the rule holds in the checkout, over REST and in GraphQL alike, and an ineligible method is refused byMagento\Quote\Model\Quote\Payment::importData()rather than merely hidden.Payment\Icon\IconResolverrenders the iwocaPay logo next to both methods.loki-checkout.payment.methods.<code>.additionalshows the configured subtitle under the selected method.Payment\Redirect\RedirectResolversends the shopper toiwocapay/process/createOrderonce the order is placed. That upstream controller creates the order in iwocaPay and redirects on to the hosted payment page; itsiwocapay/process/callbackreturn leg then invoices the order and forwards to the success page.ViewModel\CheckoutBannerrenders 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
@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
LokiCheckout_IwocaPayloki-checkout/magento2-iwoca-pay
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_paylaterandiwocapay_paynowpayment methods ofIwoca_Iwocapaywithin the Loki Checkout: the hand-off toiwocapay/process/createOrderafter the order is placed, the payment method icon and the configured subtitle per method. - Server-side eligibility gating through a
payment_method_is_activeobserver, 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