Skip to content

Commit c402463

Browse files
dkoch74ptiper
andauthored
docs: Correct profile examples in docs Playground widget (Universal-Commerce-Protocol#236)
* Correct payment handler profile example in playground * Remove trailing space from playground.md --------- Co-authored-by: Guillaume V. <4216770+ptiper@users.noreply.github.com>
1 parent 536285c commit c402463

1 file changed

Lines changed: 36 additions & 7 deletions

File tree

docs/specification/playground.md

Lines changed: 36 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ select, input {
221221
<!-- VIEW: Discovery -->
222222
<div id="view-discovery" class="section">
223223
<h2 class="title">2. Discovery</h2>
224-
<p class="desc">The Platform fetches <code>/.well-known/ucp</code>. The response below is filtered to show the intersection of the Business's capabilities and the Platform's profile.</p>
224+
<p class="desc">The Platform fetches <code>/.well-known/ucp</code> from the Business.</p>
225225
<div class="grid">
226226
<div class="json-panel">
227227
<div class="json-header"><span class="json-title">GET Request</span></div>
@@ -230,7 +230,7 @@ Host: business.example.com
230230
Accept: application/json</pre>
231231
</div>
232232
<div class="json-panel">
233-
<div class="json-header"><span class="json-title">Response (Filtered)</span></div>
233+
<div class="json-header"><span class="json-title">Response</span></div>
234234
<pre id="json-disc-res" class="json-body"></pre>
235235
</div>
236236
</div>
@@ -412,8 +412,8 @@ const UcpData = {
412412
"sku_mug": { title: "UCP Demo Mug", price: 1999, image_url: "https://example.com/images/mug.jpg" }
413413
},
414414

415-
payment_handlers: {
416-
"com.shopify.shop_pay": [
415+
business_payment_handlers: {
416+
"dev.shopify.shop_pay": [
417417
{
418418
id: "shop_pay",
419419
version: "{{ ucp_version }}",
@@ -463,6 +463,29 @@ const UcpData = {
463463
]
464464
},
465465

466+
platform_payment_handlers: {
467+
"dev.shopify.shop_pay": [
468+
{
469+
id: "shop_pay",
470+
version: "2026-01-11",
471+
spec: "https://shopify.dev/docs/agents/checkout/shop-pay-handler",
472+
config_schema: "https://shopify.dev/ucp/shop-pay-handler/2026-01-11/config.json",
473+
instrument_schemas: ["https://shopify.dev/ucp/shop-pay-handler/2026-01-11/instrument.json"]
474+
}
475+
],
476+
"com.google.pay": [
477+
{
478+
id: "gpay",
479+
version: "2026-01-11",
480+
spec: "https://pay.google.com/gp/p/ucp/2026-01-11/",
481+
config_schema: "https://pay.google.com/gp/p/ucp/2026-01-11/schemas/config.json",
482+
instrument_schemas: [
483+
"https://pay.google.com/gp/p/ucp/2026-01-11/schemas/card_payment_instrument.json"
484+
]
485+
}
486+
]
487+
},
488+
466489
capabilities: {
467490
"dev.ucp.shopping.checkout": [
468491
{
@@ -585,7 +608,7 @@ class UcpBackend {
585608
ucp: {
586609
version: UcpData.version,
587610
capabilities: UcpData.capabilities,
588-
payment_handlers: UcpData.payment_handlers
611+
payment_handlers: UcpData.business_payment_handlers
589612
}
590613
};
591614
}
@@ -632,7 +655,7 @@ class UcpBackend {
632655
}
633656

634657
this.session = {
635-
ucp: { version: UcpData.version, capabilities: activeCaps, payment_handlers: UcpData.payment_handlers },
658+
ucp: { version: UcpData.version, capabilities: activeCaps, payment_handlers: UcpData.business_payment_handlers },
636659
id: this.genId('chk'),
637660
status: messages.length > 0 ? "incomplete" : "ready_for_complete",
638661
line_items: lineItems,
@@ -857,7 +880,13 @@ class UcpApp {
857880
}
858881
});
859882

860-
this.setJson('json-profiles', { ucp: { version: UcpData.version, capabilities, payment_handlers: UcpData.payment_handlers } });
883+
this.setJson('json-profiles', {
884+
ucp: {
885+
version: UcpData.version,
886+
capabilities,
887+
payment_handlers: UcpData.platform_payment_handlers
888+
}
889+
});
861890
}
862891

863892
runDiscovery() {

0 commit comments

Comments
 (0)