My Profile_


Mag Swipe Purchase

A Purchase verifies funds on the customer’s card, removes the funds and prepares them for deposit into the merchant’s account.

This transaction allows for the ability to pass a Track 2 value for processing that has been collected from a standard unencrypted MSR.

Canada Code Sample

package Canada;

import JavaAPI.*;

public class TestCanadaTrack2Purchase
{
	public static void main(String[] args)
	{
		String store_id = "store1";
		String api_token = "yesguy";
		java.util.Date createDate = new java.util.Date(); 
		String order_id = "Test"+createDate.getTime();
		String cust_id = "LBriggs";
		String amount = "1.00";
		String track2 = ";5258968987035454=06061015454001060101?";
		String pan = "";
		String exp = "";		//must send '0000' if swiped
		String pos_code = "00";
		String commcard_invoice = "INV98798";
		String commcard_tax_amount = "1.00";
		String processing_country_code = "CA";
		boolean status_check = false;

		Track2Purchase track2purchase = new Track2Purchase();
		track2purchase.setOrderId(order_id);
		track2purchase.setCustId(cust_id);
		track2purchase.setAmount(amount);
		track2purchase.setTrack2(track2);
		track2purchase.setPan(pan);
		track2purchase.setExpdate(exp);
		track2purchase.setPosCode(pos_code);
		track2purchase.setCommcardInvoice(commcard_invoice);
		track2purchase.setCommcardTaxAmount(commcard_tax_amount);

		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(track2purchase);
		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("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("StatusCode = " + receipt.getStatusCode());
			//System.out.println("StatusMessage = " + receipt.getStatusMessage());
		}
		catch (Exception e)
		{
			e.printStackTrace();
		}
	}
}

                
USA Code Sample

package USA;

import JavaAPI.*;

public class TestUSATrack2Purchase
{
	public static void main(String[] args)
	{
		String store_id = "monusqa002";
		String api_token = "qatoken";
		java.util.Date createDate = new java.util.Date();
		String order_id = "Test"+createDate.getTime();
		String cust_id = "LBriggs";
		String amount = "1.00";
		String track2 = ";5258968987035454=06061015454001060101?";
		String pan = "";
		String exp = "";		//must send '0000' if swiped
		String pos_code = "00";
		String commcard_invoice = "INV98798";
		String commcard_tax_amount = "1.00";
		String descriptor = "my descriptor";
		String processing_country_code = "US";
		boolean status_check = false;

		Track2Purchase track2purchase = new Track2Purchase();
		track2purchase.setOrderId(order_id);
		track2purchase.setCustId(cust_id);
		track2purchase.setAmount(amount);
		track2purchase.setTrack2(track2);
		track2purchase.setPan(pan);
		track2purchase.setExpdate(exp);
		track2purchase.setPosCode(pos_code);
		track2purchase.setDynamicDescriptor(descriptor);
		track2purchase.setCommcardInvoice(commcard_invoice);
		track2purchase.setCommcardTaxAmount(commcard_tax_amount);

		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(track2purchase);
		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("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("StatusCode = " + receipt.getStatusCode());
			//System.out.println("StatusMessage = " + receipt.getStatusMessage());
		}
		catch (Exception e)
		{
			e.printStackTrace();
		}
	}
}

                

Mag Swipe Purchase - Transaction Values

Track2Purchase track2purchase = new Track2Purchase();

HttpsPostRequest mpgReq = new HttpsPostRequest();

mpgReq.setTransaction(track2purchase);

Mag Swipe Purchase Mandatory values

Value Type Limits Set Method Description
Order ID String 50-character alphanumeric track2purchase.setOrderId(order_id); Merchant-defined transaction identifier that must be unique for every Purchase, Pre-Authorization and Independent Refund transaction. No two transactions of these types may have the same order ID.

For Refund, Completion and Purchase Correction transactions, the order ID must be the same as that of the original transaction.

Canada: The last 10 characters of the order ID are displayed in the “Invoice Number” field on the Merchant Direct Reports. However only letters, numbers and spaces are sent to Merchant Direct.

A minimum of 3 and a maximum of 10 valid characters are sent to Merchant Direct. Only the last characters beginning after any invalid characters are sent. For example, if the order ID is 1234-567890, only 567890 is sent to Merchant Direct.

US: The last 32 characters of the order ID are sent on to the Client Line settlement reports.

For either countries, If the order ID has fewer than 3 characters, it may display a blank or 0000000000 in the Invoice Number field.
Amount String 9-character decimal track2purchase.setAmount(amount); Transaction amount This must contain at least 3 digits, two of which are penny values.
The minimum allowable value is $0.01, and the maximum allowable value is $999999.99. Transaction amounts of $0.00 are not allowed.
Track 2 data String 40 – character alphanumeric track2purchase.setTrack2(track2); Retrieved from the mag stripe of a credit card by swiping it through a card reader.
Credit card number String 20-character numeric track2purchase.setPan(pan); Most credit card numbers today are 16 digits, but some 13-digit numbers are still accepted by some issuers. This field has been intentionally expanded to 20 digits in consideration for future expansion and potential support of private label card ranges.

This field is only applicable if processing a manually keyed card present transaction where the MSR was unable to read the card swipe Track 2 data. This requires the full card number to be passed.

If passing the credit card number, then the Track 2 data must be left blank.
Expiry date String 4-character numeric
YYMM format.
track2purchase.setExpdate(exp); Submit in YYMM format.
Note: This is the reverse of the date displayed on the physical card, which is MMYY.

If the card is swiped and a Track 2 value is passed, then this field must be omitted or set to ‘0000’.

If processing a manually keyed card present transaction and passing the credit card number (pan) field then this field must be properly populated with the expiry date.
POS Code String 2-character numeric track2purchase.setPosCode(pos_code); Supported values are:
  • 00 - normal presentment situations
  • 71 - If a Pre-Authorization transaction was card-present and keyed-in, then the POS code for the corresponding Completion transaction is 71.
  • 27 - In an unmanned kiosk environment where the card is present
  • If the solution is not “merchant and cardholder present”, contact Moneris for the proper POS code.

Mag Swipe Purchase optional values

Value Type Limits Set Method Description
Status Check Boolean true/false mpgReq.setStatusCheck(status_check); Status Check is a connection object value that allows merchants to verify whether a previously sent transaction was processed successfully. To submit a Status Check request, resend the original transaction with all the same parameter values, but set the status check value to either true or false. Once set to “true”, the gateway will check the status of a transaction that has an order_id that matches the one passed.
  • If the transaction is found, the gateway will respond with the specifics of that transaction.
  • If the transaction is not found, the gateway will respond with a not found message.
  • Once it is set to “false”, the transaction will process as a new transaction.
Things to consider:
  • The Status Check request should only be used once and immediately (within 2 minutes) after the last transaction that had failed.
  • Do not resend the Status Check request if it has timed out. Additional investigation is required.
Customer ID String 50-character alphanumeric track2purchase.setCustId(cust_id); This can be used for policy number, membership number, student ID, or invoice number. This field is searchable from the Moneris Merchant Resource Centre.
Dynamic descriptor String 20-character alphanumeric track2purchase.setDynamicDescriptor("2134565"); Merchant defined description sent on a per-transaction basis that will appear on the credit card statement appended to the merchant’s business name.
The combined length of the merchant’s business name and dynamic_descriptor may not exceed 25 characters.
Commercial card invoice String 17-character alphanumeric track2purchase.setCommcardInvoice(commcard_invoice); Available to US integrations only. Level 2 Invoice Number for the transaction used for Corporate Credit Card transactions (Commercial Purchasing Cards). Characters allowed for commcard_invoice: a-z A-Z 0-9 spaces
Commercial card tax amount String 9-character decimal track2purchase.setCommcardTaxAmount(commcard_tax_amount); Available to US integrations only. Level 2 Tax Amount of the transaction used for Corporate Credit Card transactions (Commercial Purchasing Cards). This must contain 3 digits with two penny values. The minimum value passed can be 0.00 and the maximum is 9999999.99
AVS Information Object AvsInfo avsCheck = new AvsInfo();
track2purchase.setAvsInfo(avsCheck);
Refer below for further breakdown and definition.
CVD Information Object CvdInfo cvdCheck = new CvdInfo();
track2purchase.setCvdInfo(cvdCheck);
Refer below for further breakdown and definition.

Predecessors
  • None
Successors
  • Mag Swipe Purchase Correction ( API )
  • Mag Swipe Refund ( API )
  • Vault Tokenize Credit Card ( API )

Mag Swipe Purchase with CVD and AVS

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:

  • CVD is only supported by Visa, MasterCard and American Express.
  • AVS is only supported by Visa, MasterCard, Discover and American Express.
  • When testing CVD or AVS, you must only use the Visa test card numbers 4242424242424242 or 4005554444444403, and the amounts described in the Simulator eFraud Response Codes Table
  • For a full list of possible AVS & CVD result codes refer to the CVD and AVS Result Code tables.
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.

Canada Code Sample

package Canada;

import JavaAPI.*;

public class TestCanadaTrack2PurchaseEfraud
{
	public static void main(String[] args)
	{
		String store_id = "store1";
		String api_token = "yesguy";
		java.util.Date createDate = new java.util.Date(); 
		String order_id = "Test"+createDate.getTime();
		String cust_id = "LBriggs";
		String amount = "1.00";
		String track2 = ";5258968987035454=06061015454001060101?";
		String pan = "";
		String exp = "";		//must send '0000' if swiped
		String pos_code = "00";
		String processing_country_code = "CA";
		boolean status_check = false;

		/*************** Address Verification Service **********************/
		AvsInfo avsCheck = new AvsInfo();
		avsCheck.setAvsStreetNumber("212");
		avsCheck.setAvsStreetName("Payton Street");
		avsCheck.setAvsZipCode("M1M1M1");

		/****************** Card Validation Digits *************************/
		CvdInfo cvdCheck = new CvdInfo();
		cvdCheck.setCvdIndicator("1");
		cvdCheck.setCvdValue("099");

		Track2Purchase track2purchase = new Track2Purchase();
		track2purchase.setOrderId(order_id);
		track2purchase.setCustId(cust_id);
		track2purchase.setAmount(amount);
		track2purchase.setTrack2(track2);
		track2purchase.setPan(pan);
		track2purchase.setExpdate(exp);
		track2purchase.setPosCode(pos_code);
		track2purchase.setAvsInfo(avsCheck);
		track2purchase.setCvdInfo(cvdCheck);

		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(track2purchase);
		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("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("Avs Response = " + receipt.getAvsResultCode());
			System.out.println("Cvd Response = " + receipt.getCvdResultCode());
		}
		catch (Exception e)
		{
			e.printStackTrace();
		}
	}
}

                
USA Code Sample

package USA;

import JavaAPI.*;

public class TestUSATrack2PurchaseEfraud
{
	public static void main(String[] args)
	{
		String store_id = "monusqa002";
		String api_token = "qatoken";
		java.util.Date createDate = new java.util.Date(); 
		String order_id = "Test"+createDate.getTime();
		String cust_id = "LBriggs";
		String amount = "1.00";
		String track2 = ";5258968987035454=06061015454001060101?";
		String pan = "";
		String exp = "";		//must send '0000' if swiped
		String pos_code = "00";
		String commcard_invoice = "INV98798";
		String commcard_tax_amount = "1.00";
		String processing_country_code = "US";
		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");

		Track2Purchase track2purchase = new Track2Purchase();
		track2purchase.setOrderId(order_id);
		track2purchase.setCustId(cust_id);
		track2purchase.setAmount(amount);
		track2purchase.setTrack2(track2);
		track2purchase.setPan(pan);
		track2purchase.setExpdate(exp);
		track2purchase.setPosCode(pos_code);
		track2purchase.setCommcardInvoice(commcard_invoice);
		track2purchase.setCommcardTaxAmount(commcard_tax_amount);
		track2purchase.setAvsInfo(avsCheck);
		track2purchase.setCvdInfo(cvdCheck);

		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(track2purchase);
		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("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("Avs Response = " + receipt.getAvsResultCode());
			System.out.println("Cvd Response = " + receipt.getCvdResultCode());
		}
		catch (Exception e)
		{
			e.printStackTrace();
		}
	}
}

                

Mag Swipe Purchase - Transaction Values

Track2Purchase track2purchase = new Track2Purchase();

HttpsPostRequest mpgReq = new HttpsPostRequest();

mpgReq.setTransaction(track2purchase);

Mag Swipe Purchase Mandatory values

Value Type Limits Set Method Description
Order ID String 50-character alphanumeric track2purchase.setOrderId(order_id); Merchant-defined transaction identifier that must be unique for every Purchase, Pre-Authorization and Independent Refund transaction. No two transactions of these types may have the same order ID.

For Refund, Completion and Purchase Correction transactions, the order ID must be the same as that of the original transaction.

Canada: The last 10 characters of the order ID are displayed in the “Invoice Number” field on the Merchant Direct Reports. However only letters, numbers and spaces are sent to Merchant Direct.

A minimum of 3 and a maximum of 10 valid characters are sent to Merchant Direct. Only the last characters beginning after any invalid characters are sent. For example, if the order ID is 1234-567890, only 567890 is sent to Merchant Direct.

US: The last 32 characters of the order ID are sent on to the Client Line settlement reports.

For either countries, If the order ID has fewer than 3 characters, it may display a blank or 0000000000 in the Invoice Number field.
Amount String 9-character decimal track2purchase.setAmount(amount); Transaction amount This must contain at least 3 digits, two of which are penny values.
The minimum allowable value is $0.01, and the maximum allowable value is $999999.99. Transaction amounts of $0.00 are not allowed.
Track 2 data String 40 – character alphanumeric track2purchase.setTrack2(track2); Retrieved from the mag stripe of a credit card by swiping it through a card reader.
Credit card number String 20-character numeric track2purchase.setPan(pan); Most credit card numbers today are 16 digits, but some 13-digit numbers are still accepted by some issuers. This field has been intentionally expanded to 20 digits in consideration for future expansion and potential support of private label card ranges.

This field is only applicable if processing a manually keyed card present transaction where the MSR was unable to read the card swipe Track 2 data. This requires the full card number to be passed.

If passing the credit card number, then the Track 2 data must be left blank.
Expiry date String 4-character numeric
YYMM format.
track2purchase.setExpdate(exp); Submit in YYMM format.
Note: This is the reverse of the date displayed on the physical card, which is MMYY.

If the card is swiped and a Track 2 value is passed, then this field must be omitted or set to ‘0000’.

If processing a manually keyed card present transaction and passing the credit card number (pan) field then this field must be properly populated with the expiry date.
POS Code String 2-character numeric track2purchase.setPosCode(pos_code); Supported values are:
  • 00 - normal presentment situations
  • 71 - If a Pre-Authorization transaction was card-present and keyed-in, then the POS code for the corresponding Completion transaction is 71.
  • 27 - In an unmanned kiosk environment where the card is present
  • If the solution is not “merchant and cardholder present”, contact Moneris for the proper POS code.

Mag Swipe Purchase optional values

Value Type Limits Set Method Description
Status Check Boolean true/false mpgReq.setStatusCheck(status_check); Status Check is a connection object value that allows merchants to verify whether a previously sent transaction was processed successfully. To submit a Status Check request, resend the original transaction with all the same parameter values, but set the status check value to either true or false. Once set to “true”, the gateway will check the status of a transaction that has an order_id that matches the one passed.
  • If the transaction is found, the gateway will respond with the specifics of that transaction.
  • If the transaction is not found, the gateway will respond with a not found message.
  • Once it is set to “false”, the transaction will process as a new transaction.
Things to consider:
  • The Status Check request should only be used once and immediately (within 2 minutes) after the last transaction that had failed.
  • Do not resend the Status Check request if it has timed out. Additional investigation is required.
Customer ID String 50-character alphanumeric track2purchase.setCustId(cust_id); This can be used for policy number, membership number, student ID, or invoice number. This field is searchable from the Moneris Merchant Resource Centre.
Dynamic descriptor String 20-character alphanumeric track2purchase.setDynamicDescriptor("2134565"); Merchant defined description sent on a per-transaction basis that will appear on the credit card statement appended to the merchant’s business name.
The combined length of the merchant’s business name and dynamic_descriptor may not exceed 25 characters.
Commercial card invoice String 17-character alphanumeric track2purchase.setCommcardInvoice(commcard_invoice); Available to US integrations only. Level 2 Invoice Number for the transaction used for Corporate Credit Card transactions (Commercial Purchasing Cards). Characters allowed for commcard_invoice: a-z A-Z 0-9 spaces
Commercial card tax amount String 9-character decimal track2purchase.setCommcardTaxAmount(commcard_tax_amount); Available to US integrations only. Level 2 Tax Amount of the transaction used for Corporate Credit Card transactions (Commercial Purchasing Cards). This must contain 3 digits with two penny values. The minimum value passed can be 0.00 and the maximum is 9999999.99
AVS Information Object AvsInfo avsCheck = new AvsInfo();
track2purchase.setAvsInfo(avsCheck);
Refer below for further breakdown and definition.
CVD Information Object CvdInfo cvdCheck = new CvdInfo();
track2purchase.setCvdInfo(cvdCheck);
Refer below for further breakdown and definition.

CvdInfo object mandatory values

Value Type Limits Set Method Description
CVD indicator String 1-character numeric cvdCheck.setCvdIndicator("1"); CVD presence indicator:
  • 0: CVD value is deliberately bypassed or is not provided by the merchant.
  • 1: CVD value is present.
  • 2: CVD value is on the card, but is illegible.
  • 9: Cardholder states that the card has no CVD imprint.
CVD Value String 4-character numeric cvdCheck.setCvdValue("099"); CVD value located on credit card. The CVD value (supplied by the cardholder) must only be passed to the payment gateway. Under no circumstances may it be stored for subsequent use or displayed as part of the receipt information.

AvsInfo object mandatory values

Value Type Limits Set Method Description
AVS street number String 19-character alphanumeric1 avsCheck.setAvsStreetNumber("212"); Cardholder street number.
AVS street name String See AVS street number avsCheck.setAvsStreetName("Payton Street"); Cardholder street name.
AVS zip/postal code String 9-character alphanumeric avsCheck.setAvsZipCode("M1M1M1"); . Cardholder zip/postal code.

CVD and AVS Response Fields

Value Limits Get Method Description
CVD result code 2-character alphanumeric receipt.getCvdResultCode(); Indicates the CVD validation result. The first byte is the numeric CVD indicator sent in the request; the second byte is the response code. Possible response codes are shown in the CVD Result Code table.
AVS result code 1-character alphanumeric receipt.getAvsResultCode(); Indicates the address verification result. For a full list of possible response codes refer to the AVS Result Code table.

Predecessors
  • None
Successors
  • Mag Swipe Purchase Correction ( API )
  • Mag Swipe Refund ( API )
  • Vault Tokenize Credit Card ( API )