Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion docs/documentation/schema-authoring.md
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,6 @@ independently negotiated.
Examples:

- `schemas/shopping/payment.json` — Payment configuration (part of checkout)
- `schemas/shopping/payment_data.json` — Payment submission data

### Type Schemas

Expand Down
6 changes: 4 additions & 2 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,8 @@ image: assets/banner.png
"destinations": [
{
"id": "dest_1",
"full_name": "Elisa Beckett",
"first_name": "Elisa",
"last_name": "Beckett",
"street_address": "1600 Amphitheatre Pkwy",
"address_locality": "Mountain View",
"address_region": "CA",
Expand Down Expand Up @@ -335,7 +336,8 @@ image: assets/banner.png
"line_items": [{ "id": "li_1", "quantity": 1 }],
"method_type": "shipping",
"destination": {
"full_name": "Elisa Beckett",
"first_name": "Elisa",
"last_name": "Beckett",
"street_address": "1600 Amphitheatre Pkwy",
"address_locality": "Mountain View",
"address_region": "CA",
Expand Down
58 changes: 31 additions & 27 deletions docs/specification/ap2-mandates.md
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ Mandates are **SD-JWT** credentials with Key Binding (`+kb`). The platform
| Mandate | UCP Placement | Purpose |
| :------ | :------------ | :------ |
| **checkout_mandate** | `ap2.checkout_mandate` | Proof bound to checkout terms, protects business |
| **payment_mandate** | `payment_data.token` | Proof bound to payment authorization, protects funds |
| **payment_mandate** | `payment.instruments[*].credential.token` | Proof bound to payment authorization, protects funds |

The checkout mandate **MUST** contain the full checkout response including the
`ap2.merchant_authorization` field. This creates a nested cryptographic binding
Expand Down Expand Up @@ -235,7 +235,7 @@ a completion request without mandates **MUST** result in a session failure.
The platform initiates the session. The business returns the `Checkout` object
with `ap2.merchant_authorization` embedded in the response body.

{{ extension_schema_fields('ap2_mandate.json#/$defs/checkout_response_with_ap2', 'ap2-mandates') }}
{{ extension_schema_fields('ap2_mandate.json#/$defs/checkout', 'ap2-mandates') }}

**Example Response:**
```json
Expand Down Expand Up @@ -321,36 +321,40 @@ Binding (+kb) signature.
Once the mandates are generated, the platform submits them in the completion
request:

{{ extension_schema_fields('ap2_mandate.json#/$defs/complete_request_with_ap2', 'ap2-mandates') }}
{{ extension_schema_fields('ap2_mandate.json#/$defs/ap2_with_checkout_mandate', 'ap2-mandates') }}

```json
{
"payment_data": {
"id": "instr_1",
"handler_id": "gpay",
"type": "card",
"description": "Visa •••• 1234",
"billing_address": {
"street_address": "123 Main St",
"address_locality": "Anytown",
"address_region": "CA",
"address_country": "US",
"postal_code": "12345"
},
"credential": {
"type": "PAYMENT_GATEWAY",
"token": "examplePaymentMethodToken"
"payment": {
"instruments": [
{
"id": "instr_1",
"handler_id": "gpay",
"type": "card",
"rich_text_description": "Visa •••• 1234",
"billing_address": {
"street_address": "123 Main St",
"address_locality": "Anytown",
"address_region": "CA",
"address_country": "US",
"postal_code": "12345"
},
"credential": {
"type": "PAYMENT_GATEWAY",
"token": "examplePaymentMethodToken"
}
}
]
},
"ap2": {
"checkout_mandate": "eyJhbGciOiJFUzI1NiIsInR5cCI6InZjK3NkLWp3dCJ9..." // The User-Signed SD-JWT+kb / platform provider signed SD-JWT / delegated SD-JWT-KB
"checkout_mandate": "eyJhbGciOiJFUzI1NiIsInR5cCI6InZjK3NkLWp3dCJ9..." // The User-Signed SD-JWT+kb / platform provider signed SD-JWT / delegated SD-JWT-KB
}
}
```

* `ap2.checkout_mandate`: The SD-JWT+kb checkout mandate containing the
full checkout (with `ap2.merchant_authorization`)
* `payment_data.token`: Contains the payment mandate (composite token)
* `payment.instruments[*].credential.token`: Contains the payment mandate (composite token)

## Verification & Processing

Expand Down Expand Up @@ -405,19 +409,19 @@ checkout.

### AP2 Checkout Response

The `ap2` object included in CREATE / UPDATE checkout responses.
The `ap2` object included in checkout responses.

{{ extension_schema_fields('ap2_mandate.json#/$defs/ap2_checkout_response', 'ap2-mandates') }}
{{ extension_schema_fields('ap2_mandate.json#/$defs/ap2_with_merchant_authorization', 'ap2-mandates') }}

### AP2 Complete Request
### Checkout Mandate

The `ap2` object included in COMPLETE checkout requests.
{{ extension_schema_fields('ap2_mandate.json#/$defs/checkout_mandate', 'ap2-mandates') }}

{{ extension_schema_fields('ap2_mandate.json#/$defs/ap2_complete_request', 'ap2-mandates') }}
### AP2 Complete Request

### Checkout Mandate
The `ap2` object included in COMPLETE checkout requests.

{{ extension_schema_fields('ap2_mandate.json#/$defs/checkout_mandate', 'ap2-mandates') }}
{{ extension_schema_fields('ap2_mandate.json#/$defs/ap2_with_checkout_mandate', 'ap2-mandates') }}

### Error Codes

Expand Down
18 changes: 10 additions & 8 deletions docs/specification/checkout-mcp.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,8 @@ Maps to the [Create Checkout](checkout.md#create-checkout) operation.

#### Input Schema

* [Checkout](checkout.md#create-checkout) object.
* `checkout` ([Checkout](checkout.md#create-checkout)): **Required**. Contains
the initial checkout session data and optional extensions.
* Extensions (Optional):
* `dev.ucp.shopping.buyer_consent`: [Buyer Consent](buyer-consent.md)
* `dev.ucp.shopping.fulfillment`: [Fulfillment](fulfillment.md)
Expand Down Expand Up @@ -319,7 +320,7 @@ Maps to the [Get Checkout](checkout.md#get-checkout) operation.

#### Input Schema

* `id` (String): The ID of the checkout session.
* `id` (String): **Required**. The ID of the checkout session.

#### Output Schema

Expand All @@ -331,8 +332,9 @@ Maps to the [Update Checkout](checkout.md#update-checkout) operation.

#### Input Schema

* `id` (String): The ID of the checkout session to update.
* [Checkout](checkout.md#update-checkout) object.
* `id` (String): **Required**. The ID of the checkout session to update.
* `checkout` ([Checkout](checkout.md#update-checkout)): **Required**.
Contains the updated checkout session data.
* Extensions (Optional):
* `dev.ucp.shopping.buyer_consent`: [Buyer Consent](buyer-consent.md)
* `dev.ucp.shopping.fulfillment`: [Fulfillment](fulfillment.md)
Expand Down Expand Up @@ -538,10 +540,10 @@ Maps to the [Complete Checkout](checkout.md#complete-checkout) operation.

#### Input Schema

* `id` (String): The ID of the checkout session.
* `payment` ([Payment](checkout.md#payment), Optional): Payment instrument instance submitted
by the buyer.
* `idempotency_key` (String, UUID): **Required**. Unique key for retry
* `id` (String): **Required**. The ID of the checkout session.
* `checkout` ([Checkout](checkout.md#complete-checkout)): **Required**.
Contains payment credentials and other finalization data to execute the transaction.
* `idempotency_key` (String, UUID): **Required**. Unique key for retry
safety.

#### Output Schema
Expand Down
42 changes: 23 additions & 19 deletions docs/specification/checkout-rest.md
Original file line number Diff line number Diff line change
Expand Up @@ -761,25 +761,29 @@ place to set these expectations via `messages`.
Content-Type: application/json

{
"payment_data": {
"id": "pi_gpay_5678",
"handler_id": "com.google.pay",
"type": "card",
"brand": "mastercard",
"last_digits": "5678",
"rich_card_art": "https://cart-art-1.html",
"rich_text_description": "Google Pay •••• 5678",
"billing_address": {
"street_address": "123 Main St",
"address_locality": "Anytown",
"address_region": "CA",
"address_country": "US",
"postal_code": "12345"
},
"credential": {
"type": "PAYMENT_GATEWAY",
"token": "examplePaymentMethodToken"
}
"payment": {
"instruments": [
{
"id": "pi_gpay_5678",
"handler_id": "com.google.pay",
"type": "card",
"brand": "mastercard",
"last_digits": "5678",
"rich_card_art": "https://cart-art-1.html",
"rich_text_description": "Google Pay •••• 5678",
"billing_address": {
"street_address": "123 Main St",
"address_locality": "Anytown",
"address_region": "CA",
"address_country": "US",
"postal_code": "12345"
},
"credential": {
"type": "PAYMENT_GATEWAY",
"token": "examplePaymentMethodToken"
}
}
]
},
"risk_signals": {
//... risk signal related data (device fingerprint / risk token)
Expand Down
27 changes: 16 additions & 11 deletions docs/specification/examples/business-tokenizer-payment-handler.md
Original file line number Diff line number Diff line change
Expand Up @@ -186,17 +186,22 @@ UCP-Agent: profile="https://platform.example/profile"
Content-Type: application/json

{
"payment_data": {
"handler_id": "processor_tokenizer",
"type": "card",
"brand": "visa",
"last_digits": "1111",
"expiry_month": 12,
"expiry_year": 2026,
"credential": {
"type": "token",
"token": "tok_a1b2c3d4e5f6"
}
"payment": {
"instruments": [
{
"id": "instr_1",
"handler_id": "processor_tokenizer",
"type": "card",
"brand": "visa",
"last_digits": "1111",
"expiry_month": 12,
"expiry_year": 2026,
"credential": {
"type": "token",
"token": "tok_a1b2c3d4e5f6"
}
}
]
},
"risk_signal": {
// ... the key value pair for potential risk signal data
Expand Down
30 changes: 17 additions & 13 deletions docs/specification/examples/encrypted-credential-handler.md
Original file line number Diff line number Diff line change
Expand Up @@ -208,20 +208,24 @@ UCP-Agent: profile="https://platform.example/profile"
Content-Type: application/json

{
"payment_data": {
"id": "instr_1",
"handler_id": "platform_encrypted",
"type": "card",
"brand": "visa",
"last_digits": "1111",
"expiry_month": 12,
"expiry_year": 2026,
"credential": {
"type": "encrypted",
"encrypted_data": "base64-encoded-encrypted-payload..."
}
"payment": {
"instruments": [
{
"id": "instr_1",
"handler_id": "platform_encrypted",
"type": "card",
"brand": "visa",
"last_digits": "1111",
"expiry_month": 12,
"expiry_year": 2026,
"credential": {
"type": "encrypted",
"encrypted_data": "base64-encoded-encrypted-payload..."
}
}
]
},
"risk_signal": {
"risk_signals": {
// ... the key value pair for potential risk signal data
}
}
Expand Down
26 changes: 15 additions & 11 deletions docs/specification/examples/platform-tokenizer-payment-handler.md
Original file line number Diff line number Diff line change
Expand Up @@ -280,18 +280,22 @@ POST /checkout-sessions/{checkout_id}/complete
Content-Type: application/json

{
"payment_data": {
"id": "instr_1",
"handler_id": "platform_wallet",
"type": "card",
"brand": "visa",
"last_digits": "4242",
"credential": {
"type": "token",
"token": "ptok_x9y8z7w6v5u4"
}
"payment": {
"instruments": [
{
"id": "instr_1",
"handler_id": "platform_wallet",
"type": "card",
"brand": "visa",
"last_digits": "4242",
"credential": {
"type": "token",
"token": "ptok_x9y8z7w6v5u4"
}
}
]
},
"risk_signal": {
"risk_signals": {
// ... the key value pair for potential risk signal data
}
}
Expand Down
Loading