Skip to content

Stop collecting a Google Pay billing address by default (breaking) - #72

Draft
Max Harrison (maxharrison) wants to merge 2 commits into
mainfrom
max/gpay-billing-address-default-v2
Draft

Stop collecting a Google Pay billing address by default (breaking)#72
Max Harrison (maxharrison) wants to merge 2 commits into
mainfrom
max/gpay-billing-address-default-v2

Conversation

@maxharrison

@maxharrison Max Harrison (maxharrison) commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

Config.billingAddress defaulted to BillingAddressConfig.Enabled(), so Android collected a billing address unless the merchant opted out. It now defaults to BillingAddressConfig.Disabled, matching the web SDK's opt-in behaviour.

Google Pay omits paymentMethodData.info.billingAddress when collection is disabled. The response parser now treats that field as optional, so a normal payment without an address does not produce an error log.

This is a breaking change. Merchants that need billing data for AVS or fraud rules must set billingAddress = BillingAddressConfig.Enabled() before upgrading. Hold this PR for the next major Android SDK release.

Stack: #70 adds golden request tests on top of this PR.

BREAKING CHANGE: Config.billingAddress now defaults to
BillingAddressConfig.Disabled. Merchants who relied on the implicit
billing address request must set
billingAddress = BillingAddressConfig.Enabled() to keep it.

This matches the web SDK, where billing address collection has always
been opt-in. Collecting an address that the integrator never asked for
is the wrong default for a payments SDK.

Merchants who use the billing address for AVS or fraud rules lose that
data silently on upgrade, so hold this until the next major Android SDK
release.
Google Pay omits paymentMethodData.info.billingAddress when address
collection is disabled. Read that field as optional so successful
payments without an address do not produce an error log.

Rename the extraction helper to reflect that it parses the whole billing
address, not only the name.

@ana-maksimovskikh ana-maksimovskikh left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thanks Max!

@maxharrison

Copy link
Copy Markdown
Contributor Author

happy to merge, but blocking this for now as its the breaking change that we will wait for the major release

@maxharrison
Max Harrison (maxharrison) marked this pull request as draft August 24, 2026 10:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants