VerifyCardValidationData - AWS Payment Cryptography Data Plane

VerifyCardValidationData

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 AWS 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. AWS 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 AWS Payment Cryptography User Guide.

Cross-account use: This operation can't be used across different AWS accounts.

Related operations:

Request Syntax

POST /cardvalidationdata/verify HTTP/1.1 Content-type: application/json { "KeyIdentifier": "string", "PrimaryAccountNumber": "string", "ValidationData": "string", "VerificationAttributes": { ... } }

URI Request Parameters

The request does not use any URI parameters.

Request Body

The request accepts the following data in JSON format.

KeyIdentifier

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

Type: String

Length Constraints: Minimum length of 7. Maximum length of 322.

Pattern: arn:aws:payment-cryptography:[a-z]{2}-[a-z]{1,16}-[0-9]+:[0-9]{12}:(key/[0-9a-zA-Z]{16,64}|alias/[a-zA-Z0-9/_-]+)$|^alias/[a-zA-Z0-9/_-]+

Required: Yes

PrimaryAccountNumber

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

Type: String

Length Constraints: Minimum length of 12. Maximum length of 19.

Pattern: [0-9]+

Required: Yes

ValidationData

The CVV or CSC value for use for card data verification within AWS Payment Cryptography.

Type: String

Length Constraints: Minimum length of 3. Maximum length of 5.

Pattern: [0-9]+

Required: Yes

VerificationAttributes

The algorithm to use for verification of card data within AWS Payment Cryptography.

Type: CardVerificationAttributes object

Note: This object is a Union. Only one member of this object can be specified or returned.

Required: Yes

Response Syntax

HTTP/1.1 200 Content-type: application/json { "KeyArn": "string", "KeyCheckValue": "string" }

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

KeyArn

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

Type: String

Length Constraints: Minimum length of 70. Maximum length of 150.

Pattern: arn:aws:payment-cryptography:[a-z]{2}-[a-z]{1,16}-[0-9]+:[0-9]{12}:key/[0-9a-zA-Z]{16,64}

KeyCheckValue

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.

AWS Payment Cryptography computes the KCV according to the CMAC specification.

Type: String

Length Constraints: Minimum length of 4. Maximum length of 16.

Pattern: [0-9a-fA-F]+

Errors

AccessDeniedException

You do not have sufficient access to perform this action.

HTTP Status Code: 403

InternalServerException

The request processing has failed because of an unknown error, exception, or failure.

HTTP Status Code: 500

ResourceNotFoundException

The request was denied due to an invalid resource error.

HTTP Status Code: 404

ThrottlingException

The request was denied due to request throttling.

HTTP Status Code: 429

ValidationException

The request was denied due to an invalid request error.

HTTP Status Code: 400

VerificationFailedException

This request failed verification.

HTTP Status Code: 400

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: