LokiCheckout_AfterPay
This Magento 2 module is an add-on package to the LokiCheckout. It introduces Afterpay (also known as "Cash App Afterpay" or "Clearpay")
Installation
Install this package via composer:
composer require loki-checkout/magento2-after-pay
Next, enable this module:
bin/magento module:enable LokiCheckout_AfterPay
This module requires the official Afterpay extension (afterpay-global/module-afterpay, including afterpay-global/module-cash-app-pay). Configure Afterpay as usual under Stores > Configuration > Sales > Payment Methods.
Features
- Afterpay / Clearpay (
afterpay): After the shopper clicks Place Order, the Loki Checkout creates an Afterpay checkout and redirects to Afterpay. Afterpay then sends the shopper back to the upstream controllerafterpay/payment/capture, which places the order. No order is placed before the payment is approved. - Payment schedule widget: Afterpay's
square-placementpayment-schedule widget and terms are shown under the selected method. The widget only appears for the currencies Afterpay supports (AUD, CAD, GBP, NZD, USD). - Cash App Pay (
cashapp): After Place Order, the shopper goes to a dedicated page (loki_checkout_after_pay/cashapp/pay) that renders the Cash App Pay button. Cash App then returns to the upstream controllercashapp/payment/capture, which places the order. - Afterpay Express Checkout: An express button in the "Pay faster with" section. Enable it with Stores > Configuration > Loki Checkout > Afterpay options > Enable Afterpay Express Checkout. It uses the upstream
afterpay/express/*controllers. - Icons: Afterpay (Clearpay for GBP) and Cash App Pay icons in the payment method list.
Development
The package loki-checkout/magento2-after-pay-dev-tools (LokiCheckout_AfterPayDevTools) stubs the Afterpay API. When loki_checkout/after_pay_dev_tools/use_service_stubs is enabled, the redirect goes to a local stand-in page with Approve and Cancel options, so the full order flow can be tested without Afterpay credentials. Never enable it in production.
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_AfterPay.git
Module Dependencies
The following dependencies are declared in the module its `etc/module.xml` file:
LokiCheckout_Core
Loki_Base
Loki_Components
Loki_CssUtils
Loki_FieldComponents
Loki_MapComponents
Magento_Backend
Magento_Catalog
Magento_Checkout
Magento_CheckoutAgreements
Magento_Config
Magento_Customer
Magento_Directory
Magento_Eav
Magento_Newsletter
Magento_Payment
Magento_Quote
Magento_Sales
Magento_Shipping
Magento_Store
Magento_Tax
Magento_Vault
Yireo_CspUtilities
Magento_QuoteGraphQl
Magento_Weee
Afterpay_Afterpay
Afterpay_CashApp
Composer details
LokiCheckout_AfterPayloki-checkout/magento2-after-pay
ext-pcre: *
php: >=8.2 <8.6
afterpay-global/module-afterpay: ^5.4
afterpay-global/module-cash-app-pay: ^5.0
loki-checkout/magento2-core: ^2.0
magento/framework: ^103.0
Releases
Changelog
Added
- Afterpay redirect payment: create the Afterpay checkout in the final step and redirect to Afterpay
- Afterpay payment-schedule widget and terms below the payment method
- Cash App Pay payment page
- Afterpay Express Checkout button in the fast checkout section
- Afterpay, Clearpay and Cash App Pay icons
- Unit, integration and Playwright tests
Removed
- Unused payment redirect resolver