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 supports cross-account use when the key has a resource-based policy that grants access. For more information, see Resource-based policies.
Related operations:
Parameters:
-
key_identifier
(KeyArnOrKeyAliasType)
–
The keyARN of the CVK encryption key that Amazon Web Services Payment Cryptography uses to verify card data.
-
primary_account_number
(PrimaryAccountNumberType)
–
The Primary Account Number (PAN), a unique identifier for a payment credit or debit card that associates the card with a specific account holder.
-
verification_attributes
(CardVerificationAttributes)
–
The algorithm to use for verification of card data within Amazon Web Services Payment Cryptography.
-
validation_data
(ValidationDataType)
–
The CVV or CSC value for use for card data verification within Amazon Web Services Payment Cryptography.
Raises:
Source code in docs_src/capo_payment_cryptography_data/_services/payment_cryptography_data.py
| def verify_card_validation_data(
self,
key_identifier: "capo_payment_cryptography_data.types.key_arn_or_key_alias_type.KeyArnOrKeyAliasType",
primary_account_number: "capo_payment_cryptography_data.types.primary_account_number_type.PrimaryAccountNumberType",
verification_attributes: "capo_payment_cryptography_data.types.card_verification_attributes.CardVerificationAttributes",
validation_data: "capo_payment_cryptography_data.types.validation_data_type.ValidationDataType",
*,
config_overrides: Optional[PaymentCryptographyDataClientConfig] = None,
) -> "capo_payment_cryptography_data.types.verify_card_validation_data_output.VerifyCardValidationDataOutput":
"""<p>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 <a href="https://docs.aws.amazon.com/payment-cryptography/latest/userguide/verify-card-data.html">Verify card data</a> in the <i>Amazon Web Services Payment Cryptography User Guide</i>.</p> <p>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 <a>GenerateCardValidationData</a>. </p> <p>For information about valid keys for this operation, see <a href="https://docs.aws.amazon.com/payment-cryptography/latest/userguide/keys-validattributes.html">Understanding key attributes</a> and <a href="https://docs.aws.amazon.com/payment-cryptography/latest/userguide/crypto-ops-validkeys-ops.html">Key types for specific data operations</a> in the <i>Amazon Web Services Payment Cryptography User Guide</i>. </p> <p> <b>Cross-account use</b>: This operation supports cross-account use when the key has a resource-based policy that grants access. For more information, see <a href="https://docs.aws.amazon.com/payment-cryptography/latest/userguide/security_iam_resource-based-policies.html">Resource-based policies</a>.</p> <p> <b>Related operations:</b> </p> <ul> <li> <p> <a>GenerateCardValidationData</a> </p> </li> <li> <p> <a>VerifyAuthRequestCryptogram</a> </p> </li> <li> <p> <a>VerifyPinData</a> </p> </li> </ul>
Args:
key_identifier: <p>The <code>keyARN</code> of the CVK encryption key that Amazon Web Services Payment Cryptography uses to verify card data.</p>
primary_account_number: <p>The Primary Account Number (PAN), a unique identifier for a payment credit or debit card that associates the card with a specific account holder.</p>
verification_attributes: <p>The algorithm to use for verification of card data within Amazon Web Services Payment Cryptography.</p>
validation_data: <p>The CVV or CSC value for use for card data verification within Amazon Web Services Payment Cryptography.</p>
Raises:
capo_payment_cryptography_data.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient access to perform this action.</p>
capo_payment_cryptography_data.errors.internal_server_exception.InternalServerException: <p>The request processing has failed because of an unknown error, exception, or failure.</p>
capo_payment_cryptography_data.errors.resource_not_found_exception.ResourceNotFoundException: <p>The request was denied due to an invalid resource error.</p>
capo_payment_cryptography_data.errors.throttling_exception.ThrottlingException: <p>The request was denied due to request throttling.</p>
capo_payment_cryptography_data.errors.validation_exception.ValidationException: <p>The request was denied due to an invalid request error.</p>
capo_payment_cryptography_data.errors.verification_failed_exception.VerificationFailedException: <p>This request failed verification.</p>
capo_payment_cryptography_data.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_payment_cryptography_data.types.verify_card_validation_data_input.VerifyCardValidationDataInput]",
) -> OperationResponse[
"capo_payment_cryptography_data.types.verify_card_validation_data_output.VerifyCardValidationDataOutput"
]:
import capo_payment_cryptography_data._operations.payment_cryptography_data_plane.verify_card_validation_data
output, http_response = (
capo_payment_cryptography_data._operations.payment_cryptography_data_plane.verify_card_validation_data.verify_card_validation_data(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
def _redact_input(
input_: "capo_payment_cryptography_data.types.verify_card_validation_data_input.VerifyCardValidationDataInput",
) -> dict[str, Any]:
import capo_payment_cryptography_data.types.verify_card_validation_data_input
return capo_payment_cryptography_data.types.verify_card_validation_data_input.redact_sensitive(
input_
)
interceptors_, options_ = self.operation_options(
config_overrides,
OperationLogging("VerifyCardValidationData", redact_input=_redact_input),
)
input_: capo_payment_cryptography_data.types.verify_card_validation_data_input.VerifyCardValidationDataInput = {
"key_identifier": key_identifier,
"primary_account_number": primary_account_number,
"verification_attributes": verification_attributes,
"validation_data": validation_data,
}
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|