Skip to content

Conversation

@igrigorik
Copy link
Contributor

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.

Problem: Previously, ECP availability was binary — if a business advertised embedded transport 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:

  1. Service-level (/.well-known/ucp): Declares business supports ECP
  2. Checkout response (ucp.services): Confirms availability and allowed delegations for this session

Key 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

Example 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

  • New feature (non-breaking change which adds functionality)
  • Documentation update

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings

  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": {...}
      }
  }
@igrigorik igrigorik added this to the Working Draft milestone Jan 19, 2026
@igrigorik igrigorik self-assigned this Jan 19, 2026
@igrigorik igrigorik requested a review from a team January 19, 2026 06:42
@igrigorik igrigorik added the TC review Ready for TC review label Jan 19, 2026
@igrigorik igrigorik changed the title feat(ecp): allow per checkout transport configs; ECP support + delegation confirmation feat(ecp): per checkout transport configs; ECP support + delegation confirmation Jan 19, 2026
@igrigorik igrigorik changed the base branch from main to working-draft January 19, 2026 06:43
@igrigorik
Copy link
Contributor Author

Note: 81a5ca6 is adding noise because we haven't regenerated spec/* files form the latest source/* in working-draft.

Copy link
Contributor

@lemonmade lemonmade left a 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"
Copy link
Contributor

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.

Copy link
Contributor Author

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.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#71 was the PR to fix the openAPI errors related for #49

  - 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": [
Copy link
Contributor

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?

Copy link
Contributor Author

@igrigorik igrigorik Jan 19, 2026

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.

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 😢

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!

Copy link

@raginpirate raginpirate left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice stuff!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

TC review Ready for TC review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants