orcaqubits/agentic-commerce-skills-plugins/ucp-embedded-checkout

Claude Code and agent skill by orcaqubits/agentic-commerce-skills-plugins

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

Implement UCP Embedded Checkout Protocol — iframe/webview-based checkout UI for human escalation using JSON-RPC 2.0 over postMessage. Use when the checkout status is requires_escalation and the buyer needs a merchant-hosted UI.

Install

npx vskill@latest install orcaqubits/agentic-commerce-skills-plugins/ucp-embedded-checkout

SKILL.md

UCP Embedded Checkout Protocol (EP)

Before writing code

Fetch live spec: Web-search site:ucp.dev specification checkout-embedded or fetch https://developers.google.com/merchant/ucp/guides/checkout/embedded for the exact JSON-RPC method definitions, handshake flow, and security requirements.

Conceptual Architecture

When Embedded Checkout Is Used

When a checkout reaches requires_escalation status, the agent cannot resolve the issue via API alone. The checkout response includes a continue_url — the Platform opens this URL in an iframe or webview so the buyer can interact with the merchant's checkout UI directly.

Communication Protocol

The iframe communicates with the host (Platform) using JSON-RPC 2.0 over `postMessage`. Both sides send and receive structured messages.

Key JSON-RPC Methods
MethodDirectionPurpose
ec.readyMerchant → HostHandshake; merchant declares which capabilities it delegates to the host
ec.startMerchant → HostCheckout UI is visible and ready
ec.payment.credential_requestMerchant → HostMerchant asks host to acquire a payment credential
ec.line_items.changeMerchant → HostCart was modified in the UI
ec.buyer.changeMerchant → HostBuyer details were updated
ec.completeMerchant → HostOrder was placed successfully
ec.messages.changeMerchant → HostErrors or warnings updated
ec.payment.instruments_change_requestMerchant → HostMerchant requests updated payment instruments
ec.payment.changeMerchant → HostPayment state was updated
ec.fulfillment.address_change_requestMerchant → HostMerchant requests updated fulfillment address
Handshake Flow
  1. Host loads continue_url in a sandboxed iframe
  2. Merchant sends ec.ready with a delegate array listing capabilities it wants the host to handle (e.g., ["payment.credential", "fulfillment.address_change"])
  3. Host acknowledges and provides delegated capabilities
  4. Merchant sends ec.start when UI is fully rendered
URL Parameters

The continue_url may include:

  • ec_version: Protocol version
  • ec_auth: Session validation token
  • ec_delegate: Comma-separated delegated actions
Security Requirements
  • CSP with frame-ancestors <host_origin> — merchant page must allow being framed only by the Platform
  • Strict postMessage origin validation on both sides
  • iframe sandbox attribute: allow-scripts allow-forms allow-same-origin with credentialless
  • HTTPS required for all URLs
  • Silent tokenization is strictly PROHIBITED when the trigger originates from the Embedded Checkout
W3C DOMException Error Codes

Embedded Checkout methods may reject with W3C DOMException error codes:

  • abort_error — The operation was aborted
  • security_error — The operation violates security constraints
  • not_supported_error — The requested capability is not supported
  • invalid_state_error — The object is in an invalid state for this operation
  • not_allowed_error — The operation is not allowed in the current context
Implementation Guidance

Business (iframe content):

  • Render checkout UI at the continue_url
  • Implement the JSON-RPC sender/receiver over postMessage
  • Send ec.ready on load, ec.start when visible
  • Delegate payment credential acquisition to the host when possible
  • Send ec.complete with order details when checkout finishes

Platform (host):

  • Open continue_url in a sandboxed iframe
  • Listen for postMessage events, parse JSON-RPC
  • Handle ec.payment.credential_request by invoking the payment provider
  • Handle ec.complete to update the agent's checkout state
  • Validate message origins strictly

Fetch the exact current method signatures from the live spec before implementing.

Security

  • Security scanPassed, 95 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

Repository stars
39
Repository forks
18
7-day trend score
18

Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/orcaqubits/agentic-commerce-skills-plugins/ucp-embedded-checkout/badge)](https://verified-skill.com/skills/orcaqubits/agentic-commerce-skills-plugins/ucp-embedded-checkout)

Something wrong with this skill or its page? Tell us.