-
Notifications
You must be signed in to change notification settings - Fork 207
feat(ecp): per checkout transport configs; ECP support + delegation confirmation #80
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: working-draft
Are you sure you want to change the base?
Conversation
Adds services to checkout response ucp metadata, enabling per-session
transport configuration with typed config. This allows businesses to
confirm ECP availability and specify allowed delegations on a
per-checkout basis.
Changes:
- Add services to response_checkout_schema in ucp.json
- Add response_schema variant to service.json with typed config support
- Add embedded_config.json schema defining delegations array
- Update embedded-checkout.md with two-level discovery model
With this in place, response now carries..
{
"id": "checkout_abc123",
"continue_url": "https://merchant.example.com/checkout/abc123",
"ucp": {
"version": "2026-01-11",
"services": {
"dev.ucp.shopping": [{
"version": "2026-01-11",
"transport": "embedded",
"config": {
"delegations": ["payment.credential", "fulfillment.address_change"]
}
}]
},
"payment_handlers": {...}
}
}
|
Note: 81a5ca6 is adding noise because we haven't regenerated spec/* files form the latest source/* in working-draft. |
lemonmade
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left a few questions/ requests, but otherwise LGTM 👍
| "$ref": "https://ucp.dev/schemas/shopping/payment.update_req.json" | ||
| }, | ||
| "payment_complete_request": { | ||
| "$ref": "https://ucp.dev/schemas/shopping/payment.complete_req.json" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this change from your PR? Looks unrelated.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, this: #80 (comment)
I can rebase once that's fixed, or we land both.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Rename `delegations` to `delegate` for consistency with ec.ready
- Add typed config to business_schema (not platform_schema)
- Clarify that config.delegate in responses confirms accepted
delegations (intersection of requested and allowed)
| "rest": { | ||
| "schema": "https://ucp.dev/services/shopping/rest.openapi.json", | ||
| "endpoint": "https://merchant.example.com/ucp/v1" | ||
| "dev.ucp.shopping": [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While re-reviewing this, I noticed that we still have some references to services[\"dev.ucp.shopping\"].rest.endpoint in the REST/ MCP specs. @raginpirate I assume those should have been updated to something like services[\"dev.ucp.shopping\"][transport=rest].endpoint as part of your change to align all the DNS-namespaced concepts in UCP?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, we need a thorough scrub to fix all the outdated examples and references. Separate from this PR though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let me validate what might have been missed here... so many doc changes in the last PR 😢
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#85 for those outdates refs!
raginpirate
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice stuff!
Adds
servicesto checkout responseucpmetadata, enabling per-session transport configuration with typed config. This allows businesses to confirm ECP availability and specify allowed delegations on a per-checkout basis.Problem: Previously, ECP availability was binary — if a business advertised
embeddedtransport in service discovery, all checkouts were assumed to support ECP with delegations negotiated at runtime. This didn't account for cart contents, agent authorization levels, or business policy that may restrict ECP or specific delegations for certain sessions.Solution: Two-level discovery model:
/.well-known/ucp): Declares business supports ECPucp.services): Confirms availability and allowed delegations for this sessionKey changes
servicestoresponse_checkout_schemainucp.jsonresponse_schemavariant toservice.jsonwith typed config supportembedded_config.jsonschema definingdelegationsarrayembedded-checkout.mdwith two-level discovery modelExample response:
{ "ucp": { "version": "2026-01-11", "services": { "dev.ucp.shopping": [{ "version": "2026-01-11", "transport": "embedded", "config": { "delegations": ["payment.credential", "fulfillment.address_change"] // <-- NEW } }] }, "payment_handlers": {...} } "id": "checkout_abc123", ... // rest of checkout response "continue_url": "https://merchant.example.com/checkout/abc123", }Type of change
Checklist: