Checkout API
2.1 Capability Identifier
The checkout capability namespace isdev.ucp.shopping.checkout. It is UCP’s most essential transaction capability, defining the complete flow from creating a shopping session to completing payment.
2.2 Checkout Session State Machine
A checkout session transitions through 6 well-defined states during its lifecycle:| State | Meaning | Can Transition To |
|---|---|---|
incomplete | Session created; buyer or product information is incomplete | requires_escalation, ready_for_complete, canceled |
requires_escalation | Human intervention required (age verification, high-risk review, inventory confirmation, etc.) | incomplete, ready_for_complete, canceled |
ready_for_complete | All necessary information is ready; session can be submitted | complete_in_progress, canceled |
complete_in_progress | Complete operation submitted; processing in progress | completed, incomplete |
completed | Transaction successfully completed; order created | Terminal state |
canceled | Transaction canceled | Terminal state |
requires_escalation state allows merchants to hand control to a human when the AI cannot process a scenario automatically (e.g., legal compliance confirmation for high-value goods). The fallback path from complete_in_progress to incomplete handles exceptions such as payment failures.
2.3 Five Operations
Create — Create Checkout Session
Get — Query Checkout Session
Update — Update Checkout Session
ready_for_complete.
Complete — Submit for Completion
ready_for_complete. After invocation, the status changes to complete_in_progress as the merchant asynchronously processes payment and order creation. On success, the status changes to completed; on failure, it falls back to incomplete.
Response:
Cancel — Cancel Session
completed and canceled).
2.4 ISO 4217 Amount Handling
UCP strictly requires all monetary amounts to be expressed in ISO 4217 minor units, avoiding floating-point precision issues:| Currency | currency_code | Minor Unit | Representation of $79.00 |
|---|---|---|---|
| US Dollar | USD | Cent (1/100) | 7900 |
| Euro | EUR | Cent (1/100) | 7900 |
| Japanese Yen | JPY | Yen (no decimals) | 79 |
| Kuwaiti Dinar | KWD | Fils (1/1000) | 79000 |
2.5 Embedded Checkout UI
When an AI agent cannot complete checkout in pure API mode (e.g., complex payment verification, 3D Secure authentication), UCP supports an embedded UI mode:| Mode | Description | Use Case |
|---|---|---|
| API mode | AI agent completes all operations directly via REST/MCP | Simple checkout, linked identity |
| Embedded UI | Merchant provides a checkout page URL for the AI agent to present to the user | Complex payment verification, first-time authorization |
requires_escalation state. The merchant returns a UI URL in the response:
2.6 Price Transparency Requirements
UCP mandates complete price transparency. The pricing object in a checkout session must include:| Field | Description | Required |
|---|---|---|
subtotal | Item subtotal | Yes |
shipping | Shipping cost | Yes (may be 0) |
tax | Tax amount | Yes (may be 0) |
discount | Discount amount | Conditional (required when a discount is applied) |
total | Final total price | Yes |
Next chapter: Identity Linking — OAuth 2.0 Authorization Code flow, token revocation, and scope management