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
{{ message }}
Repository navigation
[Bug]: create_checkout_session sends a destination's locality and region as locality/region, not address_locality/address_region #116
What goes wrong.ShippingDestinationCreateRequest extends PostalAddressCreateRequest, whose fields are address_locality and address_region (as in schemas/shopping/types/postal_address.json of UCP 2026-04-08). Because the model has extra="allow", the keyword arguments locality= and region= are kept as extra fields, so the request carries
A business that reads the standard field names sees a destination with no locality and no region. If it requires them to ship (ours requires address_locality), the session stays incomplete and every test that completes a checkout through create_checkout_session fails, which hides the real results of most of the suite.
How we found it. Running the suite (016ecbc, python-sdk v2026-04-08-6) against a business that validates its requests against the official 2026-04-08 schemas. We work around it locally by renaming the two fields before our server sees them.
Thanks for the report. #97 fixes this at the source: get_test_destination() now normalizes the fixture destination so the standard UCP field names (address_locality/address_region) are honored, keeping locality/city and region/state as fallbacks. With #97 applied, the destination created by create_checkout_session carries your configured locality/region even when test_destination uses the schema's field names.
Activity
fix: use canonical shipping destination address fields
FanouZeng-TT commentedon Oct 5, 2026
Thanks for the report. #97 fixes this at the source:
get_test_destination()now normalizes the fixture destination so the standard UCP field names (address_locality/address_region) are honored, keepinglocality/cityandregion/stateas fallbacks. With #97 applied, the destination created bycreate_checkout_sessioncarries your configured locality/region even whentest_destinationuses the schema's field names.