feat: restrict card number in dc to iins/card schemes#233
Open
jakubjasinsky wants to merge 2 commits intomasterfrom
Open
feat: restrict card number in dc to iins/card schemes#233jakubjasinsky wants to merge 2 commits intomasterfrom
jakubjasinsky wants to merge 2 commits intomasterfrom
Conversation
6320217 to
f051e24
Compare
tomasz-pazdziurek-cko
approved these changes
Feb 16, 2026
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
Adds card number restriction support to Dynamic Checkout, allowing merchants to limit accepted cards by IIN (Issuer Identification Number) and card scheme. When a
restricted card is entered, the pay button is disabled and a localized error message is shown.
Changes
restrict_to_iinsandrestrict_to_schemesnullable arrays to theCardtypepostMessageevents (card_iinfield)schemeChangedeventsetCardRestrictionState()to disable the pay button and show/clear the error messagecleanErrorMessages()runs so the error isn't prematurely cleared"card-not-supported-error-message"translation in EN, ES, FR, PL, PTnot-allowedcursor) for the pay buttonImpact
restrict_to_iinsandrestrict_to_schemesare nullable, so existing integrations without these fields are unaffectedTesting Plan
restrict_to_iinsset (e.g., specific BIN prefixes) and verify:restrict_to_schemesset (e.g.,["visa"]) and verify:nullor[]), checkout behaves as beforeAdditional Context
postMessageevents from the card iframe, while scheme restriction uses the existingschemeChangedlistener — two separate codepaths because the data arrives from different sources
cleanErrorMessages()method was updated to preserve the restriction error, preventing it from being cleared on subsequent input events