My Profile_


Pre-Authorization

Verifies and locks funds on the customer’s credit card. The funds are locked for a specified amount of time based on the card issuer.

To retrieve the funds that have been locked by a Pre-Authorization transaction so that they may be settled in the merchant’s account, a Completion transaction must be performed.

Things to consider:

  • If a Pre-Authorization transaction is not followed by a Completion transaction, it must be reversed via a Completion transaction for 0.00.
  • A Pre-Authorization transaction may only be "completed" once . If the Completion transaction is for less than the original amount, a Re-Authorization transaction is required to collect the remaining funds by another Completion transaction.

Canada Code Sample

package Canada;

import JavaAPI.*;

public class TestCanadaPreauth
{
	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 amount = "5.00";
		String pan = "4242424242424242";
		String expdate = "1902";
		String crypt = "7";
		String processing_country_code = "CA";
		boolean status_check = false;

		PreAuth preauth = new PreAuth();
		preauth.setOrderId(order_id);
		preauth.setAmount(amount);
		preauth.setPan(pan);
		preauth.setExpdate(expdate);
		preauth.setCryptType(crypt);

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

                
USA Code Sample

package USA;

import JavaAPI.*;

public class TestUSAPreAuth
{
	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 amount = "1.00";
		String pan = "4242424242424242";
		String expdate = "1902";        //YYMM format
		String crypt = "7";
		String processing_country_code = "US";
		boolean status_check = false;

		PreAuth preauth = new PreAuth();
		preauth.setOrderId(order_id);
		preauth.setAmount(amount);
		preauth.setPan(pan);
		preauth.setExpdate(expdate);
		preauth.setCryptType(crypt);
		preauth.setDynamicDescriptor("2134565");

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

                

Pre-Authorization - Transaction Values

Pre-Authorization transaction object definition

PreAuth preauth = new PreAuth();

HttpsPostRequest object for Pre-Authorization transaction

HttpsPostRequest mpgReq = new HttpsPostRequest();

mpgReq.setTransaction(preauth);

Pre-Authorization object mandatory values

Value Type Limits Set method Description
Order ID String 50-character alphanumeric preauth.setOrderId(order_id); Merchant-defined transaction identifier that must be unique for every Purchase, PreAuth and Independent Refund transaction. No two transactions of these may have the same order ID. 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. 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 preauth.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.
Credit card number String 20-character numeric preauth.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.
Expiry date String 4-character alphanumeric
YYMM format.
preauth.setExpdate(expdate); Submit in YYMM format. Note: This is the reverse of the date displayed on the physical card, which is MMYY.
E-Commerce indicator String 1-character alphanumeric preauth.setCryptType(crypt); Supported values are:
1 - Mail Order / Telephone Order—Single
2 - Mail Order / Telephone Order—Recurring
3 - Mail Order / Telephone Order—Instalment
4 - Mail Order / Telephone Order—Unknown classification
5 -Authenticated e-commerce transaction (VBV)
6 - Non-authenticated e-commerce transaction (VBV)
7 - SSL-enabled merchant
8 - Non-secure transaction (web- or email-based)
9 - SET non-authenticated transaction

Pre-Authorization object 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.
Dynamic Descriptor String 20-character alphanumeric preauth.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.
Customer Information Object N/A preauth.setCustInfo(customer);  Refer below for further breakdown and definition.
AVS Object  N/A preauth.setAvsInfo(avsCheck); Refer below for further breakdown and definition.
CVD Object N/A preauth.setCvdInfo(cvdCheck); Refer below for further breakdown and definition.
Customer ID String 50-character alphanumeric
preauth.setCustId(cust_id);
??.
String
String
purchase.setOrderId(order_id);

Predecessors
  • NA
Successors

Pre-Authorization with Customer Information

The Customer Information object is an optional add-on to a number of transactions. The Customer Information object offers a number of fields to be submitted as part of the financial transaction, and stored by Moneris. These details may be viewed in the future in the Merchant Resource Center.

In addition to instantiating a transaction object and a connection object (as you would for a normal transaction), you must instantiate a CustInfo object. Any transaction that supports CustInfo has a setCustInfo method. This is used to write the customer information to the transaction object.

The Customer Information object holds three types of information:

  • Miscellaneous customer information properties
  • Billing/Shipping information
  • Item information

Things to consider:

  • If you send characters that are not included in the allowed list, these extra transaction details may not be stored.
  • All fields are alphanumeric and allow the following characters: a-z A-Z 0-9 _ - : . @ $ = /
  • All French accents should be encoded as HTML entities, such as é
  • The data sent in Billing and Shipping Address fields will not be used for any address verification.

Canada Code Sample

package Canada;
                                                                           
import java.util.*;
import JavaAPI.*;

public class TestCanadaPreauthCustInfo
{
	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 amount = "1.00";
		String pan = "4242424242424242";
		String expdate = "1901"; //YYMM format
		String crypt = "7";
		String processing_country_code = "CA";
		boolean status_check = false;


		/********************* Billing/Shipping Variables ****************************/

		String first_name = "Bob";
		String last_name = "Smith";
		String company_name = "ProLine Inc.";
		String address = "623 Bears Ave";
		String city = "Chicago";
		String province = "Illinois";
		String postal_code = "M1M2M1";
		String country = "Canada";
		String phone = "777-999-7777";
		String fax = "777-999-7778";
		String tax1 = "10.00";
		String tax2 = "5.78";
		String tax3 = "4.56";
		String shipping_cost = "10.00";

		/********************* Order Line Item Variables *****************************/

		String[] item_description = new String[] { "Chicago Bears Helmet", "Soldier Field Poster" };
		String[] item_quantity = new String[] { "1", "1" };
		String[] item_product_code = new String[] { "CB3450", "SF998S" };
		String[] item_extended_amount = new String[] { "150.00", "19.79" };

		/*****************************************************************************/
		/*								             */
		/*			Customer Information Option 1			     */
		/*									     */
		/*****************************************************************************/

		/********************** Customer Information Object **************************/

		CustInfo customer = new CustInfo();

		/********************** Set Customer Billing Information **********************/

		customer.setBilling(first_name, last_name, company_name, address, city,
				province, postal_code, country, phone, fax, tax1, tax2,
				tax3, shipping_cost);

		/******************** Set Customer Shipping Information ***********************/

		customer.setShipping(first_name, last_name, company_name, address, city,
				province, postal_code, country, phone, fax, tax1, tax2,
				tax3, shipping_cost);

		/***************************** Order Line Items  ******************************/

		customer.setItem(item_description[0], item_quantity[0],
				item_product_code[0], item_extended_amount[0]);

		customer.setItem(item_description[1], item_quantity[1],
				item_product_code[1], item_extended_amount[1]);


		/*****************************************************************************/
		/*								             */
		/*			Customer Information Option 2			     */
		/*									     */
		/*****************************************************************************/



		/********************** Customer Information Object **************************/

		CustInfo customer2 = new CustInfo();

		/******************************* Billing Hashtable ***************************/


		Hashtable<String, String> b = new Hashtable<String, String>();	//billing hashtable

		b.put("first_name", first_name);
		b.put("last_name", last_name);
		b.put("company_name", company_name);
		b.put("address", address);
		b.put("city", city);
		b.put("province", province);
		b.put("postal_code", postal_code);
		b.put("country", country);
		b.put("phone", phone);
		b.put("fax", fax);
		b.put("tax1", tax1);       //federal tax
		b.put("tax2", tax2);        //prov tax
		b.put("tax3", tax3);        //luxury tax
		b.put("shipping_cost", shipping_cost);   //shipping cost  

		customer2.setBilling(b);

		/****************************** Shipping Hashtable ***************************/

		Hashtable<String, String> s = new Hashtable<String, String>();	//shipping hashtable

		s.put("first_name", first_name);
		s.put("last_name", last_name);
		s.put("company_name", company_name);
		s.put("address", address);
		s.put("city", city);
		s.put("province", province);
		s.put("postal_code", postal_code);
		s.put("country", country);
		s.put("phone", phone);
		s.put("fax", fax);
		s.put("tax1", tax1);       //federal tax
		s.put("tax2", tax2);        //prov tax
		s.put("tax3", tax3);        //luxury tax
		s.put("shipping_cost", shipping_cost);   //shipping cost

		customer2.setShipping(s);

		/************************* Order Line Item1 Hashtable ************************/

		Hashtable<String, String> i1 = new Hashtable<String, String>();		//item hashtable #1

		i1.put("name", item_description[0]);
		i1.put("quantity", item_quantity[0]);
		i1.put("product_code", item_product_code[0]);
		i1.put("extended_amount", item_extended_amount[0]);

		customer2.setItem(i1);

		/************************* Order Line Item2 Hashtable **************************/

		Hashtable<String, String> i2 = new Hashtable<String, String>();		//item hashtable #2

		i2.put("name", "item2's name");
		i2.put("quantity", "7");
		i2.put("product_code", "item2's product code");
		i2.put("extended_amount", "5.01");

		customer2.setItem(i2);

		/*************** Miscellaneous Customer Information Methods *******************/

		customer.setEmail("nick@widget.com");
		customer.setInstructions("Make it fast!");

		/********************** Transactional Request Object **************************/

		PreAuth preauth = new PreAuth();
		preauth.setOrderId(order_id);
		preauth.setAmount(amount);
		preauth.setPan(pan);
		preauth.setExpdate(expdate);
		preauth.setCryptType(crypt);
		preauth.setCustInfo(customer);

		/**************************** Https Post Request ***************************/

		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(preauth);
		mpgReq.setStatusCheck(status_check);
		mpgReq.send();

		/******************************* Receipt ***********************************/

		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());
		}
		catch (Exception e)
		{
			e.printStackTrace();
		}
	}
}

                
USA Code Sample

package USA;
                                                                            
import java.util.*;

import JavaAPI.*;

public class TestUSAPreauthCustInfo
{
	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 amount = "1.00";
		String pan = "4242424242424242";
		String expdate = "1602";        //YYMM format
		String crypt = "7";
		String processing_country_code = "US";
		boolean status_check = false;

		/********************* Billing/Shipping Variables ****************************/

		String first_name = "Bob";
		String last_name = "Smith";
		String company_name = "ProLine Inc.";
		String address = "623 Bears Ave";
		String city = "Chicago";
		String province = "Illinois";
		String postal_code = "M1M2M1";
		String country = "Canada";
		String phone = "777-999-7777";
		String fax = "777-999-7778";
		String tax1 = "10.00";
		String tax2 = "5.78";
		String tax3 = "4.56";
		String shipping_cost = "10.00";

		/********************* Order Line Item Variables *****************************/

		String[] item_description = new String[] { "Chicago Bears Helmet", "Soldier Field Poster" };
		String[] item_quantity = new String[] { "1", "1" };
		String[] item_product_code = new String[] { "CB3450", "SF998S" };
		String[] item_extended_amount = new String[] { "150.00", "19.79" };

		/*****************************************************************************/
		/*								             */
		/*			Customer Information Option 1			     */
		/*									     */
		/*****************************************************************************/

		/********************** Customer Information Object **************************/

		CustInfo customer = new CustInfo();

		/********************** Set Customer Billing Information **********************/

		customer.setBilling(first_name, last_name, company_name, address, city,
				province, postal_code, country, phone, fax, tax1, tax2,
				tax3, shipping_cost);

		/******************** Set Customer Shipping Information ***********************/

		customer.setShipping(first_name, last_name, company_name, address, city,
				province, postal_code, country, phone, fax, tax1, tax2,
				tax3, shipping_cost);

		/***************************** Order Line Items  ******************************/

		customer.setItem(item_description[0], item_quantity[0],
				item_product_code[0], item_extended_amount[0]);

		customer.setItem(item_description[1], item_quantity[1],
				item_product_code[1], item_extended_amount[1]);

		/*****************************************************************************/
		/*								             */
		/*			Customer Information Option 2			     */
		/*									     */
		/*****************************************************************************/

		/********************** Customer Information Object **************************/

		CustInfo customer2 = new CustInfo();

		/******************************* Billing Hashtable ***************************/


		Hashtable<String, String> b = new Hashtable<String, String>();	//billing hashtable

		b.put("first_name", first_name);
		b.put("last_name", last_name);
		b.put("company_name", company_name);
		b.put("address", address);
		b.put("city", city);
		b.put("province", province);
		b.put("postal_code", postal_code);
		b.put("country", country);
		b.put("phone", phone);
		b.put("fax", fax);
		b.put("tax1", tax1);       //federal tax
		b.put("tax2", tax2);        //prov tax
		b.put("tax3", tax3);        //luxury tax
		b.put("shipping_cost", shipping_cost);   //shipping cost  

		customer2.setBilling(b);

		/****************************** Shipping Hashtable ***************************/

		Hashtable<String, String> s = new Hashtable<String, String>();	//shipping hashtable

		s.put("first_name", first_name);
		s.put("last_name", last_name);
		s.put("company_name", company_name);
		s.put("address", address);
		s.put("city", city);
		s.put("province", province);
		s.put("postal_code", postal_code);
		s.put("country", country);
		s.put("phone", phone);
		s.put("fax", fax);
		s.put("tax1", tax1);       //federal tax
		s.put("tax2", tax2);        //prov tax
		s.put("tax3", tax3);        //luxury tax
		s.put("shipping_cost", shipping_cost);   //shipping cost

		customer2.setShipping(s);

		/************************* Order Line Item1 Hashtable ************************/

		Hashtable<String, String> i1 = new Hashtable<String, String>();		//item hashtable #1

		i1.put("name", item_description[0]);
		i1.put("quantity", item_quantity[0]);
		i1.put("product_code", item_product_code[0]);
		i1.put("extended_amount", item_extended_amount[0]);

		customer2.setItem(i1);

		/************************* Order Line Item2 Hashtable **************************/

		Hashtable<String, String> i2 = new Hashtable<String, String>();		//item hashtable #2

		i2.put("name", "item2's name");
		i2.put("quantity", "7");
		i2.put("product_code", "item2's product code");
		i2.put("extended_amount", "5.01");

		customer2.setItem(i2);

		/*************** Miscellaneous Customer Information Methods *******************/

		customer.setEmail("nick@widget.com");
		customer.setInstructions("Make it fast!");

		/********************** Transactional Request Object **************************/

		PreAuth preauth = new PreAuth();
		preauth.setOrderId(order_id);
		preauth.setAmount(amount);
		preauth.setPan(pan);
		preauth.setExpdate(expdate);
		preauth.setCryptType(crypt);

		/************************ Set Customer Information ***************************/

		preauth.setCustInfo(customer);

		/**************************** Https Post Request ***************************/

		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(preauth);
		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("CardLevelResult = " + receipt.getCardLevelResult());
		}
		catch (Exception e)
		{
			e.printStackTrace();
		}
	}
}

                

Pre-Authorization - Transaction Values

Pre-Authorization transaction object definition

PreAuth preauth = new PreAuth();

HttpsPostRequest object for Pre-Authorization transaction

HttpsPostRequest mpgReq = new HttpsPostRequest();

mpgReq.setTransaction(preauth);

Pre-Authorization object mandatory values

Value Type Limits Set method Description
Order ID String 50-character alphanumeric preauth.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.

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.

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 preauth.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.
Credit card number String 20-character numeric preauth.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.
Expiry date String 4-character alphanumeric
YYMM format.
preauth.setExpdate(expdate); Submit in YYMM format. Note: This is the reverse of the date displayed on the physical card, which is MMYY.
E-Commerce indicator String 1-character alphanumeric preauth.setCryptType(crypt); Supported values are:
1 - Mail Order / Telephone Order—Single
2 - Mail Order / Telephone Order—Recurring
3 - Mail Order / Telephone Order—Instalment
4 - Mail Order / Telephone Order—Unknown classification
5 -Authenticated e-commerce transaction (VBV)
6 - Non-authenticated e-commerce transaction (VBV)
7 - SSL-enabled merchant
8 - Non-secure transaction (web- or email-based)
9 - SET non-authenticated transaction

Pre-Authorization object 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.
Dynamic Descriptor String 20-character alphanumeric preauth.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.
Customer Information Object NA preauth.setCustInfo(customer);  Refer below for further breakdown and definition.
AVS   N/A preauth.setAvsInfo(avsCheck); Refer below for further breakdown and definition.
CVD Object NA preauth.setCvdInfo(cvdCheck); Refer below for further breakdown and definition.
Customer ID String 50-character alphanumeric preauth.setCustId(cust_id); This can be used for policy number, membership number, student ID, invoice number.
This field is searchable from the Moneris Merchant Resource Centre.

CustInfo object mandatory properties

Value Type Limits Set method Decription
Email Address String 60-character alphanumeric customer.setEmail("nick@widget.com"); Customer email address.
Instructions String 100-character alphanumeric customer.setInstructions("Rush!"); Instructions or notes.
Billing Information Object Option 1:
customer.setBilling(first_name, last_name, company_name, address, city, province, postal_code, country, phone, fax, tax1, tax2, tax3, shipping_cost);

Option 2:
customer.setBilling(billing_hash);
Billing information is stored as part of the CustInfo object. A maximum of 1 billing object may be set. They can be written to the object in one of two ways:
  • Using set methods
  • Using hash tables.
Refer below for further breakdown and definition.
Shipping Information Object Option 1:
customer.setShipping(first_name, last_name, company_name, address, city, province, postal_code, country, phone, fax, tax1, tax2, tax3, shipping_cost);

Option 2:
customer.setShipping(shipping_hash);
Shipping information is stored as part of the CustInfo object. A maximum of 1 shipping object may be set. They can be written to the object in one of two ways:
  • Using set methods
  • Using hash tables.
Refer below for further breakdown and definition.
Items Array Object Option 1:
customer.setItem(item_description[0], item_quantity[0], item_product_code[0], item_extended_amount[0]);

Option 2:
Customer.setItem(item_hash);
Item information is stored as part of the CustInfo object. Multiple items may be set. They can be written to the object in one of two ways:
  • Using set methods
  • Using hash tables.
Refer below for further breakdown and definition.

Setting Billing & Shipping using Set Methods

The billing information and the shipping information for a given CustInfo object are written by using the customer.setBilling() and customer.setShipping() methods respectively:

customer.setBilling(first_name, last_name, company_name, address, city, province, postal_code, country, phone, fax, tax1, tax2, tax3, shipping_cost);

customer.setShipping(first_name, last_name, company_name, address, city, province, postal_code, country, phone, fax, tax1, tax2, tax3, shipping_cost);

Both of these methods have the same set of mandatory arguments.

Setting Billing & Shipping using Hash Tables

Writing billing or shipping information using hash tables is done as follows:

  1. Instantiate a CustInfo object.
  2. Instantiate a Hashtable object. (The sample code uses a different hash table for billing and shipping for clarity purposes. However, the skillful developer can re-use the same one.)
  3. Build the hashtable using put methods with the hash table keys in the table below.
  4. Call the CustInfo object's setBilling()/setShipping() method to pass the hashtable information to the CustInfo object
  5. Call the transaction object's setCustInfo() method to write the CustInfo object (with the billing/shipping information to the transaction object.

Billing & Shipping mandatory values

Value Type Limits Variable/Hash Table Key Description
First Name String 30-character alphanumeric "first_name" Customer first name
Last Name String 30-character alphanumeric "last_name" Customer last name
Company Name String 50-character alphanumeric "company_name" Customer 's company name
Address String 70-character alphanumeric "address" Customer's address
City String 30-character alphanumeric "city" Customer's city
Province / State String 30-character alphanumeric "province" Customer's province or state
Postal / Zip Code String 30-character alphanumeric "postal_code" Customer's postal or zip code
Country String 30-character alphanumeric "country" Customer's country
Phone Number String 30-character alphanumeric "phone" Customer's phone number
Fax Number String 30-character alphanumeric fax" Customer's fax number
Federal Tax String 10-character alphanumeric "tax1" Federal tax amount. Amount is not used for calculating total amount.
Provincial / State Tax String 10-character alphanumeric "tax2" Provincial or state tax amount. Amount is not used for calculating total amount.
Country / Local / Specialty Tax String 10-character alphanumeric "tax3" County, local or specialty tax amount. Amount is not used for calculating total amount.
Shipping Cost String 10-character alphanumeric "shipping_cost" Shipping cost. Amount is not used for calculating total amount.

Setting Items using Set Methods

All the item information in the table below is written to the CustInfo object in one instruction for a given item. Multiples items may be set. Such as:

customer.setItem(item_description, item_quantity, item_product_code, item_extended_amount);

Setting Items using Hash Tables

Writing item information using hash tables is done as follows:

  1. Instantiate a CustInfo object.
  2. Instantiate a Hashtable object. (The sample code uses a different hash table for each item for clarity purposes. However, the skillful developer can re-use the same one.)
  3. Build the hashtable using put methods with the hash table keys in the table below.
  4. Call the CustInfo object's setItem() method to pass the hashtable information to the CustInfo object
  5. Call the transaction object's setCustInfo() method to write the CustInfo object (with the item information to the transaction object.

Item mandatory values

Value Type Limits Variable/Hash Table Key Description
Item Name String 45-character alphanumeric "name" Item name or description.
Item Quantity String 5-character numeric "quantity" You must send a quantity > 0 or the item will not be added to the item list (i.e. minimum 1, maximum 99999)
Item Product Code String 20-character alphanumeric "product_code" Item product code or SKU.
Item Extended Amount String 9-character decimal "extended_amount" Must contain at least 3 digits and 2 penny values.
0.01-999999.99

Predecessors
  • NA
Successors
  • Pre-Authorization Completion ( API | Batch File)
  • Vault Tokenize Credit Card ( API )

Pre-Authorization with CVD & 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 TestCanadaPreauthEfraud
{
	public static void main(String[] args)
	{
		java.util.Date createDate = new java.util.Date(); 
		String order_id = "Test"+createDate.getTime();
		String store_id = "store5";
		String api_token = "yesguy";
		String amount = "10.01";
		String pan = "4242424242424242";
		String expdate = "1902"; //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");
		avsCheck.setAvsEmail("test@host.com");
		avsCheck.setAvsHostname("hostname");
		avsCheck.setAvsBrowser("Mozilla");
		avsCheck.setAvsShiptoCountry("CAN");
		avsCheck.setAvsShipMethod("G");
		avsCheck.setAvsMerchProdSku("123456");
		avsCheck.setAvsCustIp("192.168.0.1");
		avsCheck.setAvsCustPhone("5556667777");

		CvdInfo cvdCheck = new CvdInfo();
		cvdCheck.setCvdIndicator("1");
		cvdCheck.setCvdValue("099");

		PreAuth preauth = new PreAuth();
		preauth.setOrderId(order_id);
		preauth.setAmount(amount);
		preauth.setPan(pan);
		preauth.setExpdate(expdate);
		preauth.setCryptType(crypt);
		preauth.setAvsInfo(avsCheck);
		preauth.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(preauth);
		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("Avs Response = " + receipt.getAvsResultCode());
			System.out.println("Cvd Response = " + receipt.getCvdResultCode());
			System.out.println("ITD Response = " + receipt.getITDResponse());
			System.out.println("IsVisaDebit = " + receipt.getIsVisaDebit());
		}
		catch (Exception e)
		{
			e.printStackTrace();
		}
	}
}
                
USA Code Sample

package USA;

import JavaAPI.*;

public class TestUSAPreauthEfraud
{
	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 amount = "5.00";
		String pan = "4242424242424242";
		String expdate = "1902";        //YYMM format
		String crypt = "7";
		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");

		PreAuth preauth = new PreAuth();
		preauth.setOrderId(order_id);
		preauth.setAmount(amount);
		preauth.setPan(pan);
		preauth.setExpdate(expdate);
		preauth.setCryptType(crypt);
		preauth.setAvsInfo(avsCheck);
		preauth.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(preauth);
		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("Avs Response = " + receipt.getAvsResultCode());
			System.out.println("Cvd Response = " + receipt.getCvdResultCode());
			System.out.println("CardLevelResult = " + receipt.getCardLevelResult());
			System.out.println("MaskedPan = " + receipt.getMaskedPan());
			//System.out.println("StatusCode = " + receipt.getStatusCode());
			//System.out.println("StatusMessage = " + receipt.getStatusMessage());
		}
		catch (Exception e)
		{
			e.printStackTrace();
		}
	}
}

                

Pre-Authorization - Transaction Values

Pre-Authorization transaction object definition

PreAuth preauth = new PreAuth();

HttpsPostRequest object for Pre-Authorization transaction

HttpsPostRequest mpgReq = new HttpsPostRequest();

mpgReq.setTransaction(preauth);

Pre-Authorization object mandatory values

Value Type Limits Set method Description
Order ID String 50-character alphanumeric preauth.setOrderId(order_id); Merchant-defined transaction identifier that must be unique for every Purchase, PreAuth and Independent Refund transaction. No two transactions of these may have the same order ID. 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. 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 preauth.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.
Credit card number String 20-character numeric preauth.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.
Expiry date String 4-character alphanumeric
YYMM format.
preauth.setExpdate(expdate); Submit in YYMM format. Note: This is the reverse of the date displayed on the physical card, which is MMYY.
E-Commerce indicator String 1-character alphanumeric preauth.setCryptType(crypt); Supported values are:
1 - Mail Order / Telephone Order—Single
2 - Mail Order / Telephone Order—Recurring
3 - Mail Order / Telephone Order—Instalment
4 - Mail Order / Telephone Order—Unknown classification
5 -Authenticated e-commerce transaction (VBV)
6 - Non-authenticated e-commerce transaction (VBV)
7 - SSL-enabled merchant
8 - Non-secure transaction (web- or email-based)
9 - SET non-authenticated transaction

Pre-Authorization object 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.
Dynamic Descriptor String 20-character alphanumeric preauth.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.
Customer Information Object N/A preauth.setCustInfo(customer);  Refer below for further breakdown and definition.
AVS Object  N/A preauth.setAvsInfo(avsCheck); Refer below for further breakdown and definition.
CVD Object N/A preauth.setCvdInfo(cvdCheck); Refer below for further breakdown and definition.
Customer ID String 50-character alphanumeric
preauth.setCustId(cust_id);
??.

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 & 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

Pre-Authorization with 3-D Secure

The Pre-Authorization with 3-D Secure transaction follows a 3-D Secure MPI authentication. After receiving confirmation from the MPI ACS transaction, this Pre-Authorization verifies funds on the customer’s card, removes the funds and prepares them for deposit into the merchant’s account.

To perform the 3-D Secure authentication, the Moneris MPI or any 3rd party MPI may be used.

The Moneris MPI accepts requests for Verified by Visa (VbV), MasterCard Secure Code (MCSC) and American Express SafeKey. VBV, MCSC and SafeKey are programs based on the 3-D Secure Protocol to improve the security of online transactions. These programs involve authentication of the cardholder during an online e-commerce transaction. Authentication is based on the issuer’s selected method of authentication.

The following are examples of authentication methods:

  • Risk-based authentication
  • Dynamic passwords
  • Static passwords.

Some of the benefits of these programs are reduced risk of fraudulent transactions and protection against chargebacks for certain fraudulent transactions. Enrollment is required to participate in the VbV, Secure Code and SafeKey programs. Merchants must contact the Moneris Sales/Support Helpdesk to enroll into these programs.

This transaction can also be used to process an Apple Pay or Android Pay transaction. This transaction is applicable only if choosing to integrate directly to the Apple and Google wallets (if not using the Moneris Apple Pay or Android Pay SDK). Please refer to the Apple Pay and Android Pay sections for more details on your integration options. Please refer to Apple’s and Google’s developer portal respectively for details on integrating directly to their wallets to retrieve the payload data.


NOTE:Apple Pay and Android Pay is available to Canadian integrations only.

Canada Code Sample

package Canada;

import JavaAPI.*;

public class TestCanadaCavvPreauth
{
	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 cust_id = "CUS887H67";
		String amount = "10.42";
		String pan = "4242424242424242";
		String expdate = "1911"; //YYMM format
		String cavv = "AAABBJg0VhI0VniQEjRWAAAAAAA=";
		String dynamic_descriptor = "123456";
		String processing_country_code = "CA";
		boolean status_check = false;

		CavvPreAuth cavvPreauth = new CavvPreAuth();
		cavvPreauth.setOrderId(order_id);
		cavvPreauth.setCustId(cust_id);
		cavvPreauth.setAmount(amount);
		cavvPreauth.setPan(pan);
		cavvPreauth.setExpdate(expdate);
		cavvPreauth.setCavv(cavv);
		cavvPreauth.setDynamicDescriptor(dynamic_descriptor);

		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(cavvPreauth);
		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("CavvResultCode = " + receipt.getCavvResultCode());
		}
		catch (Exception e)
		{
			e.printStackTrace();
		}
	}
}

                
USA Code Sample

package USA;

import JavaAPI.*;

public class TestUSACavvPreAuth
{
	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 = "B_Urlac_54";
		String amount = "1.00";
		String pan = "4242424242424242";
		String expdate = "1902";        //YYMM format
		String cavv = "AAABBJg0VhI0VniQEjRWAAAAAAA";
		String dynamic_descriptor = "123456";
		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");

		CavvPreAuth cavvPreauth = new CavvPreAuth();
		cavvPreauth.setOrderId(order_id);
		cavvPreauth.setCustId(cust_id);
		cavvPreauth.setAmount(amount);
		cavvPreauth.setPan(pan);
		cavvPreauth.setExpdate(expdate);
		cavvPreauth.setCavv(cavv);
		cavvPreauth.setDynamicDescriptor(dynamic_descriptor);
		cavvPreauth.setAvsInfo(avsCheck);
		cavvPreauth.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(cavvPreauth);
		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("Avs Response = " + receipt.getAvsResultCode());
			System.out.println("Cvd Response = " + receipt.getCvdResultCode());
			//System.out.println("CardLevelResult = " + receipt.getCardLevelResult());
			System.out.println("CavvResultCode = " + receipt.getCavvResultCode());
		}
		catch (Exception e)
		{
			e.printStackTrace();
		}
	}
}

                

Pre-Authorization with 3-D Secure - Transaction

CavvPreAuth cavvPreauth = new CavvPreAuth();

HttpsPostRequest mpgReq = new HttpsPostRequest();

mpgReq.setTransaction(cavvPreauth);

Pre-Authorization with 3-D Secure object mandatory values

Value Type Limits Set method Description
Order ID String 50-character alphanumeric cavvPreauth.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.

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.

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 cavvPreauth.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.
Credit card number String 20-character numeric cavvPreauth.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.
Expiry date String 4-character numeric
YYMM format.
cavvPreauth.setExpdate(expdate); Submit in YYMM format.
Note: This is the reverse of the date displayed on the physical card, which is MMYY.
Cardholder Authentication Verification Value(CAVV) String 50-character alphanumeric cavvPreauth.setCavv(cavv); Value provided by the Moneris MPI or by a third-party MPI. It is part of a Verified by Visa (VbV), MasterCard SecureCode (MCSC) or American Express SafeKey transaction.

For Apple Pay and Android Pay processing please submit the decrypted cryptogram in this field.

Pre-Authorization with 3-D Secure optional values

Value Type Limits Set method Decription
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 cavvPreauth.setCustId(cust_id); This can be used for policy number, membership number, student ID, invoice number.
This field is searchable from the Moneris Merchant Resource Centre.
Dynamic descriptor String 20-character alphanumeric cavvPreauth.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.

E-Commerce Indicator

String

1-character numeric

cavvPreauth.setCryptType(crypt_type);

Available to Canada integrations only. This field is applicable to Apple Pay and Android Pay transactions whereby the merchant is using their own API to decrypt the payload. This is a conditional field.

If the transaction is an Apple Pay or Android Pay transaction then this field is mandatory.

For Apple Pay or Android Pay, send the value returned in the eciIndicator or 3dsEciIndicator respectively. If the value is not present, please send the value as 5. If you get a 2 character value (ex. 05 or 07) from the payload, remove the initial 0 and just send us the 2nd character.

Supported values are:
    • 5 - Authenticated e-commerce transaction (3-D secure)
    • 7 - SSL-enabled merchant

Wallet Indicator

String

3-character alphanumeric

cavvPreauth.setWalletIndicator(wallet_indicator);

Available to Canada integrations only. This field is applicable to Apple Pay and Android Pay transactions whereby the merchant is using their own API to decrypt the payload.  This is a mandatory field for these Apple Pay and Android Pay transactions.

Field is case sensitive. Possible values:
    • APP = Apple Pay Wallet
    • ANP = Android Pay Wallet

Please note that if this field is included to indicate Apple Pay or Android Pay, then Convenience Fee is not supported.

AVS Information Object AvsInfo avsCheck = new AvsInfo();
cavvPreauth.setAvsInfo(avsCheck);
Refer below for further breakdown and definition.
CVD Information Object CvdInfo cvdCheck = new CvdInfo();
cavvPreauth.setCvdInfo(cvdCheck);
Refer below for further breakdown and definition.

3-D Secure Response Fields

Value Limits Get Method Description
CAVV result code 1-character alphanumeric receipt.getCavvResultCode(); Indicates the Verified by Visa CAVV result. Possible response codes are shown in the CAVV Result Code table.

Predecessors
  • For VbV, SecureCode or SafeKey transactions:
  • For Apple Pay transactions:
    • Apple Pay in-app integration – please refer to the Apple Developer Portal
    • Android Pay in-app integration - please refer to the Google Developer Portal
Successors
  • Pre-Authorization Completion ( API | Batch File)
  • Vault Tokenize Credit Card ( API )

Pre-Authorization with Vault

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 Pre-Authorization 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 charging a temporary token and charging 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 charge the card.

Canada Code Sample

package Canada;

import JavaAPI.*;

public class TestCanadaResPreauthCC
{
	public static void main(String[] args)
	{
		java.util.Date createDate = new java.util.Date(); 
		String order_id = "Test"+createDate.getTime();
		String store_id = "store5";
		String api_token = "yesguy";
		String data_key = "ot-bPKO547Rqeb4ImweGGkLQUW3K";
		String amount = "1.00";
		String cust_id = "customer1"; //if sent will be submitted, otherwise cust_id from profile will be used
		String crypt_type = "1";
		String dynamic_descriptor = "my descriptor";
		String processing_country_code = "CA";
		String expdate = "1712"; //For Temp Token
		boolean status_check = false;

		ResPreauthCC resPreauthCC = new ResPreauthCC();
		resPreauthCC.setData(data_key);
		resPreauthCC.setOrderId(order_id);
		resPreauthCC.setCustId(cust_id);
		resPreauthCC.setAmount(amount);
		resPreauthCC.setCryptType(crypt_type);
		resPreauthCC.setDynamicDescriptor(dynamic_descriptor);
		//resPreauthCC.setExpDate(expdate);  //Temp Tokens only

		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(resPreauthCC);
		mpgReq.setStatusCheck(status_check);
		mpgReq.send();

		try
		{
			Receipt receipt = mpgReq.getReceipt();

			System.out.println("DataKey = " + receipt.getDataKey());
			System.out.println("ReceiptId = " + receipt.getReceiptId());
			System.out.println("ReferenceNum = " + receipt.getReferenceNum());
			System.out.println("ResponseCode = " + receipt.getResponseCode());
			System.out.println("AuthCode = " + receipt.getAuthCode());
			System.out.println("Message = " + receipt.getMessage());
			System.out.println("TransDate = " + receipt.getTransDate());
			System.out.println("TransTime = " + receipt.getTransTime());
			System.out.println("TransType = " + receipt.getTransType());
			System.out.println("Complete = " + receipt.getComplete());
			System.out.println("TransAmount = " + receipt.getTransAmount());
			System.out.println("CardType = " + receipt.getCardType());
			System.out.println("TxnNumber = " + receipt.getTxnNumber());
			System.out.println("TimedOut = " + receipt.getTimedOut());
			System.out.println("ResSuccess = " + receipt.getResSuccess());
			System.out.println("PaymentType = " + receipt.getPaymentType());
			System.out.println("IsVisaDebit = " + receipt.getIsVisaDebit());
			System.out.println("Cust ID = " + receipt.getResCustId());
			System.out.println("Phone = " + receipt.getResPhone());
			System.out.println("Email = " + receipt.getResEmail());
			System.out.println("Note = " + receipt.getResNote());
			System.out.println("Masked Pan = " + receipt.getResMaskedPan());
			System.out.println("Exp Date = " + receipt.getResExpdate());
			System.out.println("Crypt Type = " + receipt.getResCryptType());
			System.out.println("Avs Street Number = " + receipt.getResAvsStreetNumber());
			System.out.println("Avs Street Name = " + receipt.getResAvsStreetName());
			System.out.println("Avs Zipcode = " + receipt.getResAvsZipcode());
		}
		catch (Exception e)
		{
			e.printStackTrace();
		}
	}
}

                
USA Code Sample

package USA;

import JavaAPI.*;

public class TestUSAResPreAuthCC
{
	public static void main(String args[])
	{

		/********************** Request Variables ****************************/

		String store_id = "monusqa002";
		String api_token = "qatoken";

		/********************** Transaction Variables ************************/
		java.util.Date createDate = new java.util.Date();
		String order_id = "Test"+createDate.getTime();
		String data_key = "1P5C4C6bNPGg5xGb4ZFfaOTt8";
		String cust_id = "Hilton_1";
		String amount = "1.00";
		String crypt = "7";
		//String dynamic_descriptor = "123456";
		String processing_country_code = "US";

		/************************ Request Object ******************************/

		ResPreauthCC res_preauth_cc = new ResPreauthCC();
		res_preauth_cc.setOrderId(order_id);
		res_preauth_cc.setAmount(amount);
		res_preauth_cc.setData(data_key);
		res_preauth_cc.setCryptType(crypt);		
		res_preauth_cc.setCustId(cust_id);
		//usResPreauthCC.setDynamicDescriptor(dynamic_descriptor);

		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(res_preauth_cc);
		mpgReq.send();

		/************************ Receipt Object ******************************/

		try
		{
			Receipt receipt = mpgReq.getReceipt();

			System.out.println("DataKey = " + receipt.getDataKey());
			System.out.println("ReceiptId = " + receipt.getReceiptId());
			System.out.println("ReferenceNum = " + receipt.getReferenceNum());
			System.out.println("ResponseCode = " + receipt.getResponseCode());
			System.out.println("AuthCode = " + receipt.getAuthCode());
			System.out.println("Message = " + receipt.getMessage());
			System.out.println("TransDate = " + receipt.getTransDate());
			System.out.println("TransTime = " + receipt.getTransTime());
			System.out.println("TransType = " + receipt.getTransType());
			System.out.println("Complete = " + receipt.getComplete());
			System.out.println("TransAmount = " + receipt.getTransAmount());
			System.out.println("CardType = " + receipt.getCardType());
			System.out.println("TxnNumber = " + receipt.getTxnNumber());
			System.out.println("TimedOut = " + receipt.getTimedOut());
			System.out.println("ResSuccess = " + receipt.getResSuccess());
			System.out.println("PaymentType = " + receipt.getPaymentType() + "\n");

			//Contents of ResolveData
			System.out.println("Cust ID = " + receipt.getResCustId());
			System.out.println("Phone = " + receipt.getResPhone());
			System.out.println("Email = " + receipt.getResEmail());
			System.out.println("Note = " + receipt.getResNote());
			System.out.println("MaskedPan = " + receipt.getResMaskedPan());
			System.out.println("Exp Date = " + receipt.getResExpDate());
			System.out.println("Crypt Type = " + receipt.getResCryptType());
			System.out.println("Avs Street Number = " + receipt.getResAvsStreetNumber());
			System.out.println("Avs Street Name = " + receipt.getResAvsStreetName());
			System.out.println("Avs Zipcode = " + receipt.getResAvsZipcode());
		}
		catch (Exception e)
		{
			e.printStackTrace();
		}
	}  
}

                

Pre-Authorization with Vault - Transaction Values

ResPreauthCC resPreauthCC = new ResPreauthCC();

HttpsPostRequest mpgReq = new HttpsPostRequest();

mpgReq.setTransaction(resPreauthCC);

Pre-Authorization with Vault mandatory values

VALUE TYPE LIMITS SET METHOD DESCRIPTION
Data Key String 25-character alphanumeric resPreauthCC.setData(data_key); The data key is the token that points to a previously stored profile. Profile identifier that all future financial Vault transactions (that is, they occur after the profile was registered by a ResAddCC or ResTokenizeCC transaction) will use to associate with the saved information.
The data key is generated by Moneris, and is returned to the merchant (via the Receipt object) when the profile is first registered.
Order ID String 50-character alphanumeric resPreauthCC.setOrderId(order_id); Merchant-defined transaction identifier that must be unique for every Purchase, PreAuth and Independent Refund transaction. No two transactions of these may have the same order ID.
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. 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 resPreauthCC.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.
E-Commerce indicator String 1-character alphanumeric resPreauthCC.setCryptType(crypt); Supported values are:
  • 1 - Mail Order / Telephone Order—Single
  • 2 - Mail Order / Telephone Order—Recurring
  • 3 - Mail Order / Telephone Order—Instalment
  • 4 - Mail Order / Telephone Order—Unknown classification
  • 5 - Authenticated e-commerce transaction (VBV)
  • 6 - Non-authenticated e-commerce transaction (VBV)
  • 7 - SSL-enabled merchant
  • 8 - Non-secure transaction (web- or email-based)
  • 9 - SET non-authenticated transaction

Pre-Authorization with Vault optional values

VALUE TYPE LIMITS SET METHOD DECRIPTION
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.
Expiry Date String 4-character alphanumeric (YYMM format) resPreauthCC.setExpDate (expdate); The optional Expiry Date applies to Hosted Tokenization transactions. If the expiry date was not collected by Hosted Tokenization solution, then it must be set in the Vault transaction request.
Customer ID String 50-character alphanumeric resPreauthCC.setCustId(cust_id); This can be used for policy number, membership number, student ID, invoice number.
This field is searchable from the Moneris Merchant Resource Centre.
Customer Information Object NA Refer below for further breakdown and definition.
AVS Information Object NA Refer below for further breakdown and definition.
CVD Information Object NA Refer below for further breakdown and definition.

Vault Response Fields

Value Limits Get Method Description
Data Key 25-character alphanumeric receipt.getDataKey(); This field is created when a profile is created and a token is returned.
It is a unique profile identifier, and is a required value for all future Vault transactions.
Vault Success true/false receipt.getResSuccess(); Indicates whether Vault transaction was successful.
Payment Type cc/ach receipt.getPaymentType(); Indicates the payment type associated with a Vault profile.
Customer ID 30-character alphanumeric receipt.getResCustId(); Returns the customer ID saved in the profile.
Phone Number 30-character alphanumeric receipt.getResPhone(); Returns the phone number saved in the profile.
Email Address 30-character alphanumeric receipt.getResEmail(); Returns the email address saved in the profile.
Note 30-character alphanumeric receipt.getResNote(); Returns the note saved in the profile.
Credit Card Fields
Masked PAN 20-character numeric receipt.getResMaskedPan(); Returns the first 4 last 4 of the card number saved in the profile.
Expiry Date 4-character numeric receipt.getResExpdate(); Returns the expiry date of the card number saved in the profile. YYMM format.
E-Commerce Indicator 1-character numeric receipt.getResCryptType(); Returns the e-commerce indicator saved in the profile.
AVS Street Number 19-character alphanumeric receipt.getResAvsStreetNumber(); Returns the AVS street number saved in the profile. If no other AVS street number is passed in the transaction request, this value will be submitted along with the financial transaction to the issuer.
AVS Street Name 19-character alphanumeric receipt.getResAvsStreetName(); Returns the AVS street name saved in the profile. If no other AVS street number is passed in the transaction request, this value will be submitted along with the financial transaction to the issuer.
AVS Zip/Postal Code 9-character alphanumeric receipt.getResAvsZipcode(); Returns the AVS zip/postal code saved in the profile. If no other AVS street number is passed in the transaction request, this value will be submitted along with the financial transaction to the issuer.

Predecessors
  • Tokenize ( API )
  • ResAddCC ( API )
  • Hosted Tokenization ?( API )
Successors

Pre-Authorization with Vault and Customer Information

The Vault feature allows merchants to create customer profiles, edit those profiles, and use them to process transactions without having to enter financial information each time.

The Vault is a complement to the recurring payment module. It securely stores customer account information on Moneris secure servers. This allows merchants to bill customers for routine products or services when an invoice is due.

An optional add-on to a number of transactions the Customer Information object. The Customer Information object offers a number of fields to be submitted as part of the financial transaction, and stored by Moneris. These details may be viewed in the future in the Merchant Resource Center.

Canada Code Sample

package Canada;
                                                                            
import java.util.*;

import JavaAPI.*;

public class TestCanadaResPreauthCCCustInfo
{
	public static void main(String[] args)
	{
		java.util.Date createDate = new java.util.Date(); 
		String order_id = "Test"+createDate.getTime();
		String store_id = "store1";
		String api_token = "yesguy";
		String data_key = "v8iwTS0FbsSLg8dfSc54kONfw";
		String amount = "1.00";
		String cust_id = "customer1"; //if sent will be submitted, otherwise cust_id from profile will be used
		String crypt_type = "1";
		String processing_country_code = "CA";
		boolean status_check = false;

		ResPreauthCC resPreauthCC = new ResPreauthCC();
		resPreauthCC.setData(data_key);
		resPreauthCC.setOrderId(order_id);
		resPreauthCC.setCustId(cust_id);
		resPreauthCC.setAmount(amount);
		resPreauthCC.setCryptType(crypt_type);

		//CustInfo Variables
		CustInfo custInfo = new CustInfo();

		custInfo.setEmail("nick@widget.com");
		custInfo.setInstructions("Make it fast!");


		Hashtable<String, String> b = new Hashtable<String, String>();

		b.put("first_name", "Bob");
		b.put("last_name", "Smith");
		b.put("company_name", "Widget Company Inc.");
		b.put("address", "111 Bolts Ave.");
		b.put("city", "Toronto");
		b.put("province", "Ontario");
		b.put("postal_code", "M8T 1T8");
		b.put("country", "Canada");
		b.put("phone", "416-555-5555");
		b.put("fax", "416-555-5555");
		b.put("tax1", "123.45");       //federal tax
		b.put("tax2", "12.34");        //prov tax
		b.put("tax3", "15.45");        //luxury tax
		b.put("shipping_cost", "456.23");   //shipping cost

		custInfo.setBilling(b);

		/* OR you can pass the individual args.
		   custInfo.setBilling(
		   "Bob",                  //first name
		   "Smith",                //last name
		   "Widget Company Inc.",  //company name
		   "111 Bolts Ave.",       //address
		   "Toronto",              //city
		   "Ontario",              //province
		   "M8T 1T8",              //postal code
		   "Canada",               //country
		   "416-555-5555",         //phone
		   "416-555-5555",         //fax
		   "123.45",               //federal tax
		   "12.34",                //prov tax
		   "15.45",                //luxury tax
		   "456.23"                //shipping cost
		   );
		 */

		Hashtable<String, String> s = new Hashtable<String, String>();

		s.put("first_name", "Bob");
		s.put("last_name", "Smith");
		s.put("company_name", "Widget Company Inc.");
		s.put("address", "111 Bolts Ave.");
		s.put("city", "Toronto");
		s.put("province", "Ontario");
		s.put("postal_code", "M8T 1T8");
		s.put("country", "Canada");
		s.put("phone", "416-555-5555");
		s.put("fax", "416-555-5555");
		s.put("tax1", "123.45");       //federal tax
		s.put("tax2", "12.34");        //prov tax
		s.put("tax3", "15.45");        //luxury tax
		s.put("shipping_cost", "456.23");   //shipping cost

		custInfo.setShipping(s);

		/* OR you can pass the individual args.
		   custInfo.setShipping(
		   "Bob",                  //first name
		   "Smith",                //last name
		   "Widget Company Inc.",  //company name
		   "111 Bolts Ave.",       //address
		   "Toronto",              //city
		   "Ontario",              //province
		   "M8T 1T8",              //postal code
		   "Canada",               //country
		   "416-555-5555",         //phone
		   "416-555-5555",         //fax
		   "123.45",               //federal tax
		   "12.34",                //prov tax
		   "15.45",                //luxury tax
		   "456.23"                //shipping cost
		   );
		 */

		Hashtable<String, String> i1 = new Hashtable<String, String>();

		i1.put("name", "item1's name");
		i1.put("quantity", "5");
		i1.put("product_code", "item1's product code");
		i1.put("extended_amount", "1.01");

		custInfo.setItem(i1);

		/* OR you can pass the individual args.
		   custInfo.setItem(
		   "item1's name",         //name
		   "5",                    //quantity
		   "item1's product code", //product code
		   "1.01"                  //extended amount
		   );
		 */

		Hashtable<String, String> i2 = new Hashtable<String, String>();

		i2.put("name", "item2's name");
		i2.put("quantity", "7");
		i2.put("product_code", "item2's product code");
		i2.put("extended_amount", "5.01");

		custInfo.setItem(i2);

		resPreauthCC.setCustInfo(custInfo);

		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(resPreauthCC);
		mpgReq.setStatusCheck(status_check);
		mpgReq.send();

		try
		{
			Receipt receipt = mpgReq.getReceipt();

			System.out.println("DataKey = " + receipt.getDataKey());
			System.out.println("ReceiptId = " + receipt.getReceiptId());
			System.out.println("ReferenceNum = " + receipt.getReferenceNum());
			System.out.println("ResponseCode = " + receipt.getResponseCode());
			System.out.println("AuthCode = " + receipt.getAuthCode());
			System.out.println("Message = " + receipt.getMessage());
			System.out.println("TransDate = " + receipt.getTransDate());
			System.out.println("TransTime = " + receipt.getTransTime());
			System.out.println("TransType = " + receipt.getTransType());
			System.out.println("Complete = " + receipt.getComplete());
			System.out.println("TransAmount = " + receipt.getTransAmount());
			System.out.println("CardType = " + receipt.getCardType());
			System.out.println("TxnNumber = " + receipt.getTxnNumber());
			System.out.println("TimedOut = " + receipt.getTimedOut());
			System.out.println("ResSuccess = " + receipt.getResSuccess());
			System.out.println("PaymentType = " + receipt.getPaymentType());

			//ResolveData
			System.out.println("Cust ID = " + receipt.getResCustId());
			System.out.println("Phone = " + receipt.getResPhone());
			System.out.println("Email = " + receipt.getResEmail());
			System.out.println("Note = " + receipt.getResNote());
			System.out.println("Masked Pan = " + receipt.getResMaskedPan());
			System.out.println("Exp Date = " + receipt.getResExpdate());
			System.out.println("Crypt Type = " + receipt.getResCryptType());
			System.out.println("Avs Street Number = " + receipt.getResAvsStreetNumber());
			System.out.println("Avs Street Name = " + receipt.getResAvsStreetName());
			System.out.println("Avs Zipcode = " + receipt.getResAvsZipcode());
		}
		catch (Exception e)
		{
			e.printStackTrace();
		}
	}

} // end TestResPreauthCC-CustInfo
                
USA Code Sample

package USA;

import JavaAPI.*;

public class TestUSAResPreAuthCCCustInfo
{
  public static void main(String args[])
  {

/********************** Request Variables ****************************/

        String store_id = "monusqa002";
        String api_token = "qatoken";
        String processing_country_code = "US";
        
/********************** Transaction Variables ************************/

        String data_key = "1P5C4C6bNPGg5xGb4ZFfaOTt8";
        java.util.Date createDate = new java.util.Date();
		String order_id = "Test"+createDate.getTime();
        String cust_id = "Hilton_1";
        String amount = "1.00";
        String crypt = "7";
		
/********************* Billing/Shipping Variables ********************/

        String last_name = "Harris";
        String first_name = "Tommie";
        String company_name = "Da Bears";
        String address = "454 Michigan Ave";
        String city = "Chicago";
        String province = "Illinois";
        String zip_code = "99879";
        String country = "USA";
        String phone_number = "764-908-9989";
        String fax = "764-908-9990";
        String tax1 = "1.00";
        String tax2 = "1.00";
        String tax3 = "1.00";
        String shipping_cost = "2.00";

/************************* Line Item Variables *************************/

		String[] name = new String[]{"Mini Bears Helmet", "Mini Bills Helmet"};
		String[] quantity = new String[]{"1", "2"};
		String[] product_code = new String[] {"BEOOOWS9", "BUFD099D"};
		String[] extended_amount = new String[] {"4.00", "6.00"};

/************************ Miscellaneous Variables **********************/

		String email = "T.Harris@ChicagoBears.com";
		String instructions = "Must arrive before opening day at Lambeau";

/*********************** Transaction Object *******************************/

        ResPreauthCC res_preauth_cc = new ResPreauthCC();
        res_preauth_cc.setData(data_key);
		res_preauth_cc.setOrderId(order_id);
		res_preauth_cc.setCustId(cust_id);
		res_preauth_cc.setAmount(amount);
		res_preauth_cc.setCryptType(crypt);		
		
		

/*********************** Billing/Shipping Object **************************/

		BillingLocation billingAddress =
				new BillingLocation  (last_name, first_name, company_name, address,
									   city, province, zip_code, country, phone_number,
									   fax, tax1, tax2, tax3, shipping_cost);

		ShippingLocation shippingAddress =
				new ShippingLocation  (last_name, first_name, company_name, address,
									   city, province, zip_code, country, phone_number,
									   fax, tax1, tax2, tax3, shipping_cost);

/************************ Line Item Object ************************************/

		Item[] lineItems = new Item[]{new Item(name[0], quantity[0], product_code[0], extended_amount[0]),
									  new Item(name[1], quantity[1], product_code[1], extended_amount[1])};


/************************* Customer Information Object *************************/

		CustomerInfo custData =
				new CustomerInfo (billingAddress, shippingAddress, email, instructions, lineItems);


		res_preauth_cc.setCustInfo (custData);

/************************ Request Object ******************************/

	    
	    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(res_preauth_cc);
		mpgReq.send();
/************************ Receipt Object ******************************/
	    
	    try
        {
            Receipt receipt = mpgReq.getReceipt();
 
            System.out.println("DataKey = " + receipt.getDataKey());
            System.out.println("ReceiptId = " + receipt.getReceiptId());
            System.out.println("ReferenceNum = " + receipt.getReferenceNum());
    		System.out.println("ResponseCode = " + receipt.getResponseCode());
    		System.out.println("AuthCode = " + receipt.getAuthCode());
    		System.out.println("Message = " + receipt.getMessage());
    		System.out.println("TransDate = " + receipt.getTransDate());
    		System.out.println("TransTime = " + receipt.getTransTime());
    		System.out.println("TransType = " + receipt.getTransType());
    		System.out.println("Complete = " + receipt.getComplete());
    		System.out.println("TransAmount = " + receipt.getTransAmount());
    		System.out.println("CardType = " + receipt.getCardType());
    		System.out.println("TxnNumber = " + receipt.getTxnNumber());
    		System.out.println("TimedOut = " + receipt.getTimedOut());
    		System.out.println("ResSuccess = " + receipt.getResSuccess());
    		System.out.println("PaymentType = " + receipt.getPaymentType() + "\n");
    		System.out.println("Cust ID = " + receipt.getResCustId());
    		System.out.println("Phone = " + receipt.getResPhone());
    		System.out.println("Email = " + receipt.getResEmail());
    		System.out.println("Note = " + receipt.getResNote());
    		System.out.println("MaskedPan = " + receipt.getResMaskedPan());
    		System.out.println("Exp Date = " + receipt.getResExpDate());
    		System.out.println("Crypt Type = " + receipt.getResCryptType());
    		System.out.println("Avs Street Number = " + receipt.getResAvsStreetNumber());
    		System.out.println("Avs Street Name = " + receipt.getResAvsStreetName());
    		System.out.println("Avs Zipcode = " + receipt.getResAvsZipcode());
        }
	    catch (Exception e)
        {
            e.printStackTrace();
        }
  	}  
}

                

Pre-Authorization with Vault - Transaction Values

ResPreauthCC resPreauthCC = new ResPreauthCC();

HttpsPostRequest mpgReq = new HttpsPostRequest();

mpgReq.setTransaction(resPreauthCC);

Pre-Authorization with Vault mandatory values

VALUE TYPE LIMITS SET METHOD DESCRIPTION
Data Key String 25-character alphanumeric resPreauthCC.setData(data_key); The data key is the token that points to a previously stored profile. Profile identifier that all future financial Vault transactions (that is, they occur after the profile was registered by a ResAddCC or ResTokenizeCC transaction) will use to associate with the saved information.
The data key is generated by Moneris, and is returned to the merchant (via the Receipt object) when the profile is first registered.
Order ID String 50-character alphanumeric resPreauthCC.setOrderId(order_id); Merchant-defined transaction identifier that must be unique for every Purchase, PreAuth and Independent Refund transaction. No two transactions of these may have the same order ID.
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. 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 resPreauthCC.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.
E-Commerce indicator String 1-character alphanumeric resPreauthCC.setCryptType(crypt); Supported values are:
  • 1 - Mail Order / Telephone Order—Single
  • 2 - Mail Order / Telephone Order—Recurring
  • 3 - Mail Order / Telephone Order—Instalment
  • 4 - Mail Order / Telephone Order—Unknown classification
  • 5 - Authenticated e-commerce transaction (VBV)
  • 6 - Non-authenticated e-commerce transaction (VBV)
  • 7 - SSL-enabled merchant
  • 8 - Non-secure transaction (web- or email-based)
  • 9 - SET non-authenticated transaction

Pre-Authorization with Vault optional values

VALUE TYPE LIMITS SET METHOD DECRIPTION
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.
Expiry Date String 4-character alphanumeric
YYMM format.
resPreauthCC.setExpDate (expdate); The optional Expiry Date applies to Hosted Tokenization transactions. If the expiry date was not collected by Hosted Tokenization solution, then it must be set in the Vault transaction request.
Customer ID String 50-character alphanumeric resPreauthCC.setCustId(cust_id); This can be used for policy number, membership number, student ID, invoice number.
This field is searchable from the Moneris Merchant Resource Centre.
Customer Information Object NA Refer below for further breakdown and definition.
AVS Information Object NA Refer below for further breakdown and definition.
CVD Information Object NA Refer below for further breakdown and definition.

CustInfo object mandatory properties

Value Type Limits Set method Decription
Email Address String 60-character alphanumeric customer.setEmail("nick@widget.com"); Customer email address.
Instructions String 100-character alphanumeric customer.setInstructions("Rush!"); Instructions or notes.
Billing Information Object Option 1:
customer.setBilling(first_name, last_name, company_name, address, city, province, postal_code, country, phone, fax, tax1, tax2, tax3, shipping_cost); 

Option 2:
customer.setBilling(billing_hash);
Billing information is stored as part of the CustInfo object. A maximum of 1 billing object may be set. They can be written to the object in one of two ways:
  • Using set methods
  • Using hash tables.
Refer below for further breakdown and definition.
Shipping Information Object Option 1:
customer.setShipping(first_name, last_name, company_name, address, city, province, postal_code, country, phone, fax, tax1, tax2, tax3, shipping_cost); 

Option 2:
customer.setShipping(shipping_hash);
Shipping information is stored as part of the CustInfo object. A maximum of 1 shipping object may be set. They can be written to the object in one of two ways:
  • Using set methods
  • Using hash tables.
Refer below for further breakdown and definition.
Items Array Object Option 1:
customer.setItem(item_description[0], item_quantity[0], item_product_code[0], item_extended_amount[0]); 

Option 2:
Customer.setItem(item_hash);
Item information is stored as part of the CustInfo object. Multiple items may be set. They can be written to the object in one of two ways:
  • Using set methods
  • Using hash tables.
Refer below for further breakdown and definition.

Setting Billing & Shipping using Set Methods

The billing information and the shipping information for a given CustInfo object are written by using the customer.setBilling() and customer.setShipping() methods respectively:

customer.setBilling(first_name, last_name, company_name, address, city, province, postal_code, country, phone, fax, tax1, tax2, tax3, shipping_cost);

customer.setShipping(first_name, last_name, company_name, address, city, province, postal_code, country, phone, fax, tax1, tax2, tax3, shipping_cost);

Both of these methods have the same set of mandatory arguments.

Setting Billing & Shipping using Hash Tables

Writing billing or shipping information using hash tables is done as follows:

  1. Instantiate a CustInfo object.
  2. Instantiate a Hashtable object. (The sample code uses a different hash table for billing and shipping for clarity purposes. However, the skillful developer can re-use the same one.)
  3. Build the hashtable using put methods with the hash table keys in the table below.
  4. Call the CustInfo object's setBilling()/setShipping() method to pass the hashtable information to the CustInfo object
  5. Call the transaction object's setCustInfo() method to write the CustInfo object (with the billing/shipping information to the transaction object.

Billing & Shipping mandatory values

Value Type Limits Variable/Hash Table Key Description
First Name String 30-character alphanumeric "first_name" Customer first name
Last Name String 30-character alphanumeric "last_name" Customer last name
Company Name String 50-character alphanumeric "company_name" Customer 's company name
Address String 70-character alphanumeric "address" Customer's address
City String 30-character alphanumeric "city" Customer's city
Province / State String 30-character alphanumeric "province" Customer's province or state
Postal / Zip Code String 30-character alphanumeric "postal_code" Customer's postal or zip code
Country String 30-character alphanumeric "country" Customer's country
Phone Number String 30-character alphanumeric "phone" Customer's phone number
Fax Number String 30-character alphanumeric fax" Customer's fax number
Federal Tax String 10-character alphanumeric "tax1" Federal tax amount. Amount is not used for calculating total amount.
Provincial / State Tax String 10-character alphanumeric "tax2" Provincial or state tax amount. Amount is not used for calculating total amount.
Country / Local / Specialty Tax String 10-character alphanumeric "tax3" County, local or specialty tax amount. Amount is not used for calculating total amount.
Shipping Cost String 10-character alphanumeric "shipping_cost" Shipping cost. Amount is not used for calculating total amount.

Setting Items using Set Methods

All the item information in the table below is written to the CustInfo object in one instruction for a given item. Multiples items may be set. Such as:

customer.setItem(item_description, item_quantity, item_product_code, item_extended_amount);

Setting Items using Hash Tables

Writing item information using hash tables is done as follows:

  1. Instantiate a CustInfo object.
  2. Instantiate a Hashtable object. (The sample code uses a different hash table for each item for clarity purposes. However, the skillful developer can re-use the same one.)
  3. Build the hashtable using put methods with the hash table keys in the table below.
  4. Call the CustInfo object's setItem() method to pass the hashtable information to the CustInfo object
  5. Call the transaction object's setCustInfo() method to write the CustInfo object (with the item information to the transaction object.

Item mandatory values

Value Type Limits Variable/Hash Table Key Description
Item Name String 45-character alphanumeric "name" Item name or description.
Item Quantity String 5-character numeric "quantity" You must send a quantity > 0 or the item will not be added to the item list (i.e. minimum 1, maximum 99999)
Item Product Code String 20-character alphanumeric "product_code" Item product code or SKU.
Item Extended Amount String 9-character decimal "extended_amount" Must contain at least 3 digits and 2 penny values.
0.01-999999.99

Vault Response Fields

Value Limits Get Method Description
Data Key 25-character alphanumeric receipt.getDataKey(); This field is created when a profile is created and a token is returned.
It is a unique profile identifier, and is a required value for all future Vault transactions.
Vault Success true/false receipt.getResSuccess(); Indicates whether Vault transaction was successful.
Payment Type cc/ach receipt.getPaymentType(); Indicates the payment type associated with a Vault profile.
Customer ID 30-character alphanumeric receipt.getResCustId(); Returns the customer ID saved in the profile.
Phone Number 30-character alphanumeric receipt.getResPhone(); Returns the phone number saved in the profile.
Email Address 30-character alphanumeric receipt.getResEmail(); Returns the email address saved in the profile.
Note 30-character alphanumeric receipt.getResNote(); Returns the note saved in the profile.
Credit Card Fields
Masked PAN 20-character numeric receipt.getResMaskedPan(); Returns the first 4 last 4 of the card number saved in the profile.
Expiry Date 4-character numeric receipt.getResExpdate(); Returns the expiry date of the card number saved in the profile. YYMM format.
E-Commerce Indicator 1-character numeric receipt.getResCryptType(); Returns the e-commerce indicator saved in the profile.
AVS Street Number 19-character alphanumeric receipt.getResAvsStreetNumber(); Returns the AVS street number saved in the profile. If no other AVS street number is passed in the transaction request, this value will be submitted along with the financial transaction to the issuer.
AVS Street Name 19-character alphanumeric receipt.getResAvsStreetName(); Returns the AVS street name saved in the profile. If no other AVS street number is passed in the transaction request, this value will be submitted along with the financial transaction to the issuer.
AVS Zip/Postal Code 9-character alphanumeric receipt.getResAvsZipcode(); Returns the AVS zip/postal code saved in the profile. If no other AVS street number is passed in the transaction request, this value will be submitted along with the financial transaction to the issuer.

Predecessors
  • Tokenize ( API )
  • ResAddCC ? ( API )
  • Hosted Tokenization ?( API )
Successors

Pre-Authorization 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 Pre-Authorization transaction.

The data key may be a temporary one generated using Hosted Tokenization or it may be a permanent one from the Vault.

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 TestCanadaResPreauthCCEfraud
{
	public static void main(String[] args)
	{
		java.util.Date createDate = new java.util.Date(); 
		String order_id = "Test"+createDate.getTime();
		String store_id = "store1";
		String api_token = "yesguy";
		String data_key = "eLqsADfwqHDxIpJG9vLnELx01";
		String amount = "1.00";
		String cust_id = "customer1"; //if sent will be submitted, otherwise cust_id from profile will be used
		String crypt_type = "1";
		String processing_country_code = "CA";
		boolean status_check = false;

		AvsInfo avsCheck = new AvsInfo();
		avsCheck.setAvsStreetNumber("212");
		avsCheck.setAvsStreetName("Payton Street");
		avsCheck.setAvsZipCode("M1M1M1");
		avsCheck.setAvsEmail("test@host.com");
		avsCheck.setAvsHostname("hostname");
		avsCheck.setAvsBrowser("Mozilla");
		avsCheck.setAvsShiptoCountry("CAN");
		avsCheck.setAvsShipMethod("G");
		avsCheck.setAvsMerchProdSku("123456");
		avsCheck.setAvsCustIp("192.168.0.1");
		avsCheck.setAvsCustPhone("5556667777");

		CvdInfo cvdCheck = new CvdInfo();
		cvdCheck.setCvdIndicator("1");
		cvdCheck.setCvdValue("099");

		ResPreauthCC resPreauthCC = new ResPreauthCC();
		resPreauthCC.setData(data_key);
		resPreauthCC.setOrderId(order_id);
		resPreauthCC.setCustId(cust_id);
		resPreauthCC.setAmount(amount);
		resPreauthCC.setCryptType(crypt_type);
		resPreauthCC.setAvsInfo(avsCheck);
		resPreauthCC.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(resPreauthCC);
		mpgReq.setStatusCheck(status_check);
		mpgReq.send();

		try
		{
			Receipt receipt = mpgReq.getReceipt();

			System.out.println("DataKey = " + receipt.getDataKey());
			System.out.println("ReceiptId = " + receipt.getReceiptId());
			System.out.println("ReferenceNum = " + receipt.getReferenceNum());
			System.out.println("ResponseCode = " + receipt.getResponseCode());
			System.out.println("AuthCode = " + receipt.getAuthCode());
			System.out.println("Message = " + receipt.getMessage());
			System.out.println("TransDate = " + receipt.getTransDate());
			System.out.println("TransTime = " + receipt.getTransTime());
			System.out.println("TransType = " + receipt.getTransType());
			System.out.println("Complete = " + receipt.getComplete());
			System.out.println("TransAmount = " + receipt.getTransAmount());
			System.out.println("CardType = " + receipt.getCardType());
			System.out.println("TxnNumber = " + receipt.getTxnNumber());
			System.out.println("TimedOut = " + receipt.getTimedOut());
			System.out.println("AVSResponse = " + receipt.getAvsResultCode());
			System.out.println("CVDResponse = " + receipt.getCvdResultCode());
			System.out.println("ITDResponse = " + receipt.getITDResponse());
			System.out.println("ResSuccess = " + receipt.getResSuccess());
			System.out.println("PaymentType = " + receipt.getPaymentType());
			System.out.println("Cust ID = " + receipt.getResCustId());
			System.out.println("Phone = " + receipt.getResPhone());
			System.out.println("Email = " + receipt.getResEmail());
			System.out.println("Note = " + receipt.getResNote());
			System.out.println("Masked Pan = " + receipt.getResMaskedPan());
			System.out.println("Exp Date = " + receipt.getResExpdate());
			System.out.println("Crypt Type = " + receipt.getResCryptType());
			System.out.println("Avs Street Number = " + receipt.getResAvsStreetNumber());
			System.out.println("Avs Street Name = " + receipt.getResAvsStreetName());
			System.out.println("Avs Zipcode = " + receipt.getResAvsZipcode());
		}
		catch (Exception e)
		{
			e.printStackTrace();
		}
	}
}
                
USA Code Sample

package USA;

import JavaAPI.*;

public class TestUSAResPreauthCCEfraud
{
	public static void main(String[] args)
	{
		java.util.Date createDate = new java.util.Date(); 
		String order_id = "Test"+createDate.getTime();
		String store_id = "monusqa002";
		String api_token = "qatoken";
		String data_key = "1P5C4C6bNPGg5xGb4ZFfaOTt8";
		String amount = "1.00";
		String cust_id = "customer1"; //if sent will be submitted, otherwise cust_id from profile will be used
		String crypt_type = "1";
		String processing_country_code = "US";
		boolean status_check = false;

		AvsInfo avsCheck = new AvsInfo();
		avsCheck.setAvsStreetNumber("212");
		avsCheck.setAvsStreetName("Payton Street");
		avsCheck.setAvsZipCode("M1M1M1");
		avsCheck.setAvsEmail("test@host.com");
		avsCheck.setAvsHostname("hostname");
		avsCheck.setAvsBrowser("Mozilla");
		avsCheck.setAvsShiptoCountry("CAN");
		avsCheck.setAvsShipMethod("G");
		avsCheck.setAvsMerchProdSku("123456");
		avsCheck.setAvsCustIp("192.168.0.1");
		avsCheck.setAvsCustPhone("5556667777");

		CvdInfo cvdCheck = new CvdInfo();
		cvdCheck.setCvdIndicator("1");
		cvdCheck.setCvdValue("099");

		ResPreauthCC resPreauthCC = new ResPreauthCC();
		resPreauthCC.setData(data_key);
		resPreauthCC.setOrderId(order_id);
		resPreauthCC.setCustId(cust_id);
		resPreauthCC.setAmount(amount);
		resPreauthCC.setCryptType(crypt_type);
		resPreauthCC.setAvsInfo(avsCheck);
		resPreauthCC.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(resPreauthCC);
		mpgReq.setStatusCheck(status_check);
		mpgReq.send();

		try
		{
			Receipt receipt = mpgReq.getReceipt();

			System.out.println("DataKey = " + receipt.getDataKey());
			System.out.println("ReceiptId = " + receipt.getReceiptId());
			System.out.println("ReferenceNum = " + receipt.getReferenceNum());
			System.out.println("ResponseCode = " + receipt.getResponseCode());
			System.out.println("AuthCode = " + receipt.getAuthCode());
			System.out.println("Message = " + receipt.getMessage());
			System.out.println("TransDate = " + receipt.getTransDate());
			System.out.println("TransTime = " + receipt.getTransTime());
			System.out.println("TransType = " + receipt.getTransType());
			System.out.println("Complete = " + receipt.getComplete());
			System.out.println("TransAmount = " + receipt.getTransAmount());
			System.out.println("CardType = " + receipt.getCardType());
			System.out.println("TxnNumber = " + receipt.getTxnNumber());
			System.out.println("TimedOut = " + receipt.getTimedOut());
			System.out.println("AVSResponse = " + receipt.getAvsResultCode());
			System.out.println("CVDResponse = " + receipt.getCvdResultCode());
			System.out.println("ITDResponse = " + receipt.getITDResponse());
			System.out.println("ResSuccess = " + receipt.getResSuccess());
			System.out.println("PaymentType = " + receipt.getPaymentType());
			System.out.println("Cust ID = " + receipt.getResCustId());
			System.out.println("Phone = " + receipt.getResPhone());
			System.out.println("Email = " + receipt.getResEmail());
			System.out.println("Note = " + receipt.getResNote());
			System.out.println("Masked Pan = " + receipt.getResMaskedPan());
			System.out.println("Exp Date = " + receipt.getResExpdate());
			System.out.println("Crypt Type = " + receipt.getResCryptType());
			System.out.println("Avs Street Number = " + receipt.getResAvsStreetNumber());
			System.out.println("Avs Street Name = " + receipt.getResAvsStreetName());
			System.out.println("Avs Zipcode = " + receipt.getResAvsZipcode());
		}
		catch (Exception e)
		{
			e.printStackTrace();
		}
	}
}

                

Pre-Authorization with Vault - Transaction Values

ResPreauthCC resPreauthCC = new ResPreauthCC();

HttpsPostRequest mpgReq = new HttpsPostRequest();

mpgReq.setTransaction(resPreauthCC);

Pre-Authorization with Vault mandatory values

VALUE TYPE LIMITS SET METHOD DESCRIPTION
Data Key String 25-character alphanumeric resPreauthCC.setData(data_key); The data key is the token that points to a previously stored profile. Profile identifier that all future financial Vault transactions (that is, they occur after the profile was registered by a ResAddCC or ResTokenizeCC transaction) will use to associate with the saved information.
The data key is generated by Moneris, and is returned to the merchant (via the Receipt object) when the profile is first registered.
Order ID String 50-character alphanumeric resPreauthCC.setOrderId(order_id); Merchant-defined transaction identifier that must be unique for every Purchase, PreAuth and Independent Refund transaction. No two transactions of these may have the same order ID.
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. 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 resPreauthCC.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.
E-Commerce indicator String 1-character alphanumeric resPreauthCC.setCryptType(crypt); Supported values are:
  • 1 - Mail Order / Telephone Order—Single
  • 2 - Mail Order / Telephone Order—Recurring
  • 3 - Mail Order / Telephone Order—Instalment
  • 4 - Mail Order / Telephone Order—Unknown classification
  • 5 - Authenticated e-commerce transaction (VBV)
  • 6 - Non-authenticated e-commerce transaction (VBV)
  • 7 - SSL-enabled merchant
  • 8 - Non-secure transaction (web- or email-based)
  • 9 - SET non-authenticated transaction

Pre-Authorization with Vault optional values

VALUE TYPE LIMITS SET METHOD DECRIPTION
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.
Expiry Date String 4-character alphanumeric
YYMM format.
resPreauthCC.setExpDate (expdate); The optional Expiry Date applies to Hosted Tokenization transactions. If the expiry date was not collected by Hosted Tokenization solution, then it must be set in the Vault transaction request.
Customer ID String 50-character alphanumeric resPreauthCC.setCustId(cust_id); This can be used for policy number, membership number, student ID, invoice number.
This field is searchable from the Moneris Merchant Resource Centre.
Customer Information Object NA Refer below for further breakdown and definition.
AVS Information Object NA Refer below for further breakdown and definition.
CVD Information Object NA 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 & 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.

Vault Response Fields

Value Limits Get Method Description
Data Key 25-character alphanumeric receipt.getDataKey(); This field is created when a profile is created and a token is returned.
It is a unique profile identifier, and is a required value for all future Vault transactions.
Vault Success true/false receipt.getResSuccess(); Indicates whether Vault transaction was successful.
Payment Type cc/ach receipt.getPaymentType(); Indicates the payment type associated with a Vault profile.
Customer ID 30-character alphanumeric receipt.getResCustId(); Returns the customer ID saved in the profile.
Phone Number 30-character alphanumeric receipt.getResPhone(); Returns the phone number saved in the profile.
Email Address 30-character alphanumeric receipt.getResEmail(); Returns the email address saved in the profile.
Note 30-character alphanumeric receipt.getResNote(); Returns the note saved in the profile.
Credit Card Fields
Masked PAN 20-character numeric receipt.getResMaskedPan(); Returns the first 4 last 4 of the card number saved in the profile.
Expiry Date 4-character numeric receipt.getResExpdate(); Returns the expiry date of the card number saved in the profile. YYMM format.
E-Commerce Indicator 1-character numeric receipt.getResCryptType(); Returns the e-commerce indicator saved in the profile.
AVS Street Number 19-character alphanumeric receipt.getResAvsStreetNumber(); Returns the AVS street number saved in the profile. If no other AVS street number is passed in the transaction request, this value will be submitted along with the financial transaction to the issuer.
AVS Street Name 19-character alphanumeric receipt.getResAvsStreetName(); Returns the AVS street name saved in the profile. If no other AVS street number is passed in the transaction request, this value will be submitted along with the financial transaction to the issuer.
AVS Zip/Postal Code 9-character alphanumeric receipt.getResAvsZipcode(); Returns the AVS zip/postal code saved in the profile. If no other AVS street number is passed in the transaction request, this value will be submitted along with the financial transaction to the issuer.

Predecessors
  • Tokenize ( API )
  • ResAddCC ? ( API )
  • Hosted Tokenization ?( API )
Successors

Pre-Authorization with Vault and 3-D Secure

Some of the benefits of these programs are reduced risk of fraudulent transactions and protection against chargebacks for certain fraudulent transactions. Enrollment is required to participate in the VbV, Secure Code and SafeKey programs. Merchants must contact the Moneris Sales/Support Helpdesk to enroll into these programs.

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 Pre-Authorization transaction.

The Pre-Authorization with 3-D Secure transaction follows a 3-D Secure MPI authentication. After receiving confirmation from the MPI ACS transaction, this Pre-Authorization verifies funds on the customer’s card, removes the funds and prepares them for deposit into the merchant’s account.

To perform the 3-D Secure authentication, the Moneris MPI or any 3rd party MPI may be used.

The Moneris MPI accepts requests for Verified by Visa (VbV), MasterCard Secure Code (MCSC) and American Express SafeKey. VBV, MCSC and SafeKey are programs based on the 3-D Secure Protocol to improve the security of online transactions. These programs involve authentication of the cardholder during an online e-commerce transaction. Authentication is based on the issuer’s selected method of authentication.

The following are examples of authentication methods:

  • Risk-based authentication
  • Dynamic passwords
  • Static passwords.

Some of the benefits of these programs are reduced risk of fraudulent transactions and protection against chargebacks for certain fraudulent transactions. Enrollment is required to participate in the VbV, Secure Code and SafeKey programs. Merchants must contact the Moneris Sales/Support Helpdesk to enroll into these programs.

Canada Code Sample

package Canada;

import JavaAPI.*;

public class TestCanadaResCavvPreauthCC
{
	public static void main(String[] args)
	{
		String store_id = "store1";
		String api_token = "yesguy";
		String data_key = "4INQR1A8ocxD0oafSz50LADXy";
		java.util.Date createDate = new java.util.Date(); 
		String order_id = "Test"+createDate.getTime();
		String amount = "1.00";
		String cust_id = "customer1"; //if sent will be submitted, otherwise cust_id from profile will be used
		String cavv = "AAABBJg0VhI0VniQEjRWAAAAAAA";
		String processing_country_code = "CA";
		String expdate = "1901";
		boolean status_check = false;

		ResCavvPreauthCC resCavvPreauthCC = new ResCavvPreauthCC();
		resCavvPreauthCC.setOrderId(order_id);
		resCavvPreauthCC.setData(data_key);
		resCavvPreauthCC.setCustId(cust_id);
		resCavvPreauthCC.setAmount(amount);
		resCavvPreauthCC.setCavv(cavv);
		resCavvPreauthCC.setExpDate(expdate);


		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(resCavvPreauthCC);
		mpgReq.setStatusCheck(status_check);
		mpgReq.send();

		try
		{
			Receipt receipt = mpgReq.getReceipt();

			System.out.println("DataKey = " + receipt.getDataKey());
			System.out.println("ReceiptId = " + receipt.getReceiptId());
			System.out.println("ReferenceNum = " + receipt.getReferenceNum());
			System.out.println("ResponseCode = " + receipt.getResponseCode());
			System.out.println("AuthCode = " + receipt.getAuthCode());
			System.out.println("Message = " + receipt.getMessage());
			System.out.println("TransDate = " + receipt.getTransDate());
			System.out.println("TransTime = " + receipt.getTransTime());
			System.out.println("TransType = " + receipt.getTransType());
			System.out.println("Complete = " + receipt.getComplete());
			System.out.println("TransAmount = " + receipt.getTransAmount());
			System.out.println("CardType = " + receipt.getCardType());
			System.out.println("TxnNumber = " + receipt.getTxnNumber());
			System.out.println("TimedOut = " + receipt.getTimedOut());
			System.out.println("ResSuccess = " + receipt.getResSuccess());
			System.out.println("PaymentType = " + receipt.getPaymentType());
			System.out.println("CavvResultCode = " + receipt.getCavvResultCode());

			//ResolveData
			System.out.println("Cust ID = " + receipt.getResCustId());
			System.out.println("Phone = " + receipt.getResPhone());
			System.out.println("Email = " + receipt.getResEmail());
			System.out.println("Note = " + receipt.getResNote());
			System.out.println("Masked Pan = " + receipt.getResMaskedPan());
			System.out.println("Exp Date = " + receipt.getResExpdate());
			System.out.println("Crypt Type = " + receipt.getResCryptType());
			System.out.println("Avs Street Number = " + receipt.getResAvsStreetNumber());
			System.out.println("Avs Street Name = " + receipt.getResAvsStreetName());
			System.out.println("Avs Zipcode = " + receipt.getResAvsZipcode());
		}
		catch (Exception e)
		{
			e.printStackTrace();
		}
	}
}
                

Pre-Authorization with Vault - Transaction Values

ResPreauthCC resPreauthCC = new ResPreauthCC();

HttpsPostRequest mpgReq = new HttpsPostRequest();

mpgReq.setTransaction(resPreauthCC);

Pre-Authorization with Vault mandatory values

VALUE TYPE LIMITS SET METHOD DESCRIPTION
Data Key String 25-character alphanumeric resPreauthCC.setData(data_key); The data key is the token that points to a previously stored profile. Profile identifier that all future financial Vault transactions (that is, they occur after the profile was registered by a ResAddCC or ResTokenizeCC transaction) will use to associate with the saved information.
The data key is generated by Moneris, and is returned to the merchant (via the Receipt object) when the profile is first registered.
Order ID String 50-character alphanumeric resPreauthCC.setOrderId(order_id); Merchant-defined transaction identifier that must be unique for every Purchase, PreAuth and Independent Refund transaction. No two transactions of these may have the same order ID.
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. 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 resPreauthCC.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.
E-Commerce indicator String 1-character alphanumeric resPreauthCC.setCryptType(crypt); Supported values are:
  • 1 - Mail Order / Telephone Order—Single
  • 2 - Mail Order / Telephone Order—Recurring
  • 3 - Mail Order / Telephone Order—Instalment
  • 4 - Mail Order / Telephone Order—Unknown classification
  • 5 - Authenticated e-commerce transaction (VBV)
  • 6 - Non-authenticated e-commerce transaction (VBV)
  • 7 - SSL-enabled merchant
  • 8 - Non-secure transaction (web- or email-based)
  • 9 - SET non-authenticated transaction

Pre-Authorization with Vault optional values

VALUE TYPE LIMITS SET METHOD DECRIPTION
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.
Expiry Date String 4-character alphanumeric
YYMM format.
resPreauthCC.setExpDate (expdate); The optional Expiry Date applies to Hosted Tokenization transactions. If the expiry date was not collected by Hosted Tokenization solution, then it must be set in the Vault transaction request.
Customer ID String 50-character alphanumeric resPreauthCC.setCustId(cust_id); This can be used for policy number, membership number, student ID, invoice number.
This field is searchable from the Moneris Merchant Resource Centre.
Customer Information Object NA Refer below for further breakdown and definition.
AVS Information Object NA Refer below for further breakdown and definition.
CVD Information Object NA Refer below for further breakdown and definition.

ResMpiTxn object

ResMpiTxn resMpiTxn = new ResMpiTxn();

HttpsPostRequest object for Completion transaction

HttpsPostRequest mpgReq = new HttpsPostRequest();

mpgReq.setTransaction(completion);

ResMpiTxn transaction object mandatory values

Value Type Limits Set method Description
Data key String 25-character alphanumeric resMpiTxn.setData(data_key); Profile identifier that all future financial Vault transactions (that is, they occur after the profile was registered by a ResAddCC or ResTokenizeCC transaction) will use to associate with the saved information.

The data key is generated by Moneris, and is returned to the merchant (via the Receipt object) when the profile is first registered.
Xid String TBD resMpiTxn.setXid(xid); Can also be used as your order ID when using Moneris Payment Gateway.
Amount String 9-character decimal resMpiTxn.setAmount(amount); Transaction amount. Used in a number of transactions. Note that this is different from the amount used in a Completion transaction, which is an alphanumeric value.

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 999 999.99. Transaction amounts of $0.00 are not allowed.
MD String TBD resMpiTxn.setMD(MD); Information to be echoed back in the response.
Merchant URL String TBD resMpiTxn.setMerchantUrl(merchantUrl); URL to which the MPI response is to be sent.
Accept String TBD resMpiTxn.setAccept(accept); MIME types that the browser accepts
User Agent String TBD resMpiTxn.setUserAgent(userAgent); Browser details
Expiry Date String 4-character alphanumeric
(YYMM format)
resMpiTxn.setExpDate(expdate); Submit in YYMM format.
Note: This is the reverse of the date displayed on the physical card, which is MMYY.

ResMpiTxn transaction object 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.

3-D Secure Response Fields

Value Limits Get Method Description
CAVV result code 1-character alphanumeric receipt.getCavvResultCode(); Indicates the Verified by Visa CAVV result. Possible response codes are shown in the CAVV Result Code table.

Vault Response Fields

Value Limits Get Method Description
Data Key 25-character alphanumeric receipt.getDataKey(); This field is created when a profile is created and a token is returned.
It is a unique profile identifier, and is a required value for all future Vault transactions.
Vault Success true/false receipt.getResSuccess(); Indicates whether Vault transaction was successful.
Payment Type cc/ach receipt.getPaymentType(); Indicates the payment type associated with a Vault profile.
Customer ID 30-character alphanumeric receipt.getResCustId(); Returns the customer ID saved in the profile.
Phone Number 30-character alphanumeric receipt.getResPhone(); Returns the phone number saved in the profile.
Email Address 30-character alphanumeric receipt.getResEmail(); Returns the email address saved in the profile.
Note 30-character alphanumeric receipt.getResNote(); Returns the note saved in the profile.
Credit Card Fields
Masked PAN 20-character numeric receipt.getResMaskedPan(); Returns the first 4 last 4 of the card number saved in the profile.
Expiry Date 4-character numeric receipt.getResExpdate(); Returns the expiry date of the card number saved in the profile. YYMM format.
E-Commerce Indicator 1-character numeric receipt.getResCryptType(); Returns the e-commerce indicator saved in the profile.
AVS Street Number 19-character alphanumeric receipt.getResAvsStreetNumber(); Returns the AVS street number saved in the profile. If no other AVS street number is passed in the transaction request, this value will be submitted along with the financial transaction to the issuer.
AVS Street Name 19-character alphanumeric receipt.getResAvsStreetName(); Returns the AVS street name saved in the profile. If no other AVS street number is passed in the transaction request, this value will be submitted along with the financial transaction to the issuer.
AVS Zip/Postal Code 9-character alphanumeric receipt.getResAvsZipcode(); Returns the AVS zip/postal code saved in the profile. If no other AVS street number is passed in the transaction request, this value will be submitted along with the financial transaction to the issuer.

Predecessors
  • Tokenize ( API )
  • ResAddCC ( API )
  • Hosted Tokenization ( API )
Successors