Collect a Google Pay shipping address and option on web - #1006
Merged
Max Harrison (maxharrison) merged 6 commits intoSep 8, 2026
Conversation
Google Pay on web builds no shipping fields and hardcodes callbackIntents to PAYMENT_AUTHORIZATION, so a merchant cannot collect a shipping address, offer shipping options, or recalculate the total while the sheet is open. Add shippingAddress and shippingOptions to the button config, derive callbackIntents from that config, and wire onPaymentDataChanged to merchant onShippingAddressChange / onShippingOptionChange callbacks. The sheet can raise several data changes in one session, so each request carries an id and the frame resolves only the reply that matches it.
🦋 Changeset detectedLatest commit: ce28f61 The changes in this PR will be included in the next version bump. This PR includes changesets to release 12 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Max Harrison (maxharrison)
marked this pull request as ready for review
September 7, 2026 12:41
…dress-option-dynamic-price
Jake Grogan (jakekgrog)
approved these changes
Sep 8, 2026
Max Harrison (maxharrison)
deleted the
max/card-1057-b-google-pay-web-shipping-address-option-dynamic-price
branch
September 8, 2026 15:43
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Google Pay on web did not expose shipping fields and hardcoded
callbackIntentsto["PAYMENT_AUTHORIZATION"]. Merchants could not collect a shipping address, offer shipping options, or update an open payment sheet.This adds
shippingAddressandshippingOptionsto the button configuration. Shipping options also enable address collection. Address and option callbacks receive the current shipping state and can return a synchronous or asynchronous partial update for the total, line items, or available options. A callback can instead return a typed Google Pay error.Callbacks have a 10-second timeout. The SDK validates option IDs and defaults, correlates concurrent iframe replies, preserves partial updates within one sheet session, and resets them before the next session.
process()receives the finalshippingAddressand fullshippingOption.CARD-1057