Skip to content

feat: Implement UCP commands - #250

Draft
kreese-stripe wants to merge 2 commits into
mainfrom
kreese/ucp-checkout-commands
Draft

feat: Implement UCP commands#250
kreese-stripe wants to merge 2 commits into
mainfrom
kreese/ucp-checkout-commands

Conversation

@kreese-stripe

@kreese-stripe kreese-stripe commented Aug 13, 2026

Copy link
Copy Markdown
Collaborator
  1. Search the catalog (ucp catalog search) — needs a query or at least one filter (brand/category/color/size/material/network-id/sku):
    node packages/cli/dist/cli.js ucp catalog search --query "running shoes" --test
    node packages/cli/dist/cli.js ucp catalog search --brand nike --limit 5 --test
    node packages/cli/dist/cli.js ucp catalog search --sku sku_123 --test

  2. Create a checkout (ucp checkout create) — needs --network-id and at least one --line-item:
    node packages/cli/dist/cli.js ucp checkout create
    --network-id profile_123
    --line-item "sku_id:sku_123,quantity:2"
    --test
    On success this returns a _next hint suggesting the follow-up complete command.

  3. Mint a Shared Payment Token for the checkout total:
    node packages/cli/dist/cli.js spend-request create
    --credential-type shared_payment_token
    --amount <checkout_total_cents>
    --context "Purchasing items from UCP checkout <checkout_id> for testing the UCP flow end to end"
    --request-approval --test

  4. Complete the checkout (ucp checkout complete ) — needs the approved SPT id:
    node packages/cli/dist/cli.js ucp checkout complete <checkout_id>
    --shared-payment-token <spt_id>
    --test

@kreese-stripe kreese-stripe changed the title Implement UCP commands feat: Implement UCP commands Aug 13, 2026
Real catalog search responses group results by product with the
checkout-relevant fields (profile_id, sku, price, availability)
nested under variants[0] rather than on the product itself, so the
interactive view was silently omitting them. Fall back to variant
fields, and render results as a table with dynamic column widths so
SKU and network id stay copyable for the next `ucp checkout create` step.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Committed-By-Agent: claude
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants