Filter tax-insufficient saved payment methods (MOBILESDK-4697) - #13505
Draft
cttsai-stripe wants to merge 3 commits into
Draft
Conversation
cttsai-stripe
force-pushed
the
cttsai/mobilesdk-4697-spm-tax-billing-filter
branch
from
August 3, 2026 18:08
e81e0a5 to
627cb7e
Compare
cttsai-stripe
changed the base branch from
master
to
codex/mobilesdk-4667-all-new-payment-methods
August 3, 2026 18:08
3 tasks
cttsai-stripe
force-pushed
the
codex/mobilesdk-4667-all-new-payment-methods
branch
from
August 3, 2026 19:47
e025939 to
5f7aefb
Compare
cttsai-stripe
force-pushed
the
cttsai/mobilesdk-4697-spm-tax-billing-filter
branch
from
August 3, 2026 19:47
627cb7e to
37a55b1
Compare
cttsai-stripe
changed the base branch from
codex/mobilesdk-4667-all-new-payment-methods
to
cttsai/mobilesdk-4667-us-bank-account-tax-address
August 3, 2026 19:47
3 tasks
cttsai-stripe
force-pushed
the
cttsai/mobilesdk-4667-us-bank-account-tax-address
branch
from
August 3, 2026 19:59
4889e25 to
b661f1b
Compare
cttsai-stripe
force-pushed
the
cttsai/mobilesdk-4697-spm-tax-billing-filter
branch
2 times, most recently
from
August 3, 2026 20:06
a96e023 to
2b0b13d
Compare
cttsai-stripe
force-pushed
the
cttsai/mobilesdk-4667-us-bank-account-tax-address
branch
from
August 3, 2026 20:06
b661f1b to
40d755f
Compare
cttsai-stripe
force-pushed
the
cttsai/mobilesdk-4697-spm-tax-billing-filter
branch
from
August 3, 2026 20:14
2b0b13d to
5d4f81b
Compare
cttsai-stripe
force-pushed
the
cttsai/mobilesdk-4667-us-bank-account-tax-address
branch
from
August 3, 2026 20:14
40d755f to
000dff8
Compare
cttsai-stripe
force-pushed
the
cttsai/mobilesdk-4697-spm-tax-billing-filter
branch
from
August 3, 2026 20:22
5d4f81b to
eb6d085
Compare
cttsai-stripe
force-pushed
the
cttsai/mobilesdk-4667-us-bank-account-tax-address
branch
from
August 3, 2026 20:22
000dff8 to
27767c9
Compare
cttsai-stripe
force-pushed
the
cttsai/mobilesdk-4697-spm-tax-billing-filter
branch
from
August 3, 2026 20:59
eb6d085 to
f0e2489
Compare
cttsai-stripe
force-pushed
the
cttsai/mobilesdk-4667-us-bank-account-tax-address
branch
2 times, most recently
from
August 3, 2026 21:58
29065a5 to
e829b62
Compare
cttsai-stripe
force-pushed
the
cttsai/mobilesdk-4697-spm-tax-billing-filter
branch
from
August 3, 2026 21:58
f0e2489 to
0223bfe
Compare
cttsai-stripe
force-pushed
the
cttsai/mobilesdk-4667-us-bank-account-tax-address
branch
from
August 3, 2026 22:32
e829b62 to
bb2524c
Compare
cttsai-stripe
force-pushed
the
cttsai/mobilesdk-4697-spm-tax-billing-filter
branch
from
August 3, 2026 22:32
0223bfe to
959ae97
Compare
cttsai-stripe
force-pushed
the
cttsai/mobilesdk-4667-us-bank-account-tax-address
branch
from
August 3, 2026 23:46
bb2524c to
91dd147
Compare
cttsai-stripe
force-pushed
the
cttsai/mobilesdk-4697-spm-tax-billing-filter
branch
from
August 3, 2026 23:46
959ae97 to
7f486b6
Compare
cttsai-stripe
force-pushed
the
cttsai/mobilesdk-4667-us-bank-account-tax-address
branch
from
August 4, 2026 05:58
91dd147 to
58bf122
Compare
cttsai-stripe
force-pushed
the
cttsai/mobilesdk-4697-spm-tax-billing-filter
branch
from
August 4, 2026 05:58
7f486b6 to
d16fff0
Compare
cttsai-stripe
force-pushed
the
cttsai/mobilesdk-4667-us-bank-account-tax-address
branch
from
August 4, 2026 06:40
58bf122 to
00de1a9
Compare
cttsai-stripe
force-pushed
the
cttsai/mobilesdk-4697-spm-tax-billing-filter
branch
from
August 4, 2026 06:40
d16fff0 to
db8bd3f
Compare
cttsai-stripe
force-pushed
the
cttsai/mobilesdk-4667-us-bank-account-tax-address
branch
from
August 4, 2026 18:15
00de1a9 to
4afd3c4
Compare
cttsai-stripe
force-pushed
the
cttsai/mobilesdk-4697-spm-tax-billing-filter
branch
from
August 4, 2026 22:35
4c9cfd0 to
8ce4b60
Compare
cttsai-stripe
force-pushed
the
cttsai/mobilesdk-4667-us-bank-account-tax-address
branch
2 times, most recently
from
August 4, 2026 23:17
630db30 to
9fe66c1
Compare
cttsai-stripe
force-pushed
the
cttsai/mobilesdk-4697-spm-tax-billing-filter
branch
from
August 4, 2026 23:17
8ce4b60 to
17d99af
Compare
cttsai-stripe
force-pushed
the
cttsai/mobilesdk-4667-us-bank-account-tax-address
branch
from
August 4, 2026 23:20
9fe66c1 to
5e2102e
Compare
cttsai-stripe
force-pushed
the
cttsai/mobilesdk-4697-spm-tax-billing-filter
branch
2 times, most recently
from
August 4, 2026 23:35
1caaf36 to
e2a12d4
Compare
cttsai-stripe
force-pushed
the
cttsai/mobilesdk-4667-us-bank-account-tax-address
branch
from
August 4, 2026 23:35
5e2102e to
787c547
Compare
cttsai-stripe
force-pushed
the
cttsai/mobilesdk-4697-spm-tax-billing-filter
branch
from
August 5, 2026 00:18
e2a12d4 to
f6350ab
Compare
cttsai-stripe
force-pushed
the
cttsai/mobilesdk-4667-us-bank-account-tax-address
branch
from
August 5, 2026 16:51
5edee9a to
2c8e80d
Compare
cttsai-stripe
force-pushed
the
cttsai/mobilesdk-4697-spm-tax-billing-filter
branch
from
August 5, 2026 16:51
f6350ab to
582debf
Compare
cttsai-stripe
force-pushed
the
cttsai/mobilesdk-4667-us-bank-account-tax-address
branch
from
August 5, 2026 17:46
2c8e80d to
0658b41
Compare
cttsai-stripe
force-pushed
the
cttsai/mobilesdk-4697-spm-tax-billing-filter
branch
from
August 5, 2026 17:46
582debf to
9567195
Compare
cttsai-stripe
force-pushed
the
cttsai/mobilesdk-4667-us-bank-account-tax-address
branch
from
August 5, 2026 18:12
0658b41 to
8434af9
Compare
cttsai-stripe
force-pushed
the
cttsai/mobilesdk-4697-spm-tax-billing-filter
branch
from
August 5, 2026 18:12
9567195 to
3ffddaa
Compare
cttsai-stripe
force-pushed
the
cttsai/mobilesdk-4667-us-bank-account-tax-address
branch
from
August 5, 2026 23:28
8434af9 to
1f16579
Compare
cttsai-stripe
force-pushed
the
cttsai/mobilesdk-4697-spm-tax-billing-filter
branch
from
August 5, 2026 23:28
3ffddaa to
d15109b
Compare
cttsai-stripe
force-pushed
the
cttsai/mobilesdk-4667-us-bank-account-tax-address
branch
from
August 5, 2026 23:35
1f16579 to
2bf5d12
Compare
cttsai-stripe
force-pushed
the
cttsai/mobilesdk-4697-spm-tax-billing-filter
branch
from
August 5, 2026 23:35
d15109b to
357e576
Compare
cttsai-stripe
force-pushed
the
cttsai/mobilesdk-4667-us-bank-account-tax-address
branch
from
August 6, 2026 00:14
2bf5d12 to
ad60921
Compare
cttsai-stripe
force-pushed
the
cttsai/mobilesdk-4697-spm-tax-billing-filter
branch
from
August 6, 2026 00:15
357e576 to
0df3714
Compare
cttsai-stripe
force-pushed
the
cttsai/mobilesdk-4667-us-bank-account-tax-address
branch
from
August 6, 2026 18:17
ad60921 to
018e20b
Compare
cttsai-stripe
force-pushed
the
cttsai/mobilesdk-4697-spm-tax-billing-filter
branch
from
August 6, 2026 18:17
0df3714 to
09b6cb9
Compare
cttsai-stripe
force-pushed
the
cttsai/mobilesdk-4667-us-bank-account-tax-address
branch
from
August 6, 2026 20:22
018e20b to
dad741e
Compare
cttsai-stripe
force-pushed
the
cttsai/mobilesdk-4697-spm-tax-billing-filter
branch
from
August 6, 2026 20:22
09b6cb9 to
f884d2a
Compare
…697) Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Committed-By-Agent: claude
… Session (MOBILESDK-4697) Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Committed-By-Agent: claude
…ountry, and wiring tests (MOBILESDK-4697) Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Committed-By-Agent: claude Committed-By-Agent: codex Co-authored-by: codex <noreply@openai.com> Committed-By-Agent: codex Co-authored-by: codex <noreply@openai.com>
cttsai-stripe
force-pushed
the
cttsai/mobilesdk-4667-us-bank-account-tax-address
branch
from
August 6, 2026 22:39
dad741e to
1fba781
Compare
cttsai-stripe
force-pushed
the
cttsai/mobilesdk-4697-spm-tax-billing-filter
branch
from
August 6, 2026 22:39
f884d2a to
f482343
Compare
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.
Summary
On the Checkout Session path, when automatic tax uses billing as its tax address source, filter out saved payment methods whose billing address lacks the country-specific fields Stripe Tax needs. This prevents offering a saved payment method that would hard-fail at confirm.
This PR is stacked after the new-payment-method work in #13713 and #13718. It reuses the shared country requirements from #13717 without mixing saved-payment-method behavior into MOBILESDK-4667.
Motivation
Verified against pay-server:
FinalizePaymentTaxesrecomputes tax from the selected payment method billing address at confirm and raisescheckout_automatic_tax_confirmation_failure(subscription mode:billing_automatic_tax_unrecognized_customer_location), HTTP 400, on any non-completetax status. There is no silent zero-tax path. That confirm guard is not payment-method-type gated, so the filter intentionally applies to all saved-payment-method types.Email does not need client-side sufficiency validation; the backend handles it. This change validates only the billing address required to compute tax for the payment method country.
Implementation:
PaymentMethod.hasSufficientBillingDetailsForAutomaticTax()using the shared country requirements from Share automatic-tax billing address primitives (MOBILESDK-4667) #13717.DefaultPaymentMethodFilterfor every saved payment-method type.PaymentMethodMetadatathroughCustomerStateintoFilterParams; other PaymentSheet integrations remain no-ops.Saved-card billing-details editing remains separate and standalone in #13506.
JIRA: MOBILESDK-4697. iOS sibling: MOBILESDK-4698.
Testing
Targeted unit tests passed:
BillingDetailsValidationTest: country-specific address sufficiency.DefaultPaymentMethodFilterTest: gating, null/incomplete addresses, country boundaries, and non-card saved methods.CreateCustomerStateTest: propagation of the automatic-tax billing-address requirement.The focused PaymentSheet unit-test set,
:paymentsheet:detekt, and:paymentsheet:apiCheckpassed.Screenshots
N/A - no new UI surface; this removes unusable saved payment methods from the list.
Changelog
N/A - Checkout Session is behind
@CheckoutSessionPreview; the implementation is internal/library-group restricted.