You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add --country to checkout create for presentment currency localization
`checkout create` now sets `checkout.context.address_country` from the
explicit global `--country` flag, so the merchant resolves presentment
currency to the buyer's country instead of falling back to the agent host's
geo-IP. Verified live: `--country GB` returns GBP (was EUR from a non-UK host)
while the signed-in saved address is preserved (stdin-supplied context wins).
Assisted-By: devx/f92431b1-082a-488b-819b-ad2a77159758
Add `--country` to `checkout create`, setting `checkout.context.address_country` so the merchant resolves presentment currency to the buyer's country (stdin context wins; saved address is not overridden).
@@ -164,6 +164,7 @@ When the item is visual (clothing, shoes, accessories, furniture, decor, art) **
164
164
**Reading the `checkout create` / `update` response:**
165
165
- Inspect `status`, `email`, addresses, `continue_url`, and `payment.instruments`.
166
166
- If the buyer's saved shipping details are missing, collect them and pass via `checkout create`/`update`.
167
+
- Pass `--country <ISO2>` on `checkout create` to localize presentment currency; without it the merchant may present a foreign currency. It does not override the saved address.
167
168
-**Warnings:** display every `messages[]` entry with type `warning` (e.g. `final_sale`, `prop65`, `age_restricted`) before completing. Show `presentation: "disclosure"` warnings verbatim — never omit or summarize them. Never complete a purchase without surfacing these.
Copy file name to clipboardExpand all lines: skill/references/direct-api.md
+3Lines changed: 3 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -110,6 +110,7 @@ Create with line items, or pass a checkout body that already contains a `cart_id
110
110
},
111
111
"checkout": {
112
112
"cart_id": "<optional_cart_id>",
113
+
"context": { "address_country": "US" },
113
114
"line_items": [
114
115
{
115
116
"quantity": 1,
@@ -142,6 +143,8 @@ Create with line items, or pass a checkout body that already contains a `cart_id
142
143
}
143
144
```
144
145
146
+
`context.address_country` (ISO2) localizes presentment currency to the buyer's country; without it the merchant infers it from the request geo-IP. It does not override the saved address.
147
+
145
148
If response status is `ready_for_complete` and includes a Shop Pay payment token, complete after clear purchase intent. If no payment token is present, present the UCP `continue_url` as a Finish in Shop link. **If the buyer has a delegated budget (see Payment Budget) but the checkout still returns no payment instruments, the merchant does not accept Shop Pay** — hand off `continue_url` or suggest another store; do not re-prompt the user to set up a budget (they already have one).
146
149
147
150
The checkout response may include a `messages[]` array. You MUST display every `warning` message's `content` to the user (e.g. `final_sale`, `prop65`, `age_restricted`) before completing. Show `presentation: "disclosure"` warnings verbatim and do not omit or summarize them away. Never complete a purchase without surfacing these messages.
0 commit comments