Skip to main content

Confirm Cart Request

Runtime request sent from a frontend or BFF to confirm a cart.

What This Example Demonstrates​

This request converts the customer's reviewed local cart into a controlled structured runtime action. The protected BFF explicitly selects the reviewed cart Flow while preserving the current ACP session.

How to Use It​

Build data.items from the cart state the customer has just confirmed. Send canonical product IDs, SKUs, selected options, quantities, and store context. Revalidate price and availability in the commerce service instead of trusting display values from the browser.

Cart creation may be retried by networks or clients. Use the commerce service's idempotency contract where available so the same confirmation does not create duplicate carts.

{
"endpoint": "POST /api/v1/runtime/execute",
"description": "A customer BFF can send this to ACP Engine when the user confirms the local cart. The explicit Flow may call an approved Merchant Services cart tool.",
"headers": {
"Authorization": "Bearer {{token}}",
"Content-Type": "application/json"
},
"body": {
"version": "2026-08-22",
"agent_id": "{{agent_id}}",
"session_id": "{{session_id}}",
"resume_token": "{{resume_token}}",
"flow_id": "{{flow_id}}",
"channel": "web",
"input": {
"action": "CONFIRM_CART",
"storeId": "{{store_id}}",
"itemCount": 1,
"items": [
{
"id": "10012",
"productId": "1234567890",
"sku": "JACKET-BLK-M",
"name": "Black Waterproof Hiking Jacket / Medium",
"quantity": 1,
"price": "$129.90",
"image": "https://cdn.example.com/products/jacket-black-main.jpg",
"url": "https://store.example.com/products/black-waterproof-hiking-jacket?variant=medium",
"storeName": "Example Brand Store",
"selectedOptions": {
"color": "black",
"size": "M"
}
}
]
},
"client_capabilities": {
"actions": ["CART_UPDATED", "ACTION_REQUIRED", "APPROVAL_REQUIRED"]
},
"idempotency_key": "confirm-cart-{{session_id}}",
"mode": "sync"
}
}