Card Verification with CVD & AVS
Verifies the validity of the credit card, expiry date and any additional details (such as the Card Verification Digits or Address Verification details). It does not verify the available amount or lock any funds on the credit card.
The Card Validation Digits (CVD) value refers to the numbers appearing on the back of the credit card rather than the numbers imprinted on the front. It is an optional fraud prevention tool that enables merchants to verify data provided by the cardholder at transaction time. This data is submitted along with the transaction to the issuing bank, which provides a response indicating whether the data is a match.
The response that is received from CVD verification is intended to provide added security and fraud prevention, but the response itself does not affect the completion of a transaction. Upon receiving a response, the choice whether to proceed with a transaction is left entirely to the merchant. The response is not a strict guideline of which transaction will approve or decline.
Address Verification Service (AVS) is an optional fraud-prevention tool offered by issuing banks whereby a cardholder's address is submitted as part of the transaction authorization. The AVS address is then compared to the address kept on file at the issuing bank. AVS checks whether the street number, street name and zip/postal code match. The issuing bank returns an AVS result code indicating whether the data was matched successfully. Regardless of the AVS result code returned, the credit card is authorized or declined by the issuing bank.
The response that is received from AVS verification is intended to provide added security and fraud prevention, but the response itself does not affect the completion of a transaction. Upon receiving a response, the choice to proceed with a transaction is left entirely to the merchant. The responses is not a strict guideline of whether a transaction will be approved or declined.
Things to consider:
Security:The CVD value must only be passed to the payment gateway. Under no circumstances may it be stored for subsequent uses or displayed as part of the receipt information.
package Canada;
import JavaAPI.*;
public class TestCanadaCardVerification
{
public static void main(String[] args)
{
String store_id = "store5";
String api_token = "yesguy";
java.util.Date createDate = new java.util.Date();
String order_id = "Test"+createDate.getTime();
String pan = "4242424242424242";
String expdate = "1901"; //YYMM format
String crypt = "7";
String processing_country_code = "CA";
boolean status_check = false;
AvsInfo avsCheck = new AvsInfo();
avsCheck.setAvsStreetNumber("212");
avsCheck.setAvsStreetName("Payton Street");
avsCheck.setAvsZipCode("M1M1M1");
CvdInfo cvdCheck = new CvdInfo();
cvdCheck.setCvdIndicator("1");
cvdCheck.setCvdValue("099");
CardVerification cardVerification = new CardVerification();
cardVerification.setOrderId(order_id);
cardVerification.setPan(pan);
cardVerification.setExpdate(expdate);
cardVerification.setCryptType(crypt);
cardVerification.setAvsInfo(avsCheck);
cardVerification.setCvdInfo(cvdCheck);
//optional - Credential on File details
CofInfo cof = new CofInfo();
cof.setPaymentIndicator("U");
cof.setPaymentInformation("2");
cof.setIssuerId("139X3130ASCXAS9");
cardVerification.setCofInfo(cof);
HttpsPostRequest mpgReq = new HttpsPostRequest();
mpgReq.setProcCountryCode(processing_country_code);
mpgReq.setTestMode(true); //false or comment out this line for production transactions
mpgReq.setStoreId(store_id);
mpgReq.setApiToken(api_token);
mpgReq.setTransaction(cardVerification);
mpgReq.setStatusCheck(status_check);
mpgReq.send();
try
{
Receipt receipt = mpgReq.getReceipt();
System.out.println("CardType = " + receipt.getCardType());
System.out.println("TransAmount = " + receipt.getTransAmount());
System.out.println("TxnNumber = " + receipt.getTxnNumber());
System.out.println("ReceiptId = " + receipt.getReceiptId());
System.out.println("TransType = " + receipt.getTransType());
System.out.println("ReferenceNum = " + receipt.getReferenceNum());
System.out.println("ResponseCode = " + receipt.getResponseCode());
System.out.println("ISO = " + receipt.getISO());
System.out.println("BankTotals = " + receipt.getBankTotals());
System.out.println("Message = " + receipt.getMessage());
System.out.println("AuthCode = " + receipt.getAuthCode());
System.out.println("Complete = " + receipt.getComplete());
System.out.println("TransDate = " + receipt.getTransDate());
System.out.println("TransTime = " + receipt.getTransTime());
System.out.println("Ticket = " + receipt.getTicket());
System.out.println("TimedOut = " + receipt.getTimedOut());
System.out.println("IsVisaDebit = " + receipt.getIsVisaDebit());
System.out.println("IssuerId = " + receipt.getIssuerId());
}
catch (Exception e)
{
e.printStackTrace();
}
}
}
Card Verification transaction object definition
CardVerification cardVerification = new CardVerification();
HttpsPostRequest object for Card Verification transaction
HttpsPostRequest mpgReq = new HttpsPostRequest();
mpgReq.setTransaction(cardVerification);
Card Verification transaction object mandatory values
Card Verification transaction object optional values
CvdInfo object mandatory values
AvsInfo object mandatory values
CVD & AVS Response Fields
Card Verification with Credential on File
Merchants can use Card Verification with COF AVS and CVD as the first transaction prior to storing the credentials instead of Purchase or Preauthorization.
Verifies the validity of the credit card, expiry date and any additional details (such as the Card Verification Digits or Address Verification details). It does not verify the available amount or lock any funds on the credit card.
The Card Validation Digits (CVD) value refers to the numbers appearing on the back of the credit card rather than the numbers imprinted on the front. It is an optional fraud prevention tool that enables merchants to verify data provided by the cardholder at transaction time. This data is submitted along with the transaction to the issuing bank, which provides a response indicating whether the data is a match.
The response that is received from CVD verification is intended to provide added security and fraud prevention, but the response itself does not affect the completion of a transaction. Upon receiving a response, the choice whether to proceed with a transaction is left entirely to the merchant. The response is not a strict guideline of which transaction will approve or decline.
Address Verification Service (AVS) is an optional fraud-prevention tool offered by issuing banks whereby a cardholder's address is submitted as part of the transaction authorization. The AVS address is then compared to the address kept on file at the issuing bank. AVS checks whether the street number, street name and zip/postal code match. The issuing bank returns an AVS result code indicating whether the data was matched successfully. Regardless of the AVS result code returned, the credit card is authorized or declined by the issuing bank.
The response that is received from AVS verification is intended to provide added security and fraud prevention, but the response itself does not affect the completion of a transaction. Upon receiving a response, the choice to proceed with a transaction is left entirely to the merchant. The responses is not a strict guideline of whether a transaction will be approved or declined.
Things to consider:
Security:The CVD value must only be passed to the payment gateway. Under no circumstances may it be stored for subsequent uses or displayed as part of the receipt information.
package Canada;
import JavaAPI.*;
public class TestCanadaCardVerification
{
public static void main(String[] args)
{
String store_id = "store5";
String api_token = "yesguy";
java.util.Date createDate = new java.util.Date();
String order_id = "Test"+createDate.getTime();
String pan = "4242424242424242";
String expdate = "1901"; //YYMM format
String crypt = "7";
String processing_country_code = "CA";
boolean status_check = false;
AvsInfo avsCheck = new AvsInfo();
avsCheck.setAvsStreetNumber("212");
avsCheck.setAvsStreetName("Payton Street");
avsCheck.setAvsZipCode("M1M1M1");
CvdInfo cvdCheck = new CvdInfo();
cvdCheck.setCvdIndicator("1");
cvdCheck.setCvdValue("099");
CardVerification cardVerification = new CardVerification();
cardVerification.setOrderId(order_id);
cardVerification.setPan(pan);
cardVerification.setExpdate(expdate);
cardVerification.setCryptType(crypt);
cardVerification.setAvsInfo(avsCheck);
cardVerification.setCvdInfo(cvdCheck);
//optional - Credential on File details
CofInfo cof = new CofInfo();
cof.setPaymentIndicator("U");
cof.setPaymentInformation("2");
cof.setIssuerId("139X3130ASCXAS9");
cardVerification.setCofInfo(cof);
HttpsPostRequest mpgReq = new HttpsPostRequest();
mpgReq.setProcCountryCode(processing_country_code);
mpgReq.setTestMode(true); //false or comment out this line for production transactions
mpgReq.setStoreId(store_id);
mpgReq.setApiToken(api_token);
mpgReq.setTransaction(cardVerification);
mpgReq.setStatusCheck(status_check);
mpgReq.send();
try
{
Receipt receipt = mpgReq.getReceipt();
System.out.println("CardType = " + receipt.getCardType());
System.out.println("TransAmount = " + receipt.getTransAmount());
System.out.println("TxnNumber = " + receipt.getTxnNumber());
System.out.println("ReceiptId = " + receipt.getReceiptId());
System.out.println("TransType = " + receipt.getTransType());
System.out.println("ReferenceNum = " + receipt.getReferenceNum());
System.out.println("ResponseCode = " + receipt.getResponseCode());
System.out.println("ISO = " + receipt.getISO());
System.out.println("BankTotals = " + receipt.getBankTotals());
System.out.println("Message = " + receipt.getMessage());
System.out.println("AuthCode = " + receipt.getAuthCode());
System.out.println("Complete = " + receipt.getComplete());
System.out.println("TransDate = " + receipt.getTransDate());
System.out.println("TransTime = " + receipt.getTransTime());
System.out.println("Ticket = " + receipt.getTicket());
System.out.println("TimedOut = " + receipt.getTimedOut());
System.out.println("IsVisaDebit = " + receipt.getIsVisaDebit());
System.out.println("IssuerId = " + receipt.getIssuerId());
}
catch (Exception e)
{
e.printStackTrace();
}
}
}
Card Verification transaction object definition
CardVerification cardVerification = new CardVerification();
HttpsPostRequest object for Card Verification transaction
HttpsPostRequest mpgReq = new HttpsPostRequest();
mpgReq.setTransaction(cardVerification);
Card Verification transaction object mandatory values
Card Verification transaction object optional values
CvdInfo object mandatory values
AvsInfo object mandatory values
CVD & AVS Response Fields
Credential on File Info Object and Variables
The Credential on File Info object is nested within the request for the applicable transaction types.
Object:
Variables in the cof object:
- PaymentIndicator
- PaymentInformation
- IssuerID
Definitions of Request Fields – Credential on File
Card Verification with Vault and CVD & AVS
This transaction uses the data key to identify a previously registered credit card profile. The details saved within the profile are then submitted to perform a Card Verification transaction.
The data key may be a temporary one generated using Hosted Tokenization or it may be a permanent one from the Vault.
The Vault feature allows merchants to create long term customer profiles, edit those profiles, and use them to process transactions without having to enter financial information each time.
The only difference between processing a Card Verification using a temporary token versus a standard Vault token is whether the expiry date is sent. With the Vault token, the expiry date is stored along with the card number as part of the Vault profile. Therefore, there is no need to send the expiry date again with each normal Vault transaction. However, a temporary token transaction may have only stored the card number. Therefore, in this scenario the expiry date must be sent when you submit the Card Verification.
Things to consider:
Security:The CVD value must only be passed to the payment gateway. Under no circumstances may it be stored for subsequent uses or displayed as part of the receipt information.
package Canada;
import java.io.*;
import JavaAPI.*;
public class TestCanadaResCardVerificationCC
{
public static void main(String args[]) throws IOException
{
String store_id = "store5";
String api_token = "yesguy";
String data_key = "AoG4zAFzlFFfxcVmzWAZVQuhj";
java.util.Date createDate = new java.util.Date();
String order_id = "Test"+createDate.getTime();
String crypt_type = "7";
String processing_country_code = "CA";
boolean status_check = false;
/********************** Efraud Variables ************************/
AvsInfo avs = new AvsInfo ();
avs.setAvsStreetName("test ave");
avs.setAvsStreetNumber("123");
avs.setAvsZipcode("123456");
CvdInfo cvd = new CvdInfo ("1", "099");
/*********************** Transaction Object *******************************/
ResCardVerificationCC resCardVerificationCC = new ResCardVerificationCC();
resCardVerificationCC.setDataKey(data_key);
resCardVerificationCC.setOrderId(order_id);
resCardVerificationCC.setCryptType(crypt_type);
resCardVerificationCC.setAvsInfo(avs);
resCardVerificationCC.setCvdInfo(cvd);
//resCardVerificationCC.setExpdate("1412"); //For Temp Tokens only
//Mandatory - Credential on File details
CofInfo cof = new CofInfo();
cof.setPaymentIndicator("U");
cof.setPaymentInformation("2");
cof.setIssuerId("139X3130ASCXAS9");
resCardVerificationCC.setCofInfo(cof);
HttpsPostRequest mpgReq = new HttpsPostRequest();
mpgReq.setProcCountryCode(processing_country_code);
mpgReq.setTestMode(true); //false or comment out this line for production transactions
mpgReq.setStoreId(store_id);
mpgReq.setApiToken(api_token);
mpgReq.setTransaction(resCardVerificationCC);
mpgReq.setStatusCheck(status_check);
mpgReq.send();
/************************ Receipt Object ******************************/
try
{
Receipt resreceipt = mpgReq.getReceipt();
System.out.println("DataKey = " + resreceipt.getDataKey());
System.out.println("ReceiptId = " + resreceipt.getReceiptId());
System.out.println("ReferenceNum = " + resreceipt.getReferenceNum());
System.out.println("ResponseCode = " + resreceipt.getResponseCode());
System.out.println("AuthCode = " + resreceipt.getAuthCode());
System.out.println("ISO = " + resreceipt.getISO());
System.out.println("Message = " + resreceipt.getMessage());
System.out.println("TransDate = " + resreceipt.getTransDate());
System.out.println("TransTime = " + resreceipt.getTransTime());
System.out.println("TransType = " + resreceipt.getTransType());
System.out.println("Complete = " + resreceipt.getComplete());
System.out.println("TransAmount = " + resreceipt.getTransAmount());
System.out.println("CardType = " + resreceipt.getCardType());
System.out.println("TxnNumber = " + resreceipt.getTxnNumber());
System.out.println("TimedOut = " + resreceipt.getTimedOut());
System.out.println("ResSuccess = " + resreceipt.getResSuccess());
System.out.println("PaymentType = " + resreceipt.getPaymentType() + "\n");
System.out.println("IssuerId = " + resreceipt.getIssuerId());
//Contents of ResolveData
System.out.println("Cust ID = " + resreceipt.getResCustId());
System.out.println("Phone = " + resreceipt.getResPhone());
System.out.println("Email = " + resreceipt.getResEmail());
System.out.println("Note = " + resreceipt.getResNote());
System.out.println("Masked Pan = " + resreceipt.getResMaskedPan());
System.out.println("Exp Date = " + resreceipt.getResExpdate());
System.out.println("Crypt Type = " + resreceipt.getResCryptType());
System.out.println("Avs Street Number = " + resreceipt.getResAvsStreetNumber());
System.out.println("Avs Street Name = " + resreceipt.getResAvsStreetName());
System.out.println("Avs Zipcode = " + resreceipt.getResAvsZipcode());
}
catch (Exception e)
{
e.printStackTrace();
}
}
} // end TestResCardVerificationCC
Card Verification with Vault transaction object definition
ResCardVerificationCC resCardVerificationCC = new ResCardVerificationCC();
HttpsPostRequest mpgReq = new HttpsPostRequest();
mpgReq.setTransaction(resCardVerificationCC);
Card Verification with Vault transaction object mandatory values
Card Verification with Vault transaction object optional values
CvdInfo object mandatory values
AvsInfo object mandatory values