Skip to content

340 BAD_MASK Cause error response for 14-digit credit card #30

@peacefulseeker

Description

@peacefulseeker

We've noticed that some Inquiry requests with PENC marked as MASK and having a 14-digit long credit card mask
are not meeting the regex expectation.

Full error message received during processing the request.

{"ERRO": 340, "ERROR_0": "340 BAD_MASK Cause: [value [123456XXXX1111] did not match regex /^\\d{6}X{5,9}\\d{1,4}$/], Field: [PTOK], Value: [123456XXXX1111]", "ERROR_COUNT": 1, "MODE": "E", "WARNING_COUNT": 0}

123456XXXX1111 - 14-digit long credit card mask number(replaced digits for real customer mask, but kept the length),
and it's indeed not matching the regex, because the amount of X is expected to be at least 5, while 14-digit CCs will have 4, given then BIN is 6-digit long, which is the case for Discover credit cards.

How would you recommend evaluating such credit cards? We had ~ 80 cases where the Discover credit card has failed to be evaluated because of the issue described.

Perhaps the regex expectation should be changed from your side?

P.S. We're using kount-ris-sdk==3.2.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions