--- title: "Agentic Checkout API Integration" description: "Enable AI agents to process payments through Adyen." url: "https://docs.adyen.com/online-payments/agentic-commerce/agentic-checkout-integration" source_url: "https://docs.adyen.com/online-payments/agentic-commerce/agentic-checkout-integration.md" canonical: "https://docs.adyen.com/online-payments/agentic-commerce/agentic-checkout-integration" last_modified: "2025-12-23T10:11:00+01:00" language: "en" --- # Agentic Checkout API Integration Enable AI agents to process payments through Adyen. The Adyen Agentic Checkout API acts as a unified integration layer that creates a bridge between AI-driven shopping agents (like Gemini, ChatGPT, and Copilot) and your commerce ecosystems. You integrate with our API, and we handle the translation between different commerce protocols. This makes it so that you do not need to integrate with multiple protocols, while enabling you to continue processing payments with your existing Adyen integration. Our Agentic Checkout layer handles the complexity of orchestrating between diverse standards (like Google’s **Universal Commerce Protocol ([UCP](https://ucp.dev/))** and OpenAI’s **Agentic Commerce Protocol ([ACP](https://developers.openai.com/commerce/specs/checkout))**, currently the two most widely adopted protocols in the industry). ## Requirements | Requirement | Description | | -------------------- | ------------------------------------------------------------ | | **Integration type** | An existing [online payments](/online-payments) integration. | ## How it works For a visual diagram representation, go to [**Sequence diagrams** ](#sequence-diagrams). | Step | Name | Requirement | Endpoint | Direction | Purpose | Related ACP endpoint | Related UCP endpoint | | | ---- | ----------------------------------------------------------------------------------------- | --------------------------------------- | --------------------------------------------------------------------- | ------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- | - | | 1 | **[Agentic checkout configuration](?tab=t.a1hkdwq1y1zl#heading=h.kri3p5r39mf)** | **MANDATORY** (can be one-time request) | POST `/agentic/configuration` | Your server → Adyen | Configures the endpoints that the merchant wants to implement. | | | | | 2 | [**Create or Update session**](?tab=t.a1hkdwq1y1zl#heading=h.rj1eb0en6s83) | **MANDATORY** | POST `/agentic/sessions/{sessionId}` | Adyen → Merchant | Synchronizes stock and shipping data to maintain updated cart totals. | [Create session]() and [Update session]() | [Create checkout](https://ucp.dev/latest/specification/checkout/#create-checkout) and [Update checkout](https://ucp.dev/latest/specification/checkout/#update-checkout) | | | 3 | [**Commit session (pre payment validation)**](?tab=t.a1hkdwq1y1zl#heading=h.wx5n09l7t1yz) | OPTIONAL | POST `/agentic/sessions/{sessionId}/commit` | Adyen → Your server | Final pre-auth gate, sends payment data and risk signals to merchants. Is triggered before the payment. | [Complete session]() | [Complete checkout](https://ucp.dev/latest/specification/checkout/#complete-checkout) | | | 4 | [**Cancel session**](?tab=t.a1hkdwq1y1zl#heading=h.3enl42jbkm2u) | OPTIONAL | POST `/agentic/sessions/{sessionId}/cancel` | Adyen → Your server | Notifies merchants if the agentic checkout is aborted. | [Cancel session](https://www.agenticcommerce.dev/docs/reference/checkout#cancel-checkout-session) | [Cancel checkout](https://ucp.dev/latest/specification/checkout/#cancel-checkout) | | | 5 | [**Finalize session**](?tab=t.a1hkdwq1y1zl#heading=h.xw0o8ierlyro) | **MANDATORY** | Standard Webhook **OR** POST `/agentic/sessions/{sessionId}/finalize` | Adyen → Your server | Standard authorization webhook with extra agentic metadata. Is triggered after the payment. Merchant fulfills the order based on this event | [Complete session]() | [Complete checkout](https://ucp.dev/latest/specification/checkout/#complete-checkout) | | | 6 | **[Complete session (advanced flow)](?tab=t.a1hkdwq1y1zl#heading=h.fdhqlapu7nb1)** | **OPTIONAL** | POST `/agentic/sessions/{sessionId}/complete` | Adyen → Your server | Delivers payment data to the merchant, allowing the merchant to execute the payment directly by making a [/payments](https://docs.adyen.com/api-explorer/Checkout/latest/post/payments) request and fulfill the order in one synchronous step. | [Complete session]() | [Complete checkout](https://ucp.dev/latest/specification/checkout/#complete-checkout) | | | 7 | [**Post-Purchase Events**](?tab=t.a1hkdwq1y1zl#heading=h.tnqr6sdn5sh8) | OPTIONAL | POST `/agentic/sessions/{sessionId}/events` | Your server → Adyen | Push tracking/status updates for AI follow-up. | [Checkout webhooks](https://developers.openai.com/commerce/specs/checkout#webhooks) | [Order capability events](https://ucp.dev/latest/specification/order/#order-capability) | | ## 1. Agentic Checkout Configuration **Endpoint:** `POST /agentic/configuration`\ **Direction:** Your server → Adyen (API Call)\ **Requirement:** Mandatory Before processing agentic transactions, the merchant must register their endpoints/webhooks with Adyen. This is typically a one-time setup during onboarding or updated when the merchant’s infrastructure changes. **Example request to configure your endpoints and webhooks** ```bash curl https://commerce-suite-test.adyen.com/commerce-suite/agentic/configuration -H 'x-api-key: ADYEN_API_KEY' \ -H 'content-type: application/json' \ -d '{ "baseUrl": "https://api.testshop.com/adyen-integration", "features": { "enableCommitSession": false, "enableCancelSession": false, "enableFinalizeSession": true "enableCompleteSession": false }, "security": { "apiKey": "API_KEY_FOR_VALIDATION" } }' ``` **Example:** If `enableCommitEndpoint` is `true`, Adyen will attempt to call `{baseUrl}/agentic/sessions/{id}/commit`. If `false`, Adyen skips this step and proceeds directly to authorization. ## 2. Create or update session **Endpoint:** POST `/agentic/sessions/{sessionId}`\ **Direction:** Adyen → Your server\ **Requirement:** Mandatory It serves as the live calculator for the AI Agent to determine final amounts and stock availability. As the shopper interacts with the agent and provides a delivery address and changes quantities, Adyen calls this endpoint to ensure the agent has the most accurate data of the checkout session. This endpoint is used for: * **Price / totals confirmation:** Confirm the price and the total amount of the session. * **Dynamic Taxation:** If taxes must be calculated specifically at the street, zip-code, or regional level. * **Volatile Inventory:** To verify stock status in real-time before the shopper expresses a final intent to buy, preventing checkout failures. * **Variable Shipping:** If shipping costs fluctuate based on the specific delivery address or size/weight of the order. * **Upfront Order / Session Creation:** If the merchant prefers to create a "draft" order in their system as soon as the session begins, using the `sessionId` as a unique identifier. Request scenario: Adyen sends a request to your server. **Example request body to create or update a session, from Adyen to your server** ```json { "shoppingPlatform": "chatgpt", "currency": "USD", "shopper": { "firstName": "Simon", "lastName": "Hopper", "email": "s.hopper@example.com", "phoneNumber": "+15555555555" }, "lineItems": [ { "id": "item_123", "quantity": 2 } ], "fulfillment": { "selectedFulfillmentOptionId": "ship_standard" }, "deliveryAddress": { "street": "123 Main St", "city": "Anytown", "postalCode": "12345", "country": "US" }, "affiliateAttribution": {...} } ``` Reponse scenarios: your server returns a response to Adyen. **Example successful response (HTTP 200 OK)** ```json { "merchantAccount": "ADYEN_MERCHANT_ACCOUNT", "lineItems": [ { "id": "item_123", "quantity": 2, "status": "IN_STOCK", "amount": { "value": 30000, "currency": "USD" }, "taxAmount": { "value": 2000, "currency": "USD" }, "totalAmount": { "value": 32000, "currency": "USD" } } ], "totals": { "subtotal": { "value": 30000, "currency": "USD" }, "fulfillment": { "value": 1000, "currency": "USD" }, "tax": { "value": 2000, "currency": "USD" }, "total": { "value": 33000, "currency": "USD" } }, "fulfillmentOptions": [ { "id": "ship_standard", "type": "shipping", "title": "Standard Shipping", "subtitle": "3-5 Business Days", "carrier": "UPS", "amount": { "value": 1000, "currency": "USD" } } ], "messages": [ { "type": "info", "origin": "system" "content": "You will earn 50 points with this purchase!" } ], "links": [ { "type": "terms_of_use", "url": "https://www.your-shop.example.com/legal/terms-of-use" } ] } ``` **Example error response for an item that is out of stock (HTTP 422)** ```json { "reason": "OUT_OF_STOCK", "messages": [ { "type": "error", "content": "The **Premium Headphones** are currently out of stock." } ], "lineItems": [ { "id": "item_123", "status": "OUT_OF_STOCK", "quantity": 0 } ] } ``` ## 3. Commit session **Endpoint:** POST `/agentic/sessions/{sessionId}/commit`\ **Direction:** Adyen → Your server\ **Requirement:** Optional This a pre-payment check with your server. It is triggered after the shopper clicks "Pay", but before funds are authorized. This request includes payment data and risk signals that you can use to run their own risk checks. By returning **SUCCESS**, you provide a binding guarantee to fulfill the order. ### When this endpoint is required: * **Inventory Reservation:** Merchants who want to "lock" stock at this point. * **Risk Review:** Use `paymentMetadata` (BIN, Card Alias) for custom risk engine checks. * **Final Totals Validation:** Performs a definitive reconciliation of total amounts, including line-item pricing, taxes, and shipping fees. Request scenario: Adyen sends a request to your server. **Example request body to commit a session, from Adyen to your server** ```json { "lineItems": [ { "id": "item_123", "quantity": 2, "status": "IN_STOCK", "amount": { "value": 30000, "currency": "USD" }, "taxAmount": { "value": 2000, "currency": "USD" }, "totalAmount": { "value": 32000, "currency": "USD" } } ], "totals": { "subtotal": { "value": 30000, "currency": "USD" }, "fulfillment": { "value": 1000, "currency": "USD" }, "tax": { "value": 2000, "currency": "USD" }, "total": { "value": 33000, "currency": "USD" } }, "fulfillmentOptions": [ { "id": "ship_standard", "type": "shipping", "title": "Standard Shipping", "subtitle": "3-5 Business Days", "carrier": "UPS", "amount": { "value": 1000, "currency": "USD" } } ], "paymentMetadata": { "paymentMethod": "visa", "bin": "411111", "cardAlias": "alias_ABCD1234" }, "messages": [ { "type": "info", "origin": "system", "content": "You will earn 50 points with this purchase!" } ], "links": [ { "type": "terms_of_use", "url": "https://www.your-shop.example.com/legal/terms-of-use" } ] } ``` Reponse scenarios: your server returns a response to Adyen. **Example successful response (HTTP 200 OK)** ``` ``` **Example error response because of risk assessment (HTTP 422)** ```json { "reason": "RISK_REJECTED", "messages": [ { "type": "error", "code": "request_not_idempotent", "content": "Some optional error to include to the shopper." } ] } ``` **Example error response because the item is partially out-of-stock (HTTP 422)** ```json { "reason": "PARTIAL_STOCK", "messages": [ { "type": "error", "code": "out_of_stock", "content": "One of your items is no longer available." } ], "lineItems": [ { "id": "item_123", "status": "OUT_OF_STOCK", } ] } ``` ### Standardized Error Handling To ensure a consistent experience across different agents, merchants must use these standardized reason codes in their responses when returning a REJECTED status: | Http status | Reason | Line item status | Definition | Phase | | ----------- | -------------------- | --------------------------------------- | -------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------ | | **200** | *None* | **IN\_STOCK** | Transaction is valid. | create session / update session / commit | | **422** | **OUT\_OF\_STOCK** | **OUT\_OF\_STOCK** | Requested items are unavailable. | create session / update session / commit | | **422** | **PARTIAL\_STOCK** | **OUT\_OF\_STOCK** / **PARTIAL\_STOCK** | Only X of Y items are available. Or X is available but not for the requested quantity. | create session / update session / commit | | **422** | **INVALID\_ADDRESS** | | Shipping rules don't support the location. | create session / update session / commit | | **422** | **RISK\_REJECTED** | | Merchant's internal fraud engine blocked it. | create session / update session / commit | | **422** | **PRICE\_MISMATCH** | **PRICE\_MISMATCH** | The price has changed since the last fetch. | commit (in the session creation /update new prices and totals can be returned) | Message types: | Message Type | Example Content | | ------------ | ------------------------------------------------------------- | | **error** | "The delivery address provided is outside our shipping zone." | | **info** | "Your order includes a 1-year manufacturer warranty." | ## 4. Cancel session **Endpoint:** POST `/agentic/sessions/{sessionId}/cancel`\ **Direction:** Adyen → Your server\ **Requirement:** Optional **Request body:** empty\ **Response:** 204 (session was cancelled) / 409 (session couldn’t be cancelled) ### 5. Finalize session **Direction:** Adyen → Your server\ **Endpoint:** Standard Webhook **OR** POST `/agentic/sessions/{sessionId}/finalize`\ **Requirement:** Mandatory When the payment is successfully authorized, Adyen sends this trigger. **You should fulfill the order based on this event.** To ensure maximum flexibility for the your existing infrastructure, the fulfillment trigger can be handled either by the classic Adyen notification system or the faster `/agentic/sessions/{sessionId}/finalize` endpoint. #### **Implementation Options:** **1. Standard Webhook:** Best if you want to reuse your existing logic for webhook messages that include `eventCode`: **AUTHORISATION**. Adyen includes `additionalData.agentic.sessionId` in the body of the message, so that you can associate it with the AI session. **2. POST `/agentic/sessions/{sessionId}/finalize`:** This endpoint is optimized for low-latency and provides a clean, agent-specific payload identical in structure to the checkout commit request. **Example body of the request, from Adyen to your server** ```json { "lineItems": [ { "id": "item_123", "quantity": 2, "status": "IN_STOCK", "amount": { "value": 30000, "currency": "USD" }, "taxAmount": { "value": 2000, "currency": "USD" }, "totalAmount": { "value": 32000, "currency": "USD" } } ], "totals": { "subtotal": { "value": 30000, "currency": "USD" }, "fulfillment": { "value": 1000, "currency": "USD" }, "tax": { "value": 2000, "currency": "USD" }, "total": { "value": 33000, "currency": "USD" } }, "fulfillmentOptions": [ { "id": "ship_standard", "title": "Standard Shipping", "amount": { "value": 1000, "currency": "USD" }, "isSelected": true } ], "paymentMetadata": { "paymentMethod": "visa", "bin": "411111", "cardAlias": "alias_ABCD1234" }, "messages": [ { "type": "info", "content": "You will earn 50 points with this purchase!" } ], "links": [ { "type": "terms_of_use", "url": "https://www.your-shop.example/legal/terms-of-use" } ] } ``` Response: your server sends HTTP 204 Acknowledge ### 6. Complete session (Advanced Flow) **Direction:** Adyen → Your server\ **Endpoint:** POST `/agentic/sessions/{sessionId}/complete`\ **Requirement:** Optional Designed for the “Advanced Flow”, this endpoint redefines the orchestration model. Instead of Adyen functioning as the entity that executes payment authorization, it delivers the transaction token (such as a token, depending on the payment handler) directly to you. You then have responsibility for using this data to make a POST [/payments](https://docs.adyen.com/api-explorer/Checkout/latest/post/payments) request to Adyen and fulfill the order in a single step. When you receives the payment result from Adyen, you trigger order fulfillment in your order management system. **Example request body to complete the session, from Adyen to your server** ```json { "lineItems": [ { "id": "item_123", "quantity": 2, "status": "IN_STOCK", "amount": { "value": 30000, "currency": "USD" }, "taxAmount": { "value": 2000, "currency": "USD" }, "totalAmount": { "value": 32000, "currency": "USD" } } ], "totals": { "subtotal": { "value": 30000, "currency": "USD" }, "fulfillment": { "value": 1000, "currency": "USD" }, "tax": { "value": 2000, "currency": "USD" }, "total": { "value": 33000, "currency": "USD" } }, "selectedFulfillmentOptionId": "ship_standard", "shopper": { "firstName": "Simon", "lastName": "Hopper", "email": "s.hopper@example.com", "phoneNumber": "+15555555555" }, "paymentData": { "token": "token_1234_abcd", "provider": "adyen" } } ``` Reponse scenarios: your server returns a response to Adyen. For a successful completion, your server returns HTTP 204 Acknowledge with no body. For a failed payment, your server returns HTTP 422 with a message about the failure. **Example response body for a failed payment** ```json { "reason": "REFUSED", "messages": [ { "type": "error", "code": "payment_refused", "content": "An optional error message to send to the shopper." } ] } ``` ## 7. Post-purchase events **Endpoint:** POST `/agentic/sessions/{sessionId}/events`\ **Direction:** Your server → Adyen (API request)\ **Requirement:** Optional You can push fulfillment status here, so that the AI agent can support the shopper after the purchase. For example, for answering questions like “what’s the status of my order?”. **Example request body about fulfillment status** ```json { "eventCode": "ORDER_SHIPPED", "payload": { "carrier": "Example Carrier", "trackingNumber": "carrier_abcd_1234", "trackingUrl": "https://carrier.example.com/track/carrier_abcd_1234" } } ``` Response: you get a HTTP 204 Acknowledge with no body. ## Testing We provide URLs for testing your integration with the Adyen Agentic Checkout API. ### Session creation **Url:** `https://commerce-suite-test.adyen.com/commerce-suite/acp/v1/{CompanyAccount}/checkout_sessions`\ **Headers:** Authorization: {apiKey}\ **Method:** POST\ **Role needed:** Commerce Suite API **Example request body for session creation** ```json { "currency": "USD", "buyer": { "first_name": "Simon", "last_name": "Hopper", "email": "s.hopper@example.com", "phone_number": "+15555555555" }, "items": [ { "id": "prod_123", "quantity": 2 }, { "id": "prod_456", "quantity": 1 } ], "fulfillment_address": { "name": "Simon Hopper", "line_one": "123 Main Street", "line_two": "Apt 1A", "city": "Anytown", "state": "CA", "postal_code": "12345", "country": "US" } } ``` ### Session update **Url:** `https://commerce-suite-test.adyen.com/commerce-suite/acp/v1/{CompanyAccount}/checkout_sessions/{sessionId}`\ **Headers:** Authorization: {apiKey}\ **Method:** POST\ **Role needed:** Commerce Suite API **Example request body for session update** ```json { "currency": "USD", "buyer": { "first_name": "fffa", "last_name": "Lovelace kff", "email": "adaffkff@example.com", "phone_number": "+31612345678" }, "items": [ { "id": "prod_123", "quantity": 2 } ], "fulfillment_address": { "name": "Simon Hopper", "line_one": "123 Main Street", "line_two": "Apt 1A", "city": "Anytown", "state": "CA", "postal_code": "12345", "country": "US" } } ``` ### Session cancel **Url:** `https://commerce-suite-test.adyen.com/commerce-suite/acp/v1/{CompanyAccount}/checkout_sessions/{sessionId}/cancel`\ **Headers:** Authorization: {apiKey}\ **Method:** POST\ **Role needed:** Commerce Suite API ### Get session **Url:** `https://commerce-suite-test.adyen.com/commerce-suite/acp/v1/{CompanyAccount}/checkout_sessions/{sessionId}`\ **Headers:** Authorization: {apiKey}\ **Method:** Get\ **Role needed:** Commerce Suite API ### Session complete **Url:** `https://commerce-suite-test.adyen.com/commerce-suite/acp/v1/{CompanyAccount}/checkout_sessions/{sessionId}/complete`\ **Headers:** Authorization: {apiKey}\ **Method:** POST\ **Role needed:** Commerce Suite API **Example request body for session complete** ```json { "payment_data": { "token": "P27P5Q9LM7MKDM92", "provider": "adyen" } } ``` ### Delegate payment endpoint **Url:**\ `https://pal-test.adyen.com/paltokenization/servlet/Recurring/Agentic/acp/v1/agentic_commerce/delegate_payment`\ **Headers:** Authorization: Bearer {apiKey}\ **Method:** Post\ **Role needed:** Commerce Suite API **Example request body for delegate payment** ```json { "payment_method": { "type": "card", "card_number_type": "fpan", "number": "4111111111111111", "exp_month": "03", "exp_year": "2030", "cvc": "737", "name": "Test User", "display_card_funding_type": "credit", "display_brand": "Visa", "display_last4": "1111", "metadata": { "issuing_bank": "Test Issuer" } }, "allowance": { "reason": "one_time", "max_amount": 1000000, "currency": "usd", "checkout_session_id": "cs_423488ffbcb047019d31bedcaa1c048f", "merchant_id": "ADYEN_MERCHANT_ACCOUNT", "expires_at": "2026-04-26T16:46:00Z" }, "billing_address": { "name": "Test User", "line_one": "123 Test Street", "city": "San Francisco", "state": "CA", "country": "US", "postal_code": "94105" }, "risk_signals": [ { "type": "card_testing", "score": 0, "action": "authorized" } ], "metadata": { "source": "manual_test", "environment": "sandbox" } } ``` ## Sequence diagrams For ACP: ```mermaid sequenceDiagram actor S as Shopper participant A as Shopping Agent participant V as Agent's Token Vault participant P as Adyen (Universal Translator) participant M as Your server Note over S, M: Stage 1: Create Checkout S ->> A: "I want to buy these headphones" A ->> P: [ACP] /checkout_session P ->> M: [POST] /agentic/sessions/{id} M -->> P: 200 SUCCESS (totals, shipping, inventory) P -->> A: Session ID + totals A -->> S: Displays Order Summary (Price/Stock) Note over S, M: Stage 2: Payment & Final Validation S ->> A: "Pay now" A ->> V: Instruct to delegate payment for Session {id} V ->> P: [ACP] /delegate_payment (Secure Data) P -->> V: Return psp_transaction_token V -->> A: Return psp_transaction_token A ->> P: [ACP] /checkout_session/{id}/complete (with psp_token) P ->> M: [POST] /agentic/sessions/{id}/commit M -->> P: 200 SUCCESS P ->> P: Execute Payment Authorization P ->> M: [POST] /agentic/sessions/{id}/finalize (or standard webhook) M -->> P: 200 ACK M ->> M: Trigger order fulfillment P -->> A: Final Status: SUCCESS A -->> S: "Order Confirmed! Ref: ORDR_2122" Note over S, M: Stage 4: Post-Purchase Flow M ->> P: [POST] /agentic/sessions/{id}/events P ->> A: Push tracking info to Agent A -->> S: "Your package is on the way! Link: [DHL Tracking]" ``` For ACP with the `/complete` endpoint (Advanced Flow): ```mermaid sequenceDiagram actor S as Shopper participant A as Shopping Agent participant V as Agent's Token Vault participant P as Adyen (Universal Translator) participant M as Your server Note over S, M: Stage 1: Create Checkout S ->> A: "I want to buy these headphones" A ->> P: [ACP] /checkout_session P ->> M: [POST] /agentic/sessions/{id} M -->> P: 200 SUCCESS (totals, shipping, inventory) P -->> A: Session ID + totals A -->> S: Displays Order Summary (Price/Stock) Note over S, M: Stage 2: Payment & Final Validation S ->> A: "Pay now" A ->> V: Instruct to delegate payment for Session {id} V ->> P: [ACP] /delegate_payment (Secure Data) P -->> V: Return psp_transaction_token V -->> A: Return psp_transaction_token A ->> P: [ACP] /checkout_session/{id}/complete (with psp_token) P ->> M: [POST] /agentic/sessions/{id}/complete (send psp_token) M ->> P: [POST] /payments (send psp_token) P -->> M: payment result M ->> M: Trigger order fulfillment M -->> P: payment result P -->> A: Final Status: SUCCESS A -->> S: "Order Confirmed! Ref: ORDR_2122" Note over S, M: Stage 4: Post-Purchase Flow M ->> P: [POST] /agentic/sessions/{id}/events P ->> A: Push tracking info to Agent A -->> S: "Your package is on the way! Link: [DHL Tracking]" ``` For UCP: ```mermaid sequenceDiagram actor S as Shopper participant A as Shopping Agent participant V as Agent's Token Vault participant P as Adyen (Universal Translator) participant M as Your server Note over S, M: Stage 1: Create Checkout S ->> A: "I want to buy these headphones" A ->> P: [POST] /checkout (line_items, buyer) P ->> M: [POST] /agentic/sessions/{id} M -->> P: 200 SUCCESS (totals, shipping) P -->> A: UCP Checkout Object A -->> S: Displays Order Summary Note over S, M: Stage 2: Tokenization & Completion S ->> A: "Pay now" A ->> V: Retrieve raw payment credentials V -->> A: (Secure Card Data) A ->> P: [POST] /checkout/{id}/complete (token: "ucp_tkn_8892") P ->> V: [POST] /detokenize (token: "ucp_tkn_8892") V -->> P: { "card": "41111", "type": "card" } P ->> M: [POST] /agentic/sessions/{id}/commit M -->> P: 200 SUCCESS (order: {id: ORDR_2122}) P ->> P: Execute Payment Authorization P ->> M: [POST] /agentic/sessions/{id}/finalize (or Standard Webhook) M ->> M: Trigger Order fulfillment P -->> A: UCP Checkout Object (status: completed) A -->> S: "Order Confirmed! Ref: ORDR_2122" Note over S, M: Stage 3: Post-Purchase Updates M ->> P: [POST] /agentic/sessions/{id}/events (tracking_info) P ->> A: Push Capability Event A -->> S: "Your package is on the way!" ```