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
7 changes: 6 additions & 1 deletion docs/specification/checkout-a2a.md
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,12 @@ checkout object containing an `order` attribute with `id` and `permalink_url`.
"a2a.ucp.checkout.payment": { ... },
"a2a.ucp.checkout.signals": {
"dev.ucp.buyer_ip": "203.0.113.42",
"dev.ucp.user_agent": "Mozilla/5.0 ..."
"dev.ucp.user_agent": "Mozilla/5.0 ...",
"dev.ucp.user_id": "0a041b9462caa4a31bac3567e...",
"dev.ucp.user_location": {
"address_region": "CA",
"address_country": "US"
}
}
}
}
Expand Down
7 changes: 6 additions & 1 deletion docs/specification/checkout-rest.md
Original file line number Diff line number Diff line change
Expand Up @@ -804,7 +804,12 @@ place to set these expectations via `messages`.
},
"signals": {
"dev.ucp.buyer_ip": "203.0.113.42",
"dev.ucp.user_agent": "Mozilla/5.0 ..."
"dev.ucp.user_agent": "Mozilla/5.0 ...",
"dev.ucp.user_id": "0a041b9462caa4a31bac3567e...",
"dev.ucp.user_location": {
"address_region": "CA",
"address_country": "US"
}
}
}
```
Expand Down
7 changes: 6 additions & 1 deletion docs/specification/examples/encrypted-credential-handler.md
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,12 @@ Content-Type: application/json
},
"signals": {
"dev.ucp.buyer_ip": "203.0.113.42",
"dev.ucp.user_agent": "Mozilla/5.0 ..."
"dev.ucp.user_agent": "Mozilla/5.0 ...",
"dev.ucp.user_id": "0a041b9462caa4a31bac3567e...",
"dev.ucp.user_location": {
"address_region": "CA",
"address_country": "US"
}
}
}
```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -403,7 +403,12 @@ Content-Type: application/json
},
"signals": {
"dev.ucp.buyer_ip": "203.0.113.42",
"dev.ucp.user_agent": "Mozilla/5.0 ..."
"dev.ucp.user_agent": "Mozilla/5.0 ...",
"dev.ucp.user_id": "0a041b9462caa4a31bac3567e...",
"dev.ucp.user_location": {
"address_region": "CA",
"address_country": "US"
}
}
}
```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,12 @@ Content-Type: application/json
},
"signals": {
"dev.ucp.buyer_ip": "203.0.113.42",
"dev.ucp.user_agent": "Mozilla/5.0 ..."
"dev.ucp.user_agent": "Mozilla/5.0 ...",
"dev.ucp.user_id": "0a041b9462caa4a31bac3567e...",
"dev.ucp.user_location": {
"address_region": "CA",
"address_country": "US"
}
}
}
```
Expand Down
17 changes: 14 additions & 3 deletions docs/specification/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -1696,7 +1696,12 @@ POST /checkout-sessions/{id}/complete
},
"signals": {
"dev.ucp.buyer_ip": "203.0.113.42",
"dev.ucp.user_agent": "Mozilla/5.0 ..."
"dev.ucp.user_agent": "Mozilla/5.0 ...",
"dev.ucp.user_id": "0a041b9462caa4a31bac3567e...",
"dev.ucp.user_location": {
"address_region": "SC",
"address_country": "US"
}
}
}
```
Expand Down Expand Up @@ -1763,7 +1768,12 @@ POST /checkout-sessions/{id}/complete
},
"signals": {
"dev.ucp.buyer_ip": "203.0.113.42",
"dev.ucp.user_agent": "Mozilla/5.0 ..."
"dev.ucp.user_agent": "Mozilla/5.0 ...",
"dev.ucp.user_id": "0a041b9462caa4a31bac3567e...",
"dev.ucp.user_location": {
"address_region": "CA",
"address_country": "US"
}
}
}
```
Expand Down Expand Up @@ -1845,6 +1855,7 @@ POST /checkout-sessions/{id}/complete
},
"signals": {
"dev.ucp.buyer_ip": "203.0.113.42",
"dev.ucp.user_id": "0a041b9462caa4a31bac3567e...",
"com.example.risk_score": 0.95
},
"ap2": {
Expand Down Expand Up @@ -1930,7 +1941,7 @@ certified and handle:
UCP supports fraud prevention through [Signals](#signals) and the
payment architecture:

- Platforms provide transaction environment [signals](#signals) (IP, user
- Platforms provide transaction environment [signals](#signals) (e.g., IP, user
agent) on catalog, cart, and checkout requests
- Businesses can require additional fields in handler configurations (e.g.,
3DS requirements)
Expand Down
8 changes: 8 additions & 0 deletions source/schemas/shopping/types/signals.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,14 @@
"dev.ucp.user_agent": {
"type": "string",
"description": "Client's HTTP User-Agent header or equivalent."
},
"dev.ucp.user_id": {
"type": "string",
"description": "A stable, opaque identifier for the user represented by the platform. MUST be consistent across sessions for the same user."
},
"dev.ucp.user_location": {
"$ref": "../../common/types/locality.json",
"description": "User's geographic location. Platforms SHOULD populate at least region & country."
}
},
"additionalProperties": true
Expand Down
Loading