Skip to content

Add --country to checkout create for presentment currency localization - #38

Merged
joerj123 merged 1 commit into
mainfrom
add-country-checkout-localization
Jun 18, 2026
Merged

Add --country to checkout create for presentment currency localization#38
joerj123 merged 1 commit into
mainfrom
add-country-checkout-localization

Conversation

@joerj123

@joerj123 joerj123 commented Jun 17, 2026

Copy link
Copy Markdown
Collaborator

Problem

Presentment currency is locked at create_checkout from the request's geo-IP. checkout create never propagated the buyer's known country, so a checkout could be presented in a currency that does not match the buyer.

Change

  • Add --country <ISO2> to checkout create, setting checkout.context.address_country so the merchant resolves presentment currency to the buyer's country.
  • Resolution: explicit --country → stored config set-country preference. Never falls back to a default country, and does not override the buyer's saved address. Stdin-supplied context wins.

Tests

pnpm typecheck clean; pnpm test 100/100 passing (client- and CLI-level coverage).

@joerj123
joerj123 force-pushed the add-country-checkout-localization branch from ff749db to 1d77784 Compare June 17, 2026 20:39
`checkout create` now sets `checkout.context.address_country` so the merchant
resolves presentment currency to the buyer's country instead of inferring it
from the request geo-IP. Resolution: explicit --country > stored
`config set-country` preference (never a default country); stdin-supplied
context wins and the signed-in saved address is preserved.

Assisted-By: devx/f92431b1-082a-488b-819b-ad2a77159758
@joerj123
joerj123 force-pushed the add-country-checkout-localization branch from 1d77784 to db77df1 Compare June 17, 2026 21:06
@joerj123
joerj123 requested a review from PawanP1808 June 17, 2026 21:09
@joerj123
joerj123 merged commit 246e371 into main Jun 18, 2026
2 checks passed
@joerj123
joerj123 deleted the add-country-checkout-localization branch June 18, 2026 07:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants