Consumption guide: REST API only
Integrate with the Commerce Orchestrator by calling its deployed HTTP service. No library dependency is required; use any HTTP client and the JSON request/response shapes below.
See consumer-integration.md for the high-level integration model.
Base URL and auth
- Base URL: The orchestrator service URL (e.g.
https://orchestrator.example.com). - Prefix: All API routes are under
/api/v1. - Auth (production): When the service is run with
ENV=production, auth mode is controlled byAUTH_MODE:AUTH_MODE=static: send a fixed bearer token (AUTH_BEARER_TOKEN).AUTH_MODE=jwt: send a signed JWT bearer token (AUTH_JWT_HS256_SECRETused for verification). In both modes, protected endpoints return401 Unauthorizedon missing/invalid credentials.
Authorization: Bearer <your-token>
Message signing (UCP, RFC 9421)
Bearer auth answers who is calling; message signing answers was this exact message altered. The two are independent — a signed request still needs its Authorization header.
Signatures follow RFC 9421 HTTP Message Signatures with an RFC 9530 Content-Digest, as the UCP signatures specification requires. Ed25519 (EdDSA) and ECDSA P-256 (ES256) keys are supported in both directions. ES256 is the one algorithm every UCP verifier must accept, so operators whose counterparties are unknown should prefer it (UCP_SIGNING_KEY_ALG=ES256). The algorithm is always derived from the key named by keyid, never from the message.
sequenceDiagram
participant A as Agent / platform
participant O as Orchestrator
A->>O: GET /.well-known/ucp (unsigned)
O-->>A: profile + public JWKs
A->>O: POST /api/v1/... with Content-Digest, Signature-Input, Signature
O->>O: digest matches body, required components covered, keyid known, signature valid
O-->>A: response with Content-Digest, Signature-Input, Signature over @status
Verifying our responses
When the deployment is configured with UCP_SIGNING_KEY_ID and UCP_SIGNING_KEY (mandatory in production), every response carries:
Content-Digest: sha-256=:<base64 SHA-256 of the body>:
Signature-Input: sig1=("@status" "content-digest" "content-type");created=1760000000;keyid="orch-2026-a"
Signature: sig1=:<base64 signature>:
Bodyless responses cover only "@status". Rebuild the RFC 9421 signature base from those components and verify it with the JWK whose kid matches keyid, fetched from the keys[] JWK Set of /.well-known/ucp (kty: OKP/crv: Ed25519, or kty: EC/crv: P-256). A deployment with no signing material advertises no keys and sets no dev.ucp.security.signatures capability flag — there is no default key, so an unsigned deployment is honest about being unsigned rather than publishing a key everybody shares.
Signing your requests
If the operator has configured your public key (UCP_AGENT_JWKS as a JWK Set, or UCP_AGENT_KEYS as Ed25519 kid:x pairs), every /api/v1 request must be signed; unsigned calls get 401. Discovery and health endpoints stay open, because you must read discovery before you can sign anything.
Use the label sig1 and cover at least:
| Component | When |
|---|---|
"@method", "@authority", "@path" | Always |
"@query" | The request has a query string |
"content-digest", "content-type" | The request has a body (send a matching Content-Digest) |
"idempotency-key", "ucp-agent", "signature-agent" | That header is present |
POST /api/v1/ucp/cart HTTP/1.1
Host: orchestrator.example.com
Content-Type: application/json
Content-Digest: sha-256=:<base64 SHA-256 of the body>:
Signature-Input: sig1=("@method" "@authority" "@path" "content-digest" "content-type");created=1760000000;keyid="agent-1"
Signature: sig1=:<base64 signature>:
created is optional, but when present it must be within 300 seconds of the orchestrator’s clock; expires, when present, must not have passed. Replay protection otherwise comes from idempotency keys. A request may carry several signatures (for example one added by a proxy); it is accepted when any one of them verifies.
Rotation
Both directions are keyed by kid. To rotate ours, set the new key as UCP_SIGNING_KEY_ID/UCP_SIGNING_KEY and list the old one in UCP_SIGNING_PREVIOUS_KEYS (kid:seed, or kid:ES256:secret); both appear in discovery until you drop the old entry. To rotate yours, ask the operator to list both keys, switch, then have the old one removed.
Signature errors
Codes follow the UCP signatures specification:
| HTTP | Code | Meaning |
|---|---|---|
| 401 | signature_missing | No Signature-Input/Signature on a deployment that requires them. |
| 401 | signature_invalid | Verification failed, a required component is not covered, created is outside the 300s window, expires has passed, or a header is malformed. The error text says which. |
| 401 | key_not_found | The keyid is not configured on this deployment. |
| 400 | digest_mismatch | The body does not match the sha-256 Content-Digest, or the digest is missing. |
| 400 | algorithm_unsupported | An alg parameter disagrees with the key’s algorithm. |
Endpoints
Discovery (UCP-style)
| Method | Path | Description |
|---|---|---|
GET | /.well-known/ucp | UCP 2026-08-25 business profile: ucp.services (rest, mcp and, when configured, embedded transports for dev.ucp.shopping), ucp.capabilities, ucp.payment_handlers, the keys[] JWK Set, and an orchestrator member with the MCP endpoint, ACP discovery URL, neighbouring protocol versions and feature flags. ucp.supported_versions links ?ucp_version=2026-04-08 (previous shape) and the 2026-01-23 / 2026-01-11 legacy manifests. Cached public, max-age=300. No auth required. |
GET | /.well-known/acp.json | ACP discovery document: protocol (name/version/supported_versions), api_base_url, transports (rest, mcp), and capabilities.services (checkout, carts, delegate_payment). No auth required. |
Cart and checkout
| Method | Path | Description |
|---|---|---|
POST | /api/v1/cart/commands | Dispatch a cart command (create, add item, update qty, remove item, apply adjustment, get cart, start checkout). Body: CartCommandRequest (see request shapes). |
POST | /api/v1/ucp/carts | UCP REST binding: cart create with line_items; returns a UCP cart envelope. /api/v1/ucp/cart is the older alias. |
GET | /api/v1/ucp/carts/:id | UCP cart lookup (alias /ucp/cart/:id). |
PUT | /api/v1/ucp/carts/:id | UCP cart line replacement/update (alias /ucp/cart/:id). |
POST | /api/v1/ucp/carts/:id/cancel | UCP cart cancellation (alias /ucp/cart/:id/cancel). |
POST | /api/v1/ucp/cart/:id/fulfillment | UCP fulfillment extension (dev.ucp.shopping.fulfillment): quote shipping/pickup options for a destination, or select one. Returns the UCP cart envelope with fulfillment and fulfillment_minor. |
POST | /api/v1/ucp/checkout-sessions | UCP REST binding: checkout session create. The envelope’s root capability is dev.ucp.shopping.checkout. /api/v1/ucp/checkout is the older alias. |
GET | /api/v1/ucp/checkout-sessions/:id | UCP checkout session lookup (alias /ucp/checkout/:id). |
PUT | /api/v1/ucp/checkout-sessions/:id | UCP checkout session line update (alias /ucp/checkout/:id). |
POST | /api/v1/ucp/checkout-sessions/:id/complete | Complete UCP checkout (execute checkout) (alias /ucp/checkout/:id/complete). May answer status: authentication_required; see 3DS2 step-up. |
POST | /api/v1/ucp/checkout-sessions/:id/cancel | Cancel UCP checkout session (alias /ucp/checkout/:id/cancel). |
POST | /api/v1/ucp/checkout/:id/embedded-link | UCP embedded transport: returns a short-lived handoff URL (embedded_url, checkout_session_id, expires_at) on the merchant’s hosted page (EMBEDDED_CHECKOUT_URL). The token query parameter is an Ed25519 signature over ucp-embedded-checkout:{session}:{expires}, verifiable with the discovery JWK named by kid. 404 if the checkout does not exist; 501 NOT_CONFIGURED when no hosted page or signing key is configured. |
POST | /api/v1/ucp/checkout/:id/fulfillment | UCP fulfillment extension for a checkout session; same request/response shape as the cart fulfillment endpoint. |
GET | /api/v1/ucp/payment-handlers | List configured payment handlers. |
GET | /api/v1/ucp/payment-handlers/:id | Get a payment handler by id. |
POST | /api/v1/acp/checkout_sessions | ACP create checkout session: CheckoutSessionCreateRequest in, 201 CheckoutSession out. Requires API-Version: 2026-04-17 and Idempotency-Key. See ACP REST bodies. |
GET | /api/v1/acp/checkout_sessions/:id | ACP get checkout session. |
POST | /api/v1/acp/checkout_sessions/:id | ACP update checkout session (CheckoutSessionUpdateRequest; line_items replace the items). Requires Idempotency-Key. PUT is accepted too. |
POST | /api/v1/acp/checkout_sessions/:id/complete | ACP complete session: CheckoutSessionCompleteRequest in, CheckoutSessionWithOrder out (or the session with status: authentication_required; send authentication_result to finish, see 3DS2 step-up). Requires Idempotency-Key. |
POST | /api/v1/acp/checkout_sessions/:id/cancel | ACP cancel session, optional CancelSessionRequest body; 405 if already canceled. Requires Idempotency-Key. |
POST | /api/v1/acp/delegate_payment | ACP delegate payment token exchange, performed by the configured PSP. Requires Idempotency-Key. Returns 501 NOT_CONFIGURED when no delegation adapter is configured. |
POST | /api/v1/acp/carts | ACP Cart capability: CartCreateRequest in, 201 Cart out, priced in UCP_CATALOG_CURRENCY. Requires API-Version: 2026-04-17 and Idempotency-Key. |
GET | /api/v1/acp/carts/:id | ACP get cart; a canceled cart is 404 not_found. |
PUT | /api/v1/acp/carts/:id | ACP replace cart contents (CartUpdateRequest). Requires Idempotency-Key. |
POST | /api/v1/acp/carts/:id/cancel | ACP cancel cart. Requires Idempotency-Key. |
POST | /api/v1/checkout/execute | Execute checkout for a cart. Body: CheckoutRequestDto. Requires auth in production. |
POST | /api/v1/a2a/message:send | A2A 1.0 SendMessage (HTTP+JSON binding, A2A-Version: 1.0 required). See A2A 1.0. |
GET/POST | /api/v1/a2a/tasks/:id, /api/v1/a2a/tasks/:id:cancel | A2A task operations; always 404 TASK_NOT_FOUND, because this agent replies with messages and never creates tasks. |
POST | /api/v1/a2a/checkout | A2A envelope checkout. Send A2A-Version: 1.0 (or 0.3). |
POST | /api/v1/a2a/cart | A2A envelope cart command. Send A2A-Version: 1.0 (or 0.3). |
POST | /api/v1/a2a/identity/link | A2A envelope: { "capability": "dev.ucp.common.identity_linking", "payload": { "tenant_id": "...", "merchant_id": "...", "agent_id": "...", "link_token": "...", "user_reference": "..."? } }. Legacy identity capability names remain accepted. Returns 501 NOT_CONFIGURED when no identity provider is configured. |
Catalog and orders
| Method | Path | Description |
|---|---|---|
GET | /api/v1/catalog/items/:id | Legacy catalog item lookup. |
POST | /api/v1/ucp/catalog/search | UCP-native catalog search. Body: { "query": "..." }. |
POST | /api/v1/ucp/catalog/lookup | UCP-native batch lookup. Body: { "ids": ["SKU-1"] }; misses are returned as UCP messages. |
POST | /api/v1/ucp/catalog/product | UCP-native product lookup. Body: { "id": "SKU-1" }. |
GET | /api/v1/orders/:id | Legacy order lookup with tenant isolation. |
GET | /api/v1/ucp/orders/:id | UCP order: checkout_id, currency, permalink_url, line_items[] (with quantity: {original, total, fulfilled} and status), fulfillment, and totals[]. |
Payments
| Method | Path | Description |
|---|---|---|
POST | /api/v1/payments/capture | Capture an authorized payment. Body: PaymentLifecycleRequestDto. Tenant in body must match auth context. |
POST | /api/v1/payments/void | Void a payment. Body: PaymentLifecycleRequestDto. |
POST | /api/v1/payments/refund | Refund a payment. Body: PaymentLifecycleRequestDto. |
Events and operations
| Method | Path | Description |
|---|---|---|
POST | /api/v1/events/incoming | Idempotent event ingest (e.g. webhooks). Body: { "message_id": "..." }. |
POST | /api/v1/ops/outbox/process | Process one outbox message. Body: { "max_attempts": 3 }. |
GET | /api/v1/ops/dead-letter | List dead-letter entries. |
POST | /api/v1/ops/dead-letter/replay | Replay a message from dead-letter. Body: { "message_id": "..." }. |
POST | /api/v1/ops/reconciliation | Run payment reconciliation. Body: { "transaction_ids": ["..."] }. |
GET | /api/v1/openapi.json | OpenAPI 3.1 document for REST clients and tooling. No auth required. |
Health and metrics
| Method | Path | Description |
|---|---|---|
GET | /health/live | Liveness probe. |
GET | /health/ready | Readiness probe. |
GET | /metrics | Prometheus text metrics including orchestrator_events_total, provider call counts, and provider latency histograms. |
Request and response shapes
All request/response bodies are JSON.
Cart command (POST /api/v1/cart/commands)
Request: { "command": { "kind": "<command_kind>", ... }, "cart_id": "<uuid or null>" }
A cart belongs to the tenant that created it, taken from your access token and
not from the request body. Reading, changing, cancelling, starting checkout on, or
checking out a cart that belongs to another tenant returns 403 with
code: TENANT_MISMATCH — a cart id on its own grants nothing. This applies to
every surface: REST, UCP, ACP, A2A and the MCP tools.
Command kinds and their fields:
create_cart:merchant_id,currencyadd_item:item_id,quantityupdate_item_qty:line_id,quantityremove_item:line_idapply_adjustment:codeget_cart:cart_idstart_checkout:cart_id,cart_versioncancel_cart:cart_id
Response (success): Cart projection with cart_id, version, currency, lines, subtotal_minor, tax_minor, fulfillment_minor, discount_minor, discounts, total_minor, geo_ok, status.
Discounts (apply_adjustment)
An apply_adjustment code is stored on the cart and re-evaluated by your pricing
provider on every reprice, via PricingProvider::resolve_discounts. The provider
decides what a code is worth; the orchestrator never invents a discount.
- The provider returns zero or more discounts, each with
code, optionaldescription,amount_minorand optionalline_id. - Returning an error rejects the code, and the
apply_adjustmentcommand fails with apricingerror. Use this for expired or ineligible campaigns. discount_minoris the sum of granted discounts, clamped so thattotal_minorcan never go below zero.total_minor = subtotal_minor + tax_minor + fulfillment_minor - discount_minor.- Because codes are re-evaluated on every reprice, a discount that stops being valid after a cart change disappears from the next projection.
A provider that does not implement resolve_discounts grants nothing, so codes
are accepted and recorded but change no money. UCP cart responses carry
discount_minor plus a discounts array, and advertise dev.ucp.shopping.discount
when at least one discount applies; ACP session and cart totals[] carry a discount entry.
Checkout execute (POST /api/v1/checkout/execute)
Request: CheckoutRequestDto — tenant_id, merchant_id, cart_id, cart_version, currency, optional customer, optional location, payment_intent (e.g. amount_minor, token_or_reference), idempotency_key.
MPP note:
- For machine payments, set
payment_intent.payment_method_typetompp. - Include
payment_intent.mpp_method(a lowercase method name, for examplestripeortempo) andpayment_intent.mpp_intent(for examplecharge). - Do not mix AP2 fields (
ap2_consent_proof,payment_handler_id) withpayment_method_type = mpp. - When the operator has not set
MPP_CHALLENGE_SECRET, put the credential inpayment_intent.token_or_reference. The payment provider gets it as sent.
MPP Payment challenges
With MPP_CHALLENGE_SECRET set, an MPP checkout is paid through the Payment HTTP authentication scheme (draft-httpauth-payment):
-
Send the checkout without a credential. The answer is
402 Payment RequiredwithCache-Control: no-store, an RFC 9457 problem body (type: https://paymentauth.org/problems/payment-required), and a challenge:WWW-Authenticate: Payment id="…", realm="shop.example.com", method="tempo", intent="charge", request="<base64url JSON>", expires="2026-11-26T12:05:00Z", digest="sha-256=:…:", header="Payment-Authorization", opaque="…"requestdecodes to{"amount": "<amount_minor>", "currency": "<lowercase ISO 4217>"}.digestis the RFC 9530Content-Digestof the exact body you sent.idis an HMAC over every other parameter, so none of them can be edited.
-
Pay, then resend the same body. Send the byte-identical body with
Payment-Authorization: Payment <base64url JSON>. The JSON is{ "challenge": { …the parameters echoed… }, "payload": { …method-specific proof… }, "source": "…" }, as the draft defines. The credential goes inPayment-AuthorizationbecauseAuthorizationalready carries your API bearer token. -
The orchestrator checks the credential. The challenge must be bound by this deployment, unexpired, issued for this body, and unused. The orchestrator then claims its
idonce and hands the credential to your payment provider astoken_or_reference. The provider verifies the method-specific proof. -
On success, you get
200with the transaction result,Cache-Control: private, andPayment-Receipt: <base64url JSON>(status,method,timestamp,reference,challengeId).
Refusals are 402 with a fresh challenge and one of these problem types:
Problem type (under https://paymentauth.org/problems/) | Cause |
|---|---|
malformed-credential | The credential is not base64url JSON of the draft’s shape. |
invalid-challenge | The challenge was not issued by this deployment for this body, its parameters were edited, or its id was already used. |
payment-expired | The challenge’s expires has passed. |
verification-failed | The payment provider did not accept the proof. |
Sending more than one Payment-Authorization header is 400 (bad-request). Authentication runs first, so a bad bearer token is 401 and the credential is not consumed.
sequenceDiagram
participant Agent
participant Orchestrator
participant PSP as Payment provider
Agent->>Orchestrator: POST /checkout/execute (payment_method_type=mpp)
Orchestrator-->>Agent: 402 WWW-Authenticate: Payment (bound to body, amount, expiry)
Agent->>Agent: pay with the method, build credential
Agent->>Orchestrator: same body + Payment-Authorization: Payment …
Orchestrator->>Orchestrator: verify binding, expiry and digest, then claim the id once
Orchestrator->>PSP: authorize (credential as token_or_reference)
alt proof accepted
Orchestrator-->>Agent: 200 + Payment-Receipt
else proof refused
Orchestrator-->>Agent: 402 verification-failed + fresh challenge
end
MPP over MCP
The native MCP server (POST /api/v1/mcp/message) runs the same flow for the execute_checkout tool, in the MPP MCP transport’s JSON form, whenever MPP_CHALLENGE_SECRET is set:
- Without a credential the call fails with JSON-RPC error
-32042(Payment Required).error.data.challenges[0]is the challenge as a JSON object,error.data.problemthe RFC 9457 problem. The challenge has noheaderparameter, and itsdigestcovers the JCS-canonical toolargumentsinstead of an HTTP body. - Retry with the same
argumentsand the credential object (not base64url) inparams._meta["org.paymentauth/credential"]. - On success the transaction result carries
_meta["org.paymentauth/receipt"]with the same fields asPayment-Receipt. - Refusals are
-32042with a fresh challenge and the problem types above; a proof your payment provider refuses is-32043.
The MCP binding has the full wire shapes. MPP is not available on the UCP, ACP or A2A checkout bindings: none of those specifications defines an MPP handler, instrument or message part (conformance matrix).
Response (success): Transaction result with transaction_id, status, totals_breakdown, payment_reference, receipt_payload, correlation_id, payment_state, order_id.
Amount integrity
Before anything is authorized, the orchestrator re-runs pricing, tax and discount resolution against your providers and refreshes the cart snapshot. The refreshed total — not the total the cart happened to be carrying — is what may be charged.
payment_intent.amount_minormust equal that total exactly. Anything else is refused with422and codeAMOUNT_MISMATCH; the message states the amount the cart actually costs.- A rejected request does not consume its
idempotency_key, so the caller can immediately retry with the corrected amount under the same key. - A stale price is therefore caught at checkout rather than silently under-collected. Re-read the cart (
get_cart) to see the refreshed totals;cart_versionis unchanged because the cart’s contents did not change.
sequenceDiagram
participant Agent
participant Orchestrator
participant Providers as Pricing / Tax
Agent->>Orchestrator: POST /checkout/execute (amount_minor)
Orchestrator->>Providers: re-price, re-tax, re-discount
Providers-->>Orchestrator: current total
alt amount_minor == current total
Orchestrator->>Orchestrator: authorize and capture
Orchestrator-->>Agent: 200 transaction result
else mismatch
Orchestrator-->>Agent: 422 AMOUNT_MISMATCH (idempotency key released)
end
ACP REST bodies (2026-04-17)
/api/v1/acp/checkout_sessions and /api/v1/acp/carts take and return the ACP 2026-04-17 bodies exactly; requests are validated against the official ACP JSON Schema and anything outside it (including the orchestrator’s earlier merchant_id, tenant_id and amount_minor fields) is 400 invalid_payload. The same code serves the ACP MCP binding.
POST /api/v1/acp/checkout_sessions
API-Version: 2026-04-17
Idempotency-Key: 7f3c...
{ "currency": "usd", "line_items": [{ "id": "demo-tee" }, { "id": "demo-tee" }], "capabilities": {} }
- Items. ACP items carry no quantity: each
line_items[]entry is one unit, so the example is one line withquantity: 2. - Merchant and tenant. ACP bodies name neither: the session belongs to the authenticated caller’s tenant and to
UCP_DEFAULT_MERCHANT_ID(400 merchant_requiredwhen unset). - Responses. A
CheckoutSessionwithprotocol.version,capabilities,status(ready_for_paymentwith items,not_ready_for_paymentwithout,canceled),line_items[](item.id,quantity,unit_amount,totals[]),totals[](subtotal,discount,fulfillment,tax,total),fulfillment_options,messagesandlinks. - Complete. Send
payment_data.handler_idandpayment_data.instrument.credential.token, optionalbuyer. The amount is the session’s total, the idempotency key is theIdempotency-Keyheader, and the answer isCheckoutSessionWithOrder(status: completed,order { id, checkout_session_id, permalink_url }). The same key replays the same order; a key spent on another session is422 idempotency_conflict. - Carts.
CartCreateRequest/CartUpdateRequestholdline_items(and optionalbuyer); aCarthasid,currency(UCP_CATALOG_CURRENCY;400 currency_requiredwhen unset),line_itemsandtotals. A canceled cart is gone (404), since ACP carts have no status. - Errors. Every failure is an ACP
Error:{ "type": "invalid_request", "code": "session_not_found", "message": "...", "param": "$.id" }. Codes:missing_api_version/unsupported_api_version(withsupported_versions),idempotency_key_required,invalid_json,invalid_payload(with a JSONPathparam),merchant_required,currency_required,session_not_found/not_found(404),forbidden(403, another tenant’s session),session_not_cancelable(405),idempotency_conflict(422),payment_declined(402,processing_error),unsupported_payment_method. - Headers. The
Idempotency-Keyis echoed on success.
MCP transport rules (all MCP endpoints)
POST /api/v1/mcp/message, POST /api/v1/ucp/mcp and POST /api/v1/acp/mcp follow MCP 2026-07-28 Streamable HTTP. A client on 2026-07-28 sends MCP-Protocol-Version: 2026-07-28, Mcp-Method (the body’s method) on every request and Mcp-Name (the tool name, or the resource URI) on tools/call and resources/read; a missing or different value is HTTP 400 with JSON-RPC -32020, an unsupported version 400 with -32022, an unknown method 404 with -32601. Clients on 2025-11-25 or 2024-11-05 (or sending no version header) are served as before. A request carrying an Origin header is refused with 403 unless that origin is listed in MCP_ALLOWED_ORIGINS; server-side agents send no Origin and are unaffected. GET and DELETE are 405. See MCP binding.
UCP MCP binding (POST /api/v1/ucp/mcp)
UCP platforms that use MCP (UCP’s services/shopping/mcp.openrpc.json) call the checkout, cart, catalog and order operations as MCP tools at POST /api/v1/ucp/mcp, listed in /.well-known/ucp as the mcp transport of dev.ucp.shopping. The tools run the same code as the REST binding and return the same UCP bodies, in result.structuredContent. Each call carries arguments.meta["ucp-agent"].profile; complete_checkout, cancel_checkout and cancel_cart also need a UUID meta["idempotency-key"]. See MCP binding for tools, errors and metrics.
3DS2 step-up (UCP actions and ACP delegate authentication)
When the payment provider wants the buyer authenticated with 3DS2 before it authorizes, the checkout pauses instead of failing. Nothing is charged until the authentication result is known, and the idempotency key keeps answering with the pending step-up. This only happens when the deployment’s payment provider supports it, which discovery says: dev.ucp.common.payment.authentication in /.well-known/ucp, capabilities.intervention_types: ["3ds"] in /.well-known/acp.json. Test it in development with the mock tokens tok_3ds_challenge (challenge, then authenticated), tok_3ds_device_data (device data collection, then authenticated), tok_3ds_pending (never finishes) and tok_3ds_denied.
UCP (REST, MCP and A2A). complete_checkout (MCP and A2A) returns the checkout with status: complete_in_progress and an action; REST complete returns status: authentication_required and payment_state: authentication_pending with an authentication object, and Get Checkout shows the same UCP checkout:
{
"status": "complete_in_progress",
"actions": {
"dev.ucp.common.payment.three_ds_challenge": [
{ "id": "three_ds_challenge-3ds_...", "config": { "payment_instrument_id": "pi_card_1", "url": "https://psp.example/3ds/..." } }
]
},
"payment": { "instruments": [ { "id": "pi_card_1", "handler_id": "card", "type": "card", "selected": true } ] }
}
Open config.url in the surface the extension describes (invisible for device_data_collection, buyer-facing for three_ds_challenge). After action.done, call Get Checkout (GET /api/v1/ucp/checkout-sessions/:id or get_checkout): it asks the provider for the result and answers completed with the order, or keeps complete_in_progress while the provider is still waiting, or returns the cart status with a payment_failed message if authentication failed. Do not call complete again while it is in progress. To point the action at your instrument over REST, send payment_instrument_id in the complete body. When the deployment negotiates platform profiles (UCP_PROFILE_NEGOTIATION lenient or strict), declare dev.ucp.common.payment.authentication (extending dev.ucp.shopping.checkout) in your profile: without it the actions are withheld and the checkout answers with a recoverable payment_failed message instead, so complete again with another instrument.
ACP (REST and MCP). Complete Checkout Session returns the CheckoutSession with status: authentication_required, authentication_metadata (acquirer_details, directory_server) and a requires_3ds message, and Retrieve shows the same. Run delegate authentication with your authentication provider, then complete again (new Idempotency-Key, or a new meta.idempotency_key over MCP) with the result:
{
"payment_data": {
"handler_id": "card_tokenized",
"instrument": { "type": "card", "credential": { "type": "spt", "token": "spt_..." } }
},
"authentication_result": {
"outcome": "authenticated",
"outcome_details": { "three_ds_cryptogram": "AAAB...", "electronic_commerce_indicator": "05", "transaction_id": "...", "version": "2.2.0" }
}
}
Only authenticated and attempt_acknowledged lead to an order (completed, with order); other outcomes answer 402 payment_declined, and Retrieve then shows a payment_declined message. outcome_details is required for authenticated, attempt_acknowledged and informational (400 invalid_payload otherwise). Sending a result when nothing is pending is 409 authentication_not_pending. Repeating the result returns the same outcome.
A pause expires after 15 minutes (timed_out). A cart changed while the buyer authenticates is not charged (auth_failed).
Platform profile negotiation (UCP-Agent)
UCP platforms name their own profile on every request: the UCP-Agent header on the REST binding, and meta["ucp-agent"].profile on the MCP binding.
POST /api/v1/ucp/checkout-sessions
UCP-Agent: profile="https://platform.example/profiles/shopping-agent.json"
The header is an RFC 8941 dictionary; only its profile string is read. What the orchestrator does with it depends on UCP_PROFILE_NEGOTIATION:
| Mode | Behaviour |
|---|---|
off (default) | Nothing is fetched. Responses list every capability the operation uses, as before. The MCP binding still requires an http(s) profile URL. |
lenient | The profile is fetched and negotiated. When that works, responses list only negotiated capabilities. When it fails (no header, unreachable, malformed, unsupported version, operation outside the intersection), the failure is counted and the request proceeds unnegotiated. Use it to see what strict would refuse before you switch. |
strict | UCP 2026-08-25 behaviour: every failure refuses the request with the errors below. |
sequenceDiagram
participant P as UCP platform
participant O as Orchestrator
participant PP as Platform profile host
P->>O: request + UCP-Agent profile URL
alt profile cached (60 s to 1 h)
O->>O: reuse cached profile
else
O->>PP: GET profile (HTTPS, public address, no redirects, 5 s, 256 KiB)
PP-->>O: profile + Cache-Control max-age
end
O->>O: check ucp.version, intersect capabilities
O-->>P: response whose ucp.capabilities lists only negotiated capabilities
Version. The platform’s ucp.version must be 2026-08-25 or one of the older versions in our profile’s supported_versions (2026-04-08, 2026-01-23, 2026-01-11). Capabilities match only at equal versions, and this deployment serves its capabilities at 2026-08-25, so a platform must list 2026-08-25 capability versions to negotiate any.
Intersection. A capability is negotiated when both profiles declare it with a common version; the highest common version is used. Extensions (discount, fulfillment) are dropped when none of the capabilities they extend survived, repeatedly until nothing changes. An operation whose own capability (checkout, cart, order, catalog.search, catalog.lookup) is not negotiated gets a capabilities_incompatible error in strict mode.
Errors (strict):
| Situation | REST | MCP |
|---|---|---|
No UCP-Agent header, malformed header, URL not HTTPS, or a host resolving to a private or special-use address | 400 {"code":"invalid_profile_url","content":"..."} | HTTP 400, -32001, data.code: invalid_profile_url |
Profile cannot be fetched (DNS, connect, timeout, non-200, redirect) | 424, profile_unreachable | HTTP 424, -32001 |
Profile is not a platform profile (ucp.version, ucp.services, ucp.payment_handlers required) or too large | 422, profile_malformed | HTTP 422, -32001 |
Platform’s ucp.version not supported | 422, version_unsupported | HTTP 422, -32001 |
| The operation’s capability is not in the intersection | 200 with a UCP error response: ucp.status: error, messages[0].code: capabilities_incompatible | Result with the same UCP error response |
Caching. A profile is reused for its Cache-Control: max-age, at least 60 s and at most 1 h; a failed fetch is retried after 15 s. Up to 256 profile URLs are cached per replica.
Fetch safety. Profile URLs come from callers, so the fetch accepts only https URLs without credentials or fragments, resolves the host once and refuses loopback, private, link-local (including 169.254.169.254), CGNAT, documentation, multicast and other special-use addresses, then connects only to the checked addresses. It follows no redirects, uses no proxy, times out after 3 s (connect) / 5 s (total), and stops reading at 256 KiB. Requests that fail authentication never cause a fetch. The pod needs egress on port 443 to platforms’ profile hosts (the shipped NetworkPolicy allows it).
Metrics. orchestrator_operation_calls_total / orchestrator_operation_latency_seconds with operation="ucp_negotiation_rest" or "ucp_negotiation_mcp" and status = negotiated, invalid_profile_url, profile_unreachable, profile_malformed or version_unsupported; operation="ucp_profile_fetch" with status = success, invalid_url, prohibited_address, unreachable, http_status, too_large (fetch latency); counters ucp_negotiation_total, ucp_profile_cache_hit_total, ucp_profile_cache_miss_total, ucp_negotiation_capabilities_incompatible_total and ucp_negotiation_lenient_bypass_total.
ACP MCP binding (POST /api/v1/acp/mcp)
ACP agents that use MCP (ACP 2026-04-17 openrpc.agentic_checkout.json) call create_checkout_session, get_checkout_session, update_checkout_session, complete_checkout_session and cancel_checkout_session at POST /api/v1/acp/mcp; /.well-known/acp.json lists the mcp transport, and the URL is given out of band. Arguments are meta (api_version required, idempotency_key for complete, optional merchant_id), id and payload (the ACP 2026-04-17 request body, validated against the ACP schema). Results are ACP CheckoutSession objects; errors are JSON-RPC -32000 with the ACP Error in data. Sessions are shared with the REST binding. See MCP binding.
Completed and canceled checkouts
A checkout that placed its order is final, and so is a canceled one. Reading it back answers completed with the order (UCP order.id / permalink_url; ACP order on the CheckoutSession) or canceled. Changing it is refused on every binding:
| Binding | Completed | Canceled |
|---|---|---|
| UCP REST (update, cancel, complete) | 409 CHECKOUT_COMPLETED | 409 CART_CANCELED |
UCP MCP and A2A (incl. add_to_checkout) | error response, checkout_completed, severity: unrecoverable | cart_canceled, unrecoverable |
| ACP REST and MCP (update, complete) | 409 checkout_session_completed | 409 checkout_session_canceled |
| ACP cancel | 405 session_not_cancelable | 405 session_not_cancelable |
A retry of the original complete with its own idempotency key still replays the outcome. Start a new checkout to buy again.
UCP response bodies
Cart, checkout session, and order bodies validate against the UCP 2026-08-25 schemas (shopping/cart.json, shopping/checkout.json, shopping/order.json):
line_items[]:item: { id, title, price }(unit price in minor units),quantity, andtotals[].title,unit_price_minorandtotal_minorremain on cart and checkout lines as aliases.totals[]: typed integer amounts in minor units — exactly onesubtotaland onetotal, plusdiscount(negative, only when something was taken off),fulfillment(when a paid option is selected) andtax. The*_minorfields remain as aliases.- Checkout
status:incomplete(empty or not yet started),ready_for_complete,complete_in_progress(paused for 3DS2, withactions),completed(after a 3DS2 checkout finished, withorder), orcanceled. Checkout responses also carrylinks[]and the deployment’sucp.payment_handlers. Cart responses keep the orchestrator’sdraft/checkout_ready/canceled. - Orders:
checkout_idnames the checkout session; each line hasquantity: { original, total, fulfilled }andstatus(processing,fulfilled, orremovedfor a cancelled order);fulfillmentis present with emptyexpectations/events(order history is inevents).
Fulfillment selection (POST /api/v1/ucp/cart/:id/fulfillment)
Request: method_type (shipping or pickup), destination, optional line_item_ids (defaults to all lines), optional selected_option_id.
- Shipping destination:
{ "id": "dest_1", "street_address": "...", "address_locality": "...", "address_region": "...", "address_country": "...", "postal_code": "..." }. - Pickup (retail) destination:
{ "id": "dest_1", "name": "<store name>" }.
Calling without selected_option_id returns quoted options for the method type without changing total_minor. Calling again with selected_option_id set to one of the quoted option ids selects it, adds its amount_minor to total_minor via fulfillment_minor, and replaces any prior selection for that method type.
The selected destination is also the location your geo provider sees. Setting or
changing a destination re-runs the geo check immediately, and every later reprice
passes the cart’s destination country, region and postal code — along with the
cart’s tenant and merchant — so a blocked destination shows up as geo_ok: false
rather than passing unnoticed.
The verdict is binding. execute_checkout re-takes it and refuses a blocked
destination with 403 and code: GEO_BLOCKED; nothing is authorized and the
cart keeps geo_ok: false.
{
"method_type": "shipping",
"destination": {
"id": "dest_1",
"street_address": "1 Market St",
"address_locality": "San Francisco",
"address_region": "CA",
"address_country": "US",
"postal_code": "94105"
},
"selected_option_id": "express"
}
Response (success): UCP cart envelope whose fulfillment object follows the UCP 2026-08-25 fulfillment schema: each method carries destinations[] (type: shipping_address with the postal fields, or type: business_location with name and optional address) and selected_destination_id; each option carries title, description: { "plain": … }, and totals: [{ "type": "total", "amount": <minor units> }] (plus amount_minor, an orchestrator alias of the same amount); groups[].selected_option_id is set once selected. Selecting an option id that was not part of the quoted set returns an error rather than a silent no-op.
"fulfillment": {
"methods": [{
"id": "shipping", "type": "shipping", "line_item_ids": ["line_1"],
"destinations": [{ "type": "shipping_address", "id": "dest_1", "postal_code": "94105", "address_country": "US" }],
"selected_destination_id": "dest_1",
"groups": [{
"id": "group_1", "line_item_ids": ["line_1"], "selected_option_id": "express",
"options": [{ "id": "express", "title": "Express Shipping",
"description": { "plain": "Arrives in 2-3 business days" },
"totals": [{ "type": "total", "amount": 1000 }], "amount_minor": 1000 }]
}]
}]
}
A2A 1.0: Agent Card and SendMessage
GET /.well-known/agent-card.json (public, cacheable) is the A2A 1.0 Agent Card. It lists three interfaces — {base}/api/v1/a2a (HTTP+JSON, 1.0) and {base}/api/v1/a2a/jsonrpc (JSONRPC, 1.0 and 0.3) — capabilities.streaming: true, the UCP extension (see UCP’s A2A binding), and the skills this deployment can run: cart, checkout, order-lookup, ucp-checkout, and identity-linking when an identity provider is configured. When the deployment requires bearer auth, the card says so in securitySchemes/securityRequirements. /.well-known/ucp links it as orchestrator.a2a_agent_card.
POST /api/v1/a2a/message:send carries one of the existing capability envelopes in a DataPart and answers synchronously with an agent Message whose DataPart holds the result (the same body the matching /a2a/* route returns). Which skill runs is read from the envelope: an identity capability links identity, payload.order_id looks up an order, payload.command runs a cart command, anything else is a checkout. Pass contextId to thread several messages; a new one is assigned otherwise.
sequenceDiagram
participant C as A2A client
participant O as Orchestrator
C->>O: GET /.well-known/agent-card.json
O-->>C: AgentCard (HTTP+JSON interface, skills)
C->>O: POST /api/v1/a2a/message:send (A2A-Version: 1.0, DataPart envelope)
O->>O: same normalizer, authz, idempotency as /a2a/* routes
O-->>C: {"message": {"role": "ROLE_AGENT", "parts": [{"data": result}]}}
POST /api/v1/a2a/message:send HTTP/1.1
A2A-Version: 1.0
Content-Type: application/a2a+json
Authorization: Bearer <token>
{"message": {"messageId": "msg-1", "role": "ROLE_USER", "contextId": "ctx-7",
"parts": [{"mediaType": "application/json", "data": {
"capability": "dev.ucp.shopping.checkout",
"payload": {"command": {"kind": "create_cart", "merchant_id": "m1", "currency": "USD"}}}}]}}
Errors use A2A’s google.rpc.Status shape, {"error": {"code", "status", "message", "details": [{"@type": "type.googleapis.com/google.rpc.ErrorInfo", "reason", "domain"}]}}:
| HTTP | reason | When |
|---|---|---|
| 400 | VERSION_NOT_SUPPORTED | A2A-Version is missing (A2A reads that as 0.3) or not 1.0 |
| 400 | INVALID_PARAMS | Not JSON, no messageId, role not ROLE_USER, or no DataPart |
| 400 | UNSUPPORTED_OPERATION | An operation other than message:send / message:stream, or GET /extendedAgentCard |
| 400 | PUSH_NOTIFICATION_NOT_SUPPORTED | Any /tasks/{id}/pushNotificationConfigs operation |
| 404 | TASK_NOT_FOUND | GetTask, CancelTask, SubscribeToTask, or a message that names a taskId |
| 4xx/5xx | orchestrator code (e.g. NOT_FOUND, AMOUNT_MISMATCH), domain commerce-orchestrator | The operation itself failed; the HTTP status matches the REST route |
GET /api/v1/a2a/tasks (ListTasks) is always empty: the agent never creates tasks. Push notifications, the extended card, the gRPC binding and Agent Card signatures are not offered; the card says so.
Streaming (SendStreamingMessage)
POST /api/v1/a2a/message:stream takes the same request as message:send and answers text/event-stream. Because the agent replies with a Message, the stream holds exactly one event and then closes, as A2A 1.0 §3.1.2 requires:
HTTP/1.1 200 OK
Content-Type: text/event-stream
data: {"message":{"messageId":"…","contextId":"ctx-7","role":"ROLE_AGENT","parts":[{"data":{…},"mediaType":"application/json"}]}}
Errors (wrong version, bad message, a failed operation) are found before the stream opens and come back as the ordinary application/a2a+json error above, never as an event. Each stream is counted in the orchestrator_open_streams{stream="a2a_message_stream"} gauge while it is open.
JSON-RPC binding
POST /api/v1/a2a/jsonrpc takes one JSON-RPC 2.0 request per POST:
- With
A2A-Version: 1.0:SendMessage(result{"message": …}),SendStreamingMessage(one SSE event whosedatais a full JSON-RPC response),GetTask/CancelTask/SubscribeToTask(-32001),ListTasks(empty), the push config methods (-32003) andGetExtendedAgentCard(-32004). - With no
A2A-Version(A2A 0.3):message/sendandmessage/streamwith 0.3 messages ("kind": "message","role": "user", parts{"kind": "data", "data": …}), andtasks/get/tasks/cancel(-32001).
A 1.0 method without A2A-Version: 1.0 is -32009; an unknown method -32601; a bad message -32602. Refusals (401, 403, 409) keep their HTTP status; other errors come back in a 200, with error.data.reason and error.data.domain as in the HTTP+JSON ErrorInfo.
UCP’s A2A binding (checkout)
UCP platforms that speak A2A drive checkout with UCP’s own message shapes (specification/shopping/checkout/a2a). /.well-known/ucp lists the binding as {"transport": "a2a", "endpoint": "{base}/.well-known/agent-card.json"} under dev.ucp.shopping, and the Agent Card advertises the extension https://ucp.dev/2026-08-25/specification/reference with params.capabilities["dev.ucp.shopping.checkout"].
Send every request with UCP-Agent: profile="https://…" (required) and X-A2A-Extensions (or A2A-Extensions) naming the extension URI, which is echoed back. A message is UCP when a DataPart has an action or a2a.ucp.* keys; anything else is the orchestrator’s own envelope as above. The binding is written against JSON-RPC message/send, which the JSON-RPC endpoint serves when no A2A-Version is sent; the same DataParts also work over HTTP+JSON and JSON-RPC SendMessage with A2A-Version: 1.0.
action | DataPart fields | Does |
|---|---|---|
add_to_checkout | product_id, quantity (default 1), optional currency, merchant_id | Adds the product to the context’s checkout, or starts one |
create_checkout | a2a.ucp.checkout: {currency, line_items[], merchant_id?} | New checkout |
get_checkout | — | Reads the context’s checkout |
update_checkout | a2a.ucp.checkout | Replaces the line items |
cancel_checkout | — | Cancels; cancelling again returns the cancelled checkout |
complete_checkout | a2a.ucp.checkout.payment (an instrument, or {instruments: [...]}), optional a2a.ucp.checkout.signals, optional a2a.ucp.checkout: {buyer} | Pays and places the order; the checkout comes back completed with order {id, permalink_url} |
The reply’s DataPart holds the checkout under a2a.ucp.checkout, and its contextId is the checkout id: send it back for the next turn. A checkout made over REST or MCP is driven over A2A by sending its id as the contextId (or as id in the DataPart), and an A2A checkout reads back over the others. add_to_checkout carries no merchant or currency, so configure UCP_DEFAULT_MERCHANT_ID and UCP_CATALOG_CURRENCY (or send merchant_id / currency).
sequenceDiagram
participant P as UCP platform
participant O as Orchestrator
P->>O: GET /.well-known/ucp
O-->>P: dev.ucp.shopping a2a → agent card URL
P->>O: message/send {action: add_to_checkout, product_id, quantity} (UCP-Agent, X-A2A-Extensions)
O->>O: run_ucp_create_checkout (same code as REST and MCP)
O-->>P: message {contextId: checkout id, data: {a2a.ucp.checkout}}
P->>O: message/send contextId, {action: complete_checkout} + {a2a.ucp.checkout.payment}
O->>O: run_ucp_complete_checkout
O-->>P: a2a.ucp.checkout {status: completed, order {id, permalink_url}}
{"jsonrpc": "2.0", "id": 3, "method": "message/send", "params": {"message": {
"role": "user", "kind": "message", "messageId": "e94a8c10-69f4-4c4c-b988-21a298302da6",
"contextId": "<checkout id>",
"parts": [
{"kind": "data", "data": {"action": "complete_checkout"}},
{"kind": "data", "data": {
"a2a.ucp.checkout.payment": {"id": "instr_1", "handler_id": "card", "type": "card",
"credential": {"type": "token", "token": "tok_visa"}},
"a2a.ucp.checkout.signals": {"dev.ucp.buyer_ip": "203.0.113.42"}}}]}}}
- Idempotency:
messageIdis the idempotency key. A retried message is answered with the first reply and not applied again; reusing amessageIdfor a different message is-32000/ HTTP409(IDEMPOTENCY_CONFLICT). Each replica remembers its last 10,000 messages; completion is also guarded by the checkout runner’s durable key. - Business errors (unknown checkout, validation, payment failure) are a normal reply whose
a2a.ucp.checkoutis a UCP error response:{"ucp": {"status": "error"}, "messages": [{"type": "error", "code": "not_found", …}]}. - Protocol errors: missing or invalid
UCP-Agentprofile-32001(data.code: invalid_profile_url); another tenant’s checkout-32000with HTTP403(data.reason: TENANT_MISMATCH); an unknown action or an AP2 mandate (ap2.checkout_mandate, not supported here)-32602. - Cart, catalog and order have no UCP A2A binding; use the REST or MCP bindings.
- Metrics:
orchestrator_operation_calls_total/orchestrator_operation_latency_secondswithoperation="a2a_ucp_<action>".
Identity linking (POST /api/v1/a2a/identity/link)
Request: A2A envelope with capability and payload:
capability:dev.ucp.common.identity_linking(legacydev.ucp.identity.linkingremains accepted)payload:tenant_id,merchant_id,agent_id,link_token, optionaluser_reference
Response (success): { "ucp": { "version": "...", "supported_versions": [...] }, "link_id": "...", "status": "linked" }.
Payment lifecycle (capture / void / refund)
Request: tenant_id, merchant_id, transaction_id, amount_minor, idempotency_key (and any other fields required by the DTO).
Response: { "success": true/false, "reference": "..." }.
Errors
Failed requests return JSON:
{ "error": "<message>", "code": "<CODE>" }
Common codes: BAD_REQUEST, UNAUTHORIZED, FORBIDDEN, NOT_FOUND, VALIDATION_ERROR, IDEMPOTENCY_CONFLICT, PAYMENT_ERROR, AMOUNT_MISMATCH, TENANT_MISMATCH (403, the cart or resource belongs to another tenant), GEO_BLOCKED (403, your geo provider refused the cart’s destination), MERCHANT_REQUIRED (400, a UCP cart or checkout named no merchant_id and UCP_DEFAULT_MERCHANT_ID is unset; ACP answers merchant_required), STORE_ERROR, RUNNER_ERROR, NOT_CONFIGURED (501, the deployment does not offer that capability), PAYMENT_DELEGATION_ERROR (502, the PSP failed). Use the HTTP status code (4xx/5xx) and code for handling.
ACP-specific: ACP checkout session and cart routes answer with ACP Error bodies instead (see ACP REST bodies). Every mutating ACP route (checkout_sessions create/update/complete/cancel, delegate_payment, carts create/update/cancel) requires a non-empty Idempotency-Key header; a missing or blank header returns 400 with code: idempotency_key_required.
Config reference (server-side)
The orchestrator is a middleware API layer. Operators configure where each downstream service lives. In production the server requires all of the following (see deploy/README.md):
| Variable | Description |
|---|---|
ENV | production to enable auth and real adapters. |
PUBLIC_BASE_URL | Public base URL advertised in discovery (e.g. https://orchestrator.example.com). |
DATABASE_URL | PostgreSQL connection string (e.g. postgres://orchestrator:secret@localhost:5432/orchestrator). |
AUTH_MODE | static (default) or jwt. |
AUTH_BEARER_TOKEN | Required when AUTH_MODE=static; clients send Authorization: Bearer <token>. |
AUTH_JWT_HS256_SECRET | Required when AUTH_MODE=jwt; JWT HS256 verification secret. |
CATALOG_BASE_URL | Catalog service base URL (e.g. http://catalog-service:8080). |
PRICING_BASE_URL | Pricing service base URL. |
TAX_BASE_URL | Tax service base URL. |
GEO_BASE_URL | Geo service base URL. |
PAYMENT_BASE_URL | Payment service base URL. |
RECEIPT_BASE_URL | Receipt service base URL. |
UCP_SIGNING_KEY_ID, UCP_SIGNING_KEY | Signing material (Ed25519 seed, or P-256 scalar with UCP_SIGNING_KEY_ALG=ES256); production will not start without them. |
Optional: AUTH_TENANT_ID, AUTH_CALLER_ID (default prod for static mode), AP2_TRUSTED_ISSUERS (comma-separated allowlist for strict AP2 issuer checks and JWT issuer checks), UCP_SIGNING_KEY_ALG, UCP_SIGNING_PREVIOUS_KEYS, UCP_AGENT_KEYS, UCP_AGENT_JWKS, and UCP_PAYMENT_HANDLERS (see Message signing), FULFILLMENT_BASE_URL, PAYMENT_DELEGATION_BASE_URL, IDENTITY_LINK_BASE_URL, EMBEDDED_CHECKOUT_URL, UCP_DEFAULT_MERCHANT_ID (the default merchant for every protocol whose payloads carry none: UCP carts and checkouts without a merchant_id, and ACP checkout sessions and carts, REST and MCP; a request value wins), UCP_CATALOG_CURRENCY (ISO 4217 currency for UCP catalog prices when the request has no context.currency, and for ACP carts) and MCP_ALLOWED_ORIGINS (comma-separated browser origins, or *, allowed to call the MCP endpoints; unset, any request with an Origin header is refused with 403), and UCP_PROFILE_NEGOTIATION (off, lenient or strict; see Platform profile negotiation). Capabilities backed by an optional service are advertised only when that service is configured; the endpoint returns 501 with code: NOT_CONFIGURED otherwise. Config can be loaded from a file (CONFIG_FILE or config.yaml) with env overrides.
AP2 note: this release aligns with AP2 0.2 (closed mandates plus optional open/HNP mandates with amount and currency constraints). Strict mode remains fail-closed.
Next steps
- Deploy the orchestrator using deploy/README.md and configure all six component base URLs so the service can call your catalog, pricing, tax, geo, payment, and receipt APIs.
- In production, set
ENV=production,PUBLIC_BASE_URL,DATABASE_URL, and auth variables for your selectedAUTH_MODE(AUTH_BEARER_TOKENorAUTH_JWT_HS256_SECRET).
Web Bot Auth agent identity
Web Bot Auth is an optional identity layer based on draft-ietf-webbotauth-httpsig-protocol-01, a work-in-progress specification. It identifies an agent operator; customer consent, tenant authorization and payment authority remain separate checks.
Configure server.web_bot_auth_directory_urls as a list of HTTPS key-directory URLs, or set the comma-separated environment override WEB_BOT_AUTH_DIRECTORY_URLS. An empty list disables this layer. With it enabled, all /api/v1/ requests need Web Bot Auth in addition to configured bearer/UCP checks. Discovery and health stay open. Deploy behind HTTPS, configure PUBLIC_BASE_URL, and preserve the public Host and request path at proxies.
Requests carry dictionary-form Signature-Agent, Signature-Input and Signature. Each accepted signature covers its own Signature-Agent dictionary member and either @authority or @target-uri. Its tag is web-bot-auth, its keyid is the JWK SHA-256 thumbprint, and created/expires are required. The local freshness policy permits at most 300 seconds of clock skew. Expired/not-yet-valid keys are rejected. Ed25519 and P-256 are supported. A supplied Content-Digest must match the body. Applications receive WebBotIdentity in request extensions.
Discovery fetches the configured HTTPS URL directly. Redirects, URL credentials, queries in configured URLs, private/special addresses and responses over 64 KiB are rejected. DNS is checked before connecting and pinned for TLS. Proxies are disabled. DNS/connect/read operations have timeouts. Cache lifetime follows max-age capped at 300 seconds; no-store/no-cache are honored. Key removal takes effect after cache expiry. Caches hold at most 64 URLs and each response at most 128 keys. Configure only operator-controlled directory URLs. Unknown URLs fail without an outbound request.
Missing/failed signatures return 403 with Accept-Signature. A valid signature proves control of a key published at the resolved URL; it grants no commerce scopes. Authority-only signatures remain reusable until expiry. For request-specific replay resistance, sign method, path/query, body digest and idempotency key, and use existing commerce idempotency. This layer has no durable nonce registry.
Metrics use orchestrator-observability: web_bot_auth_verified_total, web_bot_auth_rejected_total, and counts/errors/latency for web_bot_auth_verify and web_bot_auth_discovery. Credentials and keys are not logged. RSA, legacy bare-string Signature-Agent, directory redistribution proofs and Signed-Agent-Metadata policy are outside this profile.