Skip to content

Use canonical country identifier - #13815

Draft
cttsai-stripe wants to merge 1 commit into
masterfrom
cttsai/mobilesdk-4667-remove-custom-country-path
Draft

Use canonical country identifier#13815
cttsai-stripe wants to merge 1 commit into
masterfrom
cttsai/mobilesdk-4667-remove-custom-country-path

Conversation

@cttsai-stripe

@cttsai-stripe cttsai-stripe commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Summary

CountrySpec now collects country values under the canonical IdentifierSpec.Country key. A schema-provided api_path is no longer used as the runtime country-field identifier.

JIRA: MOBILESDK-4667

What changed

  • CountrySpec.transform() creates its country field with IdentifierSpec.Country.
  • Its initial country value also comes from IdentifierSpec.Country.
  • CountrySpec no longer declares an api_path; only API-path-backed specifications retain that field.

What stays the same

  • Country allowlists and the country control's visible behavior are unchanged.
  • Existing forms that already use the canonical country key are unchanged.
  • This does not re-enable Sofort or add a new payment method.

Motivation

Current Android payment-method forms collect country at billing_details[address][country]. Removing the unused configurable runtime path keeps that contract explicit before the shared billing-address migration in #13723.

Coverage

  • LpmSerializerTest limits custom and default API-path assertions to specifications that actually own an API path.
  • TransformSpecToElementsTest asserts CountrySpec's canonical country-only collection, while the dependent migration tests cover Klarna, Klarna without a form, Wero, payment-method metadata, and FormViewModel behavior.

Testing

  • ./gradlew :payments-ui-core:testDebugUnitTest --tests 'com.stripe.android.ui.core.elements.LpmSerializerTest' :paymentsheet:testDebugUnitTest --tests 'com.stripe.android.lpmfoundations.luxe.TransformSpecToElementsTest' --tests 'com.stripe.android.lpmfoundations.paymentmethod.PaymentMethodMetadataTest' --tests 'com.stripe.android.lpmfoundations.paymentmethod.definitions.KlarnaDefinitionTest' --tests 'com.stripe.android.lpmfoundations.paymentmethod.definitions.KlarnaDefinitionNoFormTest' --tests 'com.stripe.android.lpmfoundations.paymentmethod.definitions.WeroDefinitionTest' --tests 'com.stripe.android.paymentsheet.forms.FormViewModelTest' passed.
  • ./gradlew :payments-ui-core:detekt :payments-ui-core:apiCheck :paymentsheet:detekt :paymentsheet:apiCheck passed.
  • git diff --check passed.

Screenshots

None. No visual change is expected.

Changelog

N/A. No customer-visible change.

Committed-By-Agent: codex
Co-authored-by: codex <noreply@openai.com>
Committed-By-Agent: codex
Co-authored-by: codex <noreply@openai.com>
Committed-By-Agent: codex
Co-authored-by: codex <noreply@openai.com>
@cttsai-stripe
cttsai-stripe force-pushed the cttsai/mobilesdk-4667-remove-custom-country-path branch from bfc4b5f to 42ab186 Compare August 6, 2026 23:11
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.

1 participant