Skip to main content

Confirm Cart Response

Runtime response containing checkout handoff data after cart creation.

What This Example Demonstrates​

The response confirms that the commerce cart exists and asks the customer to continue. ACTION_REQUIRED means the runtime needs another explicit user decision before the journey advances; it does not mean the order or payment has completed.

How to Use It​

Persist cart.id and checkout.id in server-side journey state and render the supplied confirmation message. Use scope for the owning merchant/store instead of inheriting a collection-level store ID. Use the structured totals and items for review, but let the commerce backend remain authoritative. Record trace_id with the client request ID so support teams can follow the handoff across services.

{
"status": 200,
"body": {
"action": "ACTION_REQUIRED",
"content": "Your cart is ready. Please continue to checkout.",
"session_id": "{{session_id}}",
"checkoutData": {
"platform": "merchant_services",
"scope": {
"merchantId": "{{merchant_id}}",
"storeId": "{{store_id}}"
},
"cart": {
"id": "cart_01HX7WJVDGVK3Y9Q"
},
"checkout": {
"id": "chk_1234567890abcdef12345678"
},
"status": "checkout_created",
"totalQuantity": 1,
"totalAmount": "129.90",
"currency": "USD",
"items": [
{
"productId": "1234567890",
"sku": "JACKET-BLK-M",
"name": "Black Waterproof Hiking Jacket / Medium",
"quantity": 1,
"unitAmount": "129.90",
"lineAmount": "129.90"
}
]
},
"ui": {
"message": {
"id": "msg_checkout_confirm_001",
"role": "assistant",
"content": "Your cart is ready. Continue to checkout?",
"showActions": true,
"actionType": "checkout_confirm"
}
},
"trace_id": "trace_01HX7X0V2C7N3R3Q"
}
}