Private preview
Search products and complete payments with Universal Commerce Protocol Private preview
Search seller catalogs, obtain payment approval with a shared payment token, and complete purchases using the Link CLI over the UCP.
Use Link CLI to build an agent that discovers a product through the Universal Commerce Protocol (UCP), creates a checkout, obtains buyer approval for a shared payment token (SPT), and completes the purchase. Link CLI exposes native UCP commands, so your agent runs the full checkout flow without integrating with each seller directly.
Private preview
Join the preview waitlist to search the catalogs of sellers who have joined Agentic Commerce Suite and uploaded their catalog to Stripe. Catalog search doesn’t return every seller that supports UCP. Agentic Commerce Suite is in private preview, supports purchases of physical goods, and is available in the US, Canada, and select European countries.
Before you begin
Before you begin, make sure that:
- You’ve set up OAuth , including the payment _ methods. agentic scope. To authorize a local agent instead, see the link-cli repository .
- Your agent can run Link CLI commands directly or reach them through an MCP tool boundary.
How UCP checkout works
Your agent finds a product, confirms the price with the seller, gets the buyer’s approval to pay, and then completes the purchase:
- Your agent searches seller catalogs for what the buyer wants to buy.
- Your agent creates a checkout with the selected product and the buyer’s fulfillment details. The seller returns the authoritative cart and total.
- Your agent creates a spend request for a shared payment token and presents the purchase details to the buyer.
- The buyer approves the request, and Link returns the token.
- Your agent completes the checkout with the token.
The --schema calls in the following steps allow your agent to inspect the current input contract.
Search for a product
To find what the buyer wants to buy, inspect the current search schema, then run a global catalog search across all connected sellers. Translate the buyer’s request into a --query, which is required. Each result includes the seller profile that produced it:
Search the catalog
link-cli ucp catalog search --schema
link-cli ucp catalog search --query="{{SEARCH_QUERY}}"
For example, if the buyer asks for running shoes, search across every connected seller:
Search example
link-cli ucp catalog search --query="running shoes"
The response contains matching products from across connected sellers:
Catalog search response
{
"data": [
{
"id": "100076983",
"object": "acs.product",
"name": "New Balance 1906R Sneakers",
"variants": [
{
"object": "acs.product_variant",
"profile_id": "profile_1RExampleSeller",
"merchant_name": "Example Outfitters",
"price": {
"amount": 15500,
"currency": "usd"
},
"availability": {
"status": "in_stock"
}
}
]
}
]
}
After the buyer selects a product, save the following fields:
- id : The SKU to pass to checkout creation.
- variants[]. profile _ id ( profile _... ): The seller profile. Pass it to the checkout and spend request.
- variants[]. price and variants[]. availability. status : Confirm the item is in _ stock and show the price to the buyer before you request payment approval.
Before you create the checkout, verify the seller and product.
Create and review the checkout
Inspect the installed schema for the current checkout input shape, then create a checkout. Use the id and profile_id from the product the buyer selected. Pass each item as a --line-item with its sku_id and quantity, and provide the buyer’s --fulfillment-details so the seller can calculate shipping and tax:
Create a checkout
link-cli ucp checkout create --schema
link-cli ucp checkout create \
--network-id={{SELLER_PROFILE_ID}} \
--line-item="sku_id:{{PRODUCT_SKU}},quantity:{{QUANTITY}}" \
--fulfillment-details='{{FULFILLMENT_DETAILS}}'
For example, take the id and profile_id from the running-shoes search result and create a checkout for one pair with the buyer’s shipping address:
Create checkout example
link-cli ucp checkout create \
--network-id=profile_1RExampleSeller \
--line-item="sku_id:100076983,quantity:1" \
--fulfillment-details='{"name":"Jenny Rosen","address":{"line1":"123 Main St","city":"San Francisco","state":"CA","postal_code":"94111","country":"US"}}'
To buy more than one product, repeat --line-item for each SKU. The seller returns the authoritative cart, including the resolved line items, taxes, fulfillment options, and total.
Save the checkout token ( dcs_...) from the response. Before you create a spend request, verify the seller profile, the SKUs and quantity, the currency, and the final total against what the buyer expects, and use the checkout amount the seller returned. Stop if anything differs.
Request payment approval
Present the purchase details to the buyer by creating a spend request. Your agent must show the seller, selected products, quantity, currency, and final total before it requests approval.
Create a spend request
link-cli spend-request create \
--credential-type=shared_payment_token \
--amount={{CHECKOUT_AMOUNT}} \
--context="{{APPROVAL_CONTEXT}}" \
--network-id={{SELLER_PROFILE_ID}} \
--request-approval
The spend request starts in a pending state while it awaits approval. Save the returned spend request ID ( lsrq_...). The --request-approval flag requests approval in Link. Don’t attempt checkout completion while the request is pending, denied, or expired, or while it’s waiting on another action from the buyer. For the full set of spend request statuses, see Accept agent payments.
After the buyer approves the spend request, retrieve it:
Retrieve the spend request
link-cli spend-request retrieve lsrq_{{REQUEST_ID}} \
--interval 2 --max-attempts 300
After approval, the response includes the approved SPT ( spt_...):
Approved response
[
{
"id": "lsrq_1TlumsIM14ru2UNO7huBCrLz",
"status": "approved",
"credential_type": "shared_payment_token",
"shared_payment_token": {
"id": "spt_1Tlun3BfQCrp7lQIGDn7MwHw",
"valid_until": "2026-06-25T05:40:34Z"
}
}
]
Keep the shared payment token out of agent context
Save the approved SPT ( spt_...) outside the model context. Never place it in an agent transcript, code repository, screenshot, or bug report.
Complete and validate the checkout
Complete the matching checkout with the approved SPT:
Complete the checkout
link-cli ucp checkout complete dcs_{{CHECKOUT_TOKEN}} \
--shared-payment-token=spt_{{TOKEN}}
A successful completion returns the order details, including the completion status and an order status URL for tracking.
Confirm the completion response before you mark the run successful. Capture the checkout token, spend request ID, completion status, and any order or reconciliation identifier. Arrange a refund when appropriate.
