ucp_update_checkout
Update a UCP checkout session. Send line_items to replace all lines (each line may name a variant_id), and/or fulfillment to set the delivery address (fulfillment.destination, which returns the shipping options) and choose one (fulfillment.selected_option_id, which adds shipping to the totals). Only allowed when status is 'incomplete'. Use ONLY for sessions created with ucp_create_checkout; for the standard flow use create_cart and select_shipping_option. Checkout guide: read the MCP resource trusteed://guides/checkout.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| meta | No | UCP request metadata. meta['ucp-agent'].profile = URL of the platform profile; it must be an https URL without credentials (at most 2048 characters). | |
| currency | No | ISO 4217 currency code (e.g. USD). Optional: defaults to the checkout's currency. | |
| agent_key | No | Sandbox credential from `create_sandbox_key`. Use this when your client cannot set an `Authorization: Bearer` header. | |
| line_items | No | Replacement line items (replaces all lines). Omit to leave the lines as they are. | |
| checkout_id | Yes | UCP checkout session ID (valid UUID) | |
| fulfillment | No | Delivery. Send destination first, then selected_option_id (or both in one call). | |
| idempotency_key | No | REQUIRED for this write unless sent as the `Idempotency-Key` header or `params._meta["trusteed/idempotency-key"]`. 1-128 chars from [A-Za-z0-9._:/-]. Reuse the same value when retrying the same operation. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | ||
| label | No | ||
| intent | No | ||
| status | Yes | ||
| totals | Yes | ||
| currency | Yes | ||
| next_step | No | Next-action code, not a tool name: provide_shipping_destination, refresh_shipping_rates, choose_shipping_option, ask_user_payment_method. | |
| created_at | Yes | ||
| expires_at | No | ISO-8601 UTC instant at which this checkout SESSION stops being usable. It is not a stock reservation and not a price guarantee. | |
| extensions | No | `warnings[]` with `code`, `message`, `severity`. | |
| line_items | Yes | ||
| updated_at | Yes | ||
| fulfillment | No | ||
| next_action | No | Only when a person must approve or pay: `url`, `kind`, `retry`. | |
| approval_url | No | ||
| idempotency_key | No | ||
| payment_options | No | When present, ask the person which option they want; never choose for them. | |
| next_step_message | No | ||
| expires_in_seconds | No | Whole seconds left on this checkout SESSION at response time (0 when already past). It is not a stock reservation and not a price guarantee. |