Agentic commerce (ACP)
The storefront also implements the Agentic Commerce Protocol (API version 2026-04-17), used by agent platforms such as ChatGPT. ACP is a separate protocol from UCP: different discovery, wire format and authentication. It is served from /api/acp and shares only the Magento cart plumbing and the Stripe integration with UCP.
The key difference: ACP’s complete has exactly one way to place an order, a delegated payment token charged through Stripe. So the surface needs Stripe configured to serve any traffic at all; it never advertises itself half-usable.
The protocol code lives in the engine (@magenxcommerce/engine/agentic/acp). See the Engine API: Agentic ACP reference.
Endpoints
Section titled “Endpoints”| Endpoint | Purpose |
|---|---|
GET /.well-known/acp.json | Discovery |
POST /api/acp/checkout_sessions | Create |
POST /api/acp/checkout_sessions/{id} | Update (full replacement) |
GET /api/acp/checkout_sessions/{id} | Get |
POST /api/acp/checkout_sessions/{id}/complete | Complete: charges the delegated token |
POST /api/acp/checkout_sessions/{id}/cancel | Cancel |
- Versioning: every request must send
API-Version: 2026-04-17; anything else is a 400 listing the supported versions. - Sessions run over the same Magento guest quote UCP uses; the session id is the masked quote id.
- Fulfillment: shipping rates are
fulfillment_options; the platform picks one withselected_fulfillment_options[]. - Discounts:
discounts.codes(one Magento coupon per quote; extra codes come back indiscounts.rejected), applied cart rules indiscounts.applied.
Payment
Section titled “Payment”Sessions declare one handler, dev.acp.tokenized.card (Stripe). Complete takes the platform’s card token, converts it to a Stripe PaymentMethod, and charges it through the same setPaymentMethodOnCart + placeOrder path as the browser checkout. A 3-D Secure challenge returns complete_in_progress with the challenge URL.
Shared Payment Tokens. Agent platforms can pay with Stripe Shared Payment Tokens (spt_…). These go to Magento as the Stripe payment method, and the Stripe Shared Payment Tokens module makes the Stripe module charge them. Set ACP_SHARED_PAYMENT_TOKENS=1 only once that module is enabled; until then spt_ tokens are refused before anything is charged.
Authentication
Section titled “Authentication”Two independent checks gate each request, and both are required:
- a bearer credential (
Authorization: Bearer <key>) identifies the platform; - an HMAC-SHA256 signature of the raw body (
Signature+Timestampheaders,HMAC-SHA256("<Timestamp>.<body>")withACP_SIGNING_SECRET, ±5 minutes) proves it wasn’t changed in transit.
Idempotency
Section titled “Idempotency”Idempotency-Key is required on every POST:
- same key and body: the original response is replayed, with
Idempotent-Replayed: true; - same key, different body: 422
idempotency_conflict; - key still in flight: 409 with
Retry-After; - 5xx responses are never stored.
With REDIS_URL (or ACP_REDIS_URL) the replay store is shared across instances, so a retry on another replica is deduplicated too. Without Redis it is per process.
Order events
Section titled “Order events”With ACP_WEBHOOK_URL and ACP_WEBHOOK_SECRET (both given by the platform), every order ACP places is watched, and the platform receives order_create, then order_update whenever the order changes:
| Magento status | ACP status |
|---|---|
| Pending | created |
| Processing | confirmed |
| On Hold, Suspected Fraud, Payment Review | manual_review |
| Partly shipped | processing |
| Fully shipped, Complete | shipped (completed with nothing to ship) |
| Canceled, Closed | canceled |
Each shipment is a shipping fulfillment with tracking; each credit memo a refund adjustment. Events are signed as Merchant-Signature: t=<unix>,v1=<hex HMAC> (rename the header with ACP_WEBHOOK_SIGNATURE_HEADER), delivered at least once with backoff, using the same watcher as UCP’s order webhooks.
Set up
Section titled “Set up”- Get a platform key, signing secret, webhook URL and webhook secret from the agent platform.
- Set the Stripe credentials:
STRIPE_SECRET_KEY,STRIPE_PUBLISHABLE_KEY,STRIPE_MERCHANT_ID. - Set
ACP_ENABLE=1,ACP_PLATFORM_KEYS,ACP_SIGNING_SECRET, and the webhook variables. - Run Redis for idempotency and order watching across instances.
- Optional: install the Stripe Shared Payment Tokens module and set
ACP_SHARED_PAYMENT_TOKENS=1.
environment: ACP_ENABLE: "1" ACP_PLATFORM_KEYS: "openai:${ACP_KEY_OPENAI}" ACP_SIGNING_SECRET: "${ACP_SIGNING_SECRET}" ACP_RATE_LIMIT: "120" ACP_WEBHOOK_URL: "https://…/agentic_checkout/webhooks/order_events" ACP_WEBHOOK_SECRET: "${ACP_WEBHOOK_SECRET}" STRIPE_SECRET_KEY: "${STRIPE_SECRET_KEY}" STRIPE_PUBLISHABLE_KEY: "${STRIPE_PUBLISHABLE_KEY}" STRIPE_MERCHANT_ID: "acct_…"For product discovery by agents, publish an OpenAI product feed with the Product Feeds module. To let an AI agent manage the store backend instead, see the AI MCP Connector.