Verifying card details


Flow showing how to verify card details

Call VerifyAvsCvv service

To verify cards, you need to call VerifyAvsCvv, supplying the PAN, expiry date, name on the card, and cardholder's address. (To perform the AVS check, you need the House/Flat number and the post code). To perform the CVV check, you also need the CVV.

Get verification response

To find out whether the card passed validation and the results of the verification, you need to retrieve the verification response.

Are there any validation errors?

If the card failed validation, card conditions within the range 1 to 6 are returned (verification message codes are 50 and above). Therefore, to determine whether validation was successful, check whether CardCondition contains any of the codes 1 to 6.

If validation failed, verification is not performed.

If there are validation errors you need to extract the codes and any returned reasons to determine why the card details failed validation.

Not every code has an associated reason.

Your application should interpret the validation results and display messages suitable for your users. For example, when code 4 is returned with no reason code, your application could display "The Card Number failed validation".

Display results and returned data

Your business rules determine whether you display just the overall result of the verification (PreAuthorised) or the results of the AVS check (AvsMatched), CVV check (CvvMatched) and post code match (PostcodeMatched) as well.

You should also check the verification message returned in CardCondition:

Your business rules may prevent you accepting details when a warning is returned. Your application should test for these specific messages and, if they are returned, replace the successful PreAuthorised result.

Your application should interpret the verification message and display a message that is suitable for your users. For example, when code 62 is returned, your application could display "Address not verified because AVS check has not been performed".