Loki_AgenticCommerceAp2

PHP 8.2 - 8.5
Magento 2.4.6 - 2.4.9
CSP Yes
PHPStan 1
Magento PHPCS 10
License OSL-3.0
Latest Release none

What this module does

Adds Agent Payments Protocol (AP2) payment mandate verification to Loki_AgenticCommerce. AP2 travels inside other protocols, so this module does not add endpoints. Instead it plugs into the core:

  • Mandate\PaymentMandateValidator (a PaymentAuthorizationValidatorInterface) checks the mandate ID, currency, total (in minor units) and expiry against the cart, then verifies the user authorization.
  • Observer\StoreMandateReference stores ap2_payment_mandate_id in the order payment's additional information.
  • Observer\AddUcpCapability advertises dev.ucp.shopping.ap2_mandate in the UCP profile (through an event, without a dependency on the UCP module).

Both ACP and UCP pass an ap2 object of the complete request on as mandate.

Signature verification

Verifying the user_authorization credential depends on your trust framework. Provide an implementation of Loki\AgenticCommerceAp2\Api\MandateSignatureVerifierInterface via a DI preference. The default implementation rejects every mandate, unless Allow Unverified Mandates is switched on (development only).

Configuration

Stores > Configuration > Loki > Loki Agentic Commerce > Agent Payments Protocol (AP2)

  • Enabled
  • Require Mandate: reject agentic orders without a mandate
  • Allow Unverified Mandates: development only

Installation

Install this package via composer:

composer require loki/magento2-agentic-commerce-ap-2

Next, enable this module:

bin/magento module:enable Loki_AgenticCommerceAp2

Current status

pipeline failed
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-extensions/Loki_AgenticCommerceAp2.git

Composer details
Magento module name
Loki_AgenticCommerceAp2
Composer name
loki/magento2-agentic-commerce-ap-2
Composer version
No release yet
Default branch
main
Requirements
php: >=8.2 <8.6
loki/magento2-agentic-commerce: @dev | >=0.0.1
magento/framework: ^103.0
magento/module-quote: ^101.2
magento/module-sales: ^103.0
magento/module-store: ^101.1
Releases
Changelog

Added

  • Initial implementation

Last modified: October 26, 2026