PaymentCryptographyDataPlane / Client / verify_card_validation_data

verify_card_validation_data#

PaymentCryptographyDataPlane.Client.verify_card_validation_data(**kwargs)#

Verifies card-related validation data using algorithms such as Card Verification Values (CVV/CVV2), Dynamic Card Verification Values (dCVV/dCVV2) and Card Security Codes (CSC). For more information, see Verify card data in the Amazon Web Services Payment Cryptography User Guide.

This operation validates the CVV or CSC codes that is printed on a payment credit or debit card during card payment transaction. The input values are typically provided as part of an inbound transaction to an issuer or supporting platform partner. Amazon Web Services Payment Cryptography uses CVV or CSC, PAN (Primary Account Number) and expiration date of the card to check its validity during transaction processing. In this operation, the CVK (Card Verification Key) encryption key for use with card data verification is same as the one in used for GenerateCardValidationData.

For information about valid keys for this operation, see Understanding key attributes and Key types for specific data operations in the Amazon Web Services Payment Cryptography User Guide.

Cross-account use: This operation can’t be used across different Amazon Web Services accounts.

Related operations:

  • GenerateCardValidationData

  • VerifyAuthRequestCryptogram

  • VerifyPinData

See also: AWS API Documentation

Request Syntax

response = client.verify_card_validation_data(
    KeyIdentifier='string',
    PrimaryAccountNumber='string',
    VerificationAttributes={
        'AmexCardSecurityCodeVersion1': {
            'CardExpiryDate': 'string'
        },
        'AmexCardSecurityCodeVersion2': {
            'CardExpiryDate': 'string',
            'ServiceCode': 'string'
        },
        'CardVerificationValue1': {
            'CardExpiryDate': 'string',
            'ServiceCode': 'string'
        },
        'CardVerificationValue2': {
            'CardExpiryDate': 'string'
        },
        'CardHolderVerificationValue': {
            'UnpredictableNumber': 'string',
            'PanSequenceNumber': 'string',
            'ApplicationTransactionCounter': 'string'
        },
        'DynamicCardVerificationCode': {
            'UnpredictableNumber': 'string',
            'PanSequenceNumber': 'string',
            'ApplicationTransactionCounter': 'string',
            'TrackData': 'string'
        },
        'DynamicCardVerificationValue': {
            'PanSequenceNumber': 'string',
            'CardExpiryDate': 'string',
            'ServiceCode': 'string',
            'ApplicationTransactionCounter': 'string'
        },
        'DiscoverDynamicCardVerificationCode': {
            'CardExpiryDate': 'string',
            'UnpredictableNumber': 'string',
            'ApplicationTransactionCounter': 'string'
        }
    },
    ValidationData='string'
)
Parameters:
  • KeyIdentifier (string) –

    [REQUIRED]

    The keyARN of the CVK encryption key that Amazon Web Services Payment Cryptography uses to verify card data.

  • PrimaryAccountNumber (string) –

    [REQUIRED]

    The Primary Account Number (PAN), a unique identifier for a payment credit or debit card that associates the card with a specific account holder.

  • VerificationAttributes (dict) –

    [REQUIRED]

    The algorithm to use for verification of card data within Amazon Web Services Payment Cryptography.

    Note

    This is a Tagged Union structure. Only one of the following top level keys can be set: AmexCardSecurityCodeVersion1, AmexCardSecurityCodeVersion2, CardVerificationValue1, CardVerificationValue2, CardHolderVerificationValue, DynamicCardVerificationCode, DynamicCardVerificationValue, DiscoverDynamicCardVerificationCode.

    • AmexCardSecurityCodeVersion1 (dict) –

      Card data parameters that are required to generate a Card Security Code (CSC2) for an AMEX payment card.

      • CardExpiryDate (string) – [REQUIRED]

        The expiry date of a payment card.

    • AmexCardSecurityCodeVersion2 (dict) –

      Card data parameters that are required to verify a Card Security Code (CSC2) for an AMEX payment card.

      • CardExpiryDate (string) – [REQUIRED]

        The expiry date of a payment card.

      • ServiceCode (string) – [REQUIRED]

        The service code of the AMEX payment card. This is different from the Card Security Code (CSC).

    • CardVerificationValue1 (dict) –

      Card data parameters that are required to verify Card Verification Value (CVV) for the payment card.

      • CardExpiryDate (string) – [REQUIRED]

        The expiry date of a payment card.

      • ServiceCode (string) – [REQUIRED]

        The service code of the payment card. This is different from Card Security Code (CSC).

    • CardVerificationValue2 (dict) –

      Card data parameters that are required to verify Card Verification Value (CVV2) for the payment card.

      • CardExpiryDate (string) – [REQUIRED]

        The expiry date of a payment card.

    • CardHolderVerificationValue (dict) –

      Card data parameters that are required to verify a cardholder verification value for the payment card.

      • UnpredictableNumber (string) – [REQUIRED]

        A random number generated by the issuer.

      • PanSequenceNumber (string) – [REQUIRED]

        A number that identifies and differentiates payment cards with the same Primary Account Number (PAN).

      • ApplicationTransactionCounter (string) – [REQUIRED]

        The transaction counter value that comes from a point of sale terminal.

    • DynamicCardVerificationCode (dict) –

      Card data parameters that are required to verify CDynamic Card Verification Code (dCVC) for the payment card.

      • UnpredictableNumber (string) – [REQUIRED]

        A random number generated by the issuer.

      • PanSequenceNumber (string) – [REQUIRED]

        A number that identifies and differentiates payment cards with the same Primary Account Number (PAN).

      • ApplicationTransactionCounter (string) – [REQUIRED]

        The transaction counter value that comes from the terminal.

      • TrackData (string) – [REQUIRED]

        The data on the two tracks of magnetic cards used for financial transactions. This includes the cardholder name, PAN, expiration date, bank ID (BIN) and several other numbers the issuing bank uses to validate the data received.

    • DynamicCardVerificationValue (dict) –

      Card data parameters that are required to verify CDynamic Card Verification Value (dCVV) for the payment card.

      • PanSequenceNumber (string) – [REQUIRED]

        A number that identifies and differentiates payment cards with the same Primary Account Number (PAN).

      • CardExpiryDate (string) – [REQUIRED]

        The expiry date of a payment card.

      • ServiceCode (string) – [REQUIRED]

        The service code of the payment card. This is different from Card Security Code (CSC).

      • ApplicationTransactionCounter (string) – [REQUIRED]

        The transaction counter value that comes from the terminal.

    • DiscoverDynamicCardVerificationCode (dict) –

      Card data parameters that are required to verify CDynamic Card Verification Code (dCVC) for the payment card.

      • CardExpiryDate (string) – [REQUIRED]

        The expiry date of a payment card.

      • UnpredictableNumber (string) – [REQUIRED]

        A random number that is generated by the issuer.

      • ApplicationTransactionCounter (string) – [REQUIRED]

        The transaction counter value that comes from the terminal.

  • ValidationData (string) –

    [REQUIRED]

    The CVV or CSC value for use for card data verification within Amazon Web Services Payment Cryptography.

Return type:

dict

Returns:

Response Syntax

{
    'KeyArn': 'string',
    'KeyCheckValue': 'string'
}

Response Structure

  • (dict) –

    • KeyArn (string) –

      The keyARN of the CVK encryption key that Amazon Web Services Payment Cryptography uses to verify CVV or CSC.

    • KeyCheckValue (string) –

      The key check value (KCV) of the encryption key. The KCV is used to check if all parties holding a given key have the same key or to detect that a key has changed.

      Amazon Web Services Payment Cryptography computes the KCV according to the CMAC specification.

Exceptions