UCP Protocol
Universal Commerce Protocol (UCP) — standardized checkout flow for AI agents with cart management, discount application, session tracking, and fulfillment.
Checkout Flow
UCP defines a four-step commerce flow that any AI agent can follow:
1. Create Checkout 2. Update Cart 3. Complete
┌────────────────┐ ┌────────────────┐ ┌────────────────┐
│ Session + Items│──▶│ + Discount │─▶│ Payment + Order│
└────────────────┘ └────────────────┘ └────────────────┘
4. Track Fulfillment
┌─────────────────────────────────────────────────────────┐
│ Shipping → In Transit → Delivered │
└─────────────────────────────────────────────────────────┘Python
from sardis import SardisClient
async with SardisClient(api_key="sk_...") as client:
# Create checkout
session = await client.ucp.create_checkout(
merchant_id="merchant_456",
line_items=[
{"name": "Widget", "quantity": 2, "unit_price_minor": 1500}
],
)
# Apply discount
await client.ucp.apply_discount(session.id, code="SAVE10")
# Complete
result = await client.ucp.complete_checkout(
session_id=session.id,
chain="base",
token="USDC",
)
print(f"Order: {result.order_id}")MCP Tools
| Tool | Description |
|---|---|
sardis_create_checkout | Start session |
sardis_update_checkout | Modify items |
sardis_complete_checkout | Complete and pay |
sardis_apply_discount | Apply discount |
sardis_track_fulfillment | Track shipment |
AP2 Protocol
Agent Payment Protocol (AP2) — the Google, PayPal, Mastercard, and Visa consortium standard for secure agent payments. Sardis verifies the full Intent → Cart → Payment mandate chain with signature validation and replay protection.
A2A Protocol
Agent-to-Agent (A2A) — Google-developed multi-agent communication protocol for payment coordination, capability discovery, and cross-agent financial messaging.