Skip to content

fix(products): use regions version 2026/01 for one-time product writes - #10

Merged
AndroidPoet merged 1 commit into
AndroidPoet:masterfrom
karm435:fix/products-regions-version-2026-01
Dec 4, 2026
Merged

AndroidPoet merged 1 commit into
AndroidPoet:masterfrom
karm435:fix/products-regions-version-2026-01

Conversation

@karm435

@karm435 karm435 commented Oct 29, 2026

Copy link
Copy Markdown
Contributor

gpc products update fails for a one-time product the Play Console has priced in EUR in Bulgaria:

Error: googleapi: Error 400: Invalid currency for region code BG at the specified regions version 2022/02. Expected BGN but got EUR., badRequest

Bulgaria moved to the euro in 2026, but regions version 2022/02 still expects BGN there. The Console now prices products under 2026/01, and products get returns "regionsVersion": {"version": "2026/01"} for them. So a get, edit, update round trip can't succeed while the CLI sends 2022/02. #7 picked 2022/02 when it was the only version.

This PR changes products create and products update to send 2026/01. Nothing else changes.

Testing: I built this branch and ran products update --update-mask purchaseOptions against a live product, using its full price list from products get (174 regions) with only the US price changed. The 0.5.17 release failed with the error above. The patched build succeeded, and diffing products get before and after showed the US price as the only change. go test ./... passes.

subscriptions and offers still send 2022/02 and will probably fail the same way for EUR prices in Bulgaria. I haven't changed or tested them because I don't have a subscription to try against.

🤖 Generated with Claude Code

products create and update sent regionsVersion.version 2022/02. Under
that version Bulgaria still expects BGN, so updating a product that is
priced in EUR in Bulgaria (as the Console now prices it) fails with
"Invalid currency for region code BG at the specified regions version
2022/02. Expected BGN but got EUR."

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@AndroidPoet
AndroidPoet merged commit 7d6db0d into AndroidPoet:master Dec 4, 2026
@AndroidPoet

Copy link
Copy Markdown
Owner

Thanks @karm435, merged. I checked it against one of my own products before merging: products get returns regionsVersion 2026/01 with Bulgaria priced in EUR, so 2022/02 really can't round-trip anymore. Build and go test ./... pass on top of current master.

Good call on leaving subscriptions and offers alone since you couldn't test them. I'll look at those separately.

Really appreciate the clear write-up and the live test.

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