Loki_AgenticCommerceAcp

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

A thin Agentic Commerce Protocol (ACP) binding for Loki_AgenticCommerce. It only contains an ACP payload mapper, an error renderer and an optional signature authenticator. All checkout logic lives in Loki_AgenticCommerce.

Endpoints

| Method | Path | |---|---| | POST | /acp/checkout_sessions | | GET | /acp/checkout_sessions/{id} | | POST | /acp/checkout_sessions/{id} | | POST | /acp/checkout_sessions/{id}/complete | | POST | /acp/checkout_sessions/{id}/cancel |

Paths can be changed by overriding the virtualTypes Loki\AgenticCommerceAcp\Endpoint\* in your own di.xml.

Configuration

Stores > Configuration > Loki > Loki Agentic Commerce > Agentic Commerce Protocol (ACP)

  • Enabled
  • Signing Secret: when set, requests need an HMAC-SHA256 Signature header over .{body} and a Timestamp header that is no more than 5 minutes old (on top of the bearer token).

Every ACP request needs a bearer token (Authorization: Bearer <key>) with one of the API keys configured in Loki_AgenticCommerce, also when a signing secret is set: a valid signature alone is rejected.

payment_data.provider is matched against the ID of a payment handler registered in Loki_AgenticCommerce. An ap2 object in the complete request is passed on as payment mandate (see Loki_AgenticCommerceAp2).

Testing without an AI

bin/magento loki:agentic-commerce:acp:simulate plays the role of an AI agent by replaying the JSON scenarios in Test/Fixtures/Scenarios, in-process or over HTTP (--url). See TESTING.md for the full test plan and stories/ for the documented behaviour.

Installation

Install this package via composer:

composer require loki/magento2-agentic-commerce-acp

Next, enable this module:

bin/magento module:enable Loki_AgenticCommerceAcp

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_AgenticCommerceAcp.git

Composer details
Magento module name
Loki_AgenticCommerceAcp
Composer name
loki/magento2-agentic-commerce-acp
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-store: ^101.1
Releases
Changelog

Added

  • Initial implementation
  • Fake AI agent bin/magento loki:agentic-commerce:acp:simulate with JSON scenarios
  • User stories in stories/ and a test plan in TESTING.md

Fixed

  • Require the bearer token for every ACP request, also when a valid signature is sent

Last modified: October 26, 2026