Vault Add Credit Card

Creates a new credit card profile, and generates a unique data key which can be obtained from the Receipt object.

This data key is the profile identifier that all future financial Vault transactions will use to associate with the saved information

Canada Code Sample

package Canada;

import JavaAPI.*;

public class TestCanadaResAddCC
{
	public static void main(String[] args)
	{
		String store_id = "store5";
		String api_token = "yesguy";
		String pan = "5454545454545454";
		String expdate = "1912";
		String phone = "0000000000";
		String email = "bob@smith.com";
		String note = "my note";
		String cust_id = "customer1";
		String crypt_type = "7";
		String processing_country_code = "CA";
		boolean status_check = false;

		AvsInfo avsCheck = new AvsInfo();
		avsCheck.setAvsStreetNumber("212");
		avsCheck.setAvsStreetName("Payton Street");
		avsCheck.setAvsZipCode("M1M1M1");

		ResAddCC resaddcc = new ResAddCC();
		resaddcc.setPan(pan);
		resaddcc.setExpdate(expdate);
		resaddcc.setCryptType(crypt_type);
		resaddcc.setCustId(cust_id);
		resaddcc.setPhone(phone);
		resaddcc.setEmail(email);
		resaddcc.setNote(note);
		resaddcc.setAvsInfo(avsCheck);

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

		try
		{
			Receipt receipt = mpgReq.getReceipt();

			System.out.println("DataKey = " + receipt.getDataKey());
			System.out.println("ResponseCode = " + receipt.getResponseCode());
			System.out.println("Message = " + receipt.getMessage());
			System.out.println("TransDate = " + receipt.getTransDate());
			System.out.println("TransTime = " + receipt.getTransTime());
			System.out.println("Complete = " + receipt.getComplete());
			System.out.println("TimedOut = " + receipt.getTimedOut());
			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("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();
		}
	}
}

                
USA Code Sample

package USA;

import JavaAPI.*;

public class TestUSAResAddCC
{
	public static void main(String[] args)
	{
		String store_id = "monusqa002";
		String api_token = "qatoken";
		String pan = "5454545454545454";
		String expdate = "1602";        //YYMM format
		String phone = "0000000000";
		String email = "bob@smith.com";
		String note = "my note";
		String cust_id = "customer1";
		String crypt_type = "7";
		String processing_country_code = "US";
		boolean status_check = false;

		AvsInfo avsCheck = new AvsInfo();
		avsCheck.setAvsStreetNumber("212");
		avsCheck.setAvsStreetName("Payton Street");
		avsCheck.setAvsZipCode("M1M1M1");

		ResAddCC resaddcc = new ResAddCC();
		resaddcc.setPan(pan);
		resaddcc.setExpdate(expdate);
		resaddcc.setCryptType(crypt_type);
		resaddcc.setCustId(cust_id);
		resaddcc.setPhone(phone);
		resaddcc.setEmail(email);
		resaddcc.setNote(note);
		resaddcc.setAvsInfo(avsCheck);

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

		try
		{
			Receipt receipt = mpgReq.getReceipt();

			System.out.println("DataKey = " + receipt.getDataKey());
			System.out.println("ResponseCode = " + receipt.getResponseCode());
			System.out.println("Message = " + receipt.getMessage());
			System.out.println("TransDate = " + receipt.getTransDate());
			System.out.println("TransTime = " + receipt.getTransTime());
			System.out.println("Complete = " + receipt.getComplete());
			System.out.println("TimedOut = " + receipt.getTimedOut());
			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("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();
		}
	}
}

                

Vault Add Credit Card transaction object definition

ResAddCC resaddcc = new ResAddCC();

HttpsPostRequest object for Vault Add Credit Card transaction

HttpsPostRequest mpgReq = new HttpsPostRequest();

mpgReq.setTransaction(resaddcc);

Vault Add Credit Card transaction object mandatory values

Value Type Limits Set method Description
Credit card number String 20-character alphanumeric resaddcc.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) resaddcc.setExpdate(expdate); Note: This is the reverse of the date displayed on the physical card, which is MMYY.
E-Commerce indicator String 1-character numeric resaddcc.setCryptType(crypt_type); 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

Vault Add Credit Card transaction object optional values

Value Type Limits Set method Description
Customer ID String 50-character alphanumeric resaddcc.setCustId(cust_id); This can be used for policy number, membership number, student ID, invoice number and so on.

This field is searchable from the Moneris Merchant Resource Centre.
AVS Information Object AvsInfo avsCheck = new AvsInfo();
resaddcc.setAvsInfo(avsCheck);
Refer below for further breakdown and definition.
Email address String 30-character alphanumeric resaddcc.setEmail(email); Email address of the customer. Can be sent in when creating or updating a Vault profile.
Phone Number String 30-character alphanumeric resaddcc.setPhone(phone); Phone number of the customer. Can be sent in when creating or updating a Vault profile.
Note String 30-character alphanumeric resaddcc.setNote(note); This optional field can be used for supplementary information to be sent in with the transaction. This field can be sent in when creating or updating a Vault profile.

AvsInfo mandatory values

VALUE TYPE LIMITS VARIABLE DESCRIPTION
AVS street number String 19-character alphanumeric1 avs_street_number Cardholder street number.
AVS street name String See AVS street number avs_street_name Cardholder street name.
AVS zip/postal code String 9-character alphanumeric avs_zipcode Cardholder zip/postal code

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
  • None
Successors
  • Vault Purchase Credit Card (API | Batch)
  • Vault Pre-Authorization Credit Card (API | Batch)
  • Vault Independent Refund Credit Card (API | Batch)
  • Vault Card Verification (API)
  • Vault Update Credit Card (API | Batch | Hosted Vault)
  • Vault Encrypted Update Credit Card (API)
  • Vault 3-D Secure (API)
  • Vault Look Up Full (API)
  • Vault Look Up Masked (API)
  • Vault Delete (API | Batch)

Vault Add ACH

Creates a new ACH profile. A data key is generated and returned to the merchant in the response.

ACH transactions are available to US integrations only.

USA Code Sample

package USA;

import JavaAPI.*;

public class TestUSAResAddAch
{
	public static void main(String[] args)
	{
		String store_id = "monusqa002";
		String api_token = "qatoken";
		String phone = "0000000000";
		String email = "bob.smith@moneris.com";
		String note = "my note";
		String cust_id = "customer1";

		//ACHInfo Variables
		String sec = "ppd";
		String cust_first_name = "Christian";
		String cust_last_name = "M";
		String cust_address1 = "3300 Bloor St W";
		String cust_address2 = "4th floor west tower";
		String cust_city = "Toronto";
		String cust_state = "ON";
		String cust_zip = "M1M1M1";
		String routing_num = "490000018";
		String account_num = "222222";
		String check_num = "12";
		String account_type = "checking";
		String processing_country_code = "US";
		boolean status_check = false;


		ACHInfo achinfo = new ACHInfo(sec, cust_first_name, cust_last_name,
				cust_address1, cust_address2, cust_city, cust_state, cust_zip,
				routing_num, account_num, check_num, account_type);


		//alternatively, each field of ACHInfo can be set individually
		/*ACHInfo achinfo = new ACHInfo();

		//************************MANDATORY ACH VARIABLES***************************
		achinfo.setSec(sec);
		achinfo.setRoutingNum(routing_num);
		achinfo.setAccountNum(account_num);
		achinfo.setAccountType(account_type);

		//************************OPTIONAL ACH VARIABLES***************************
		achinfo.setCustFirstName(cust_first_name);
		achinfo.setCustLastName(cust_last_name);
		achinfo.setCustAddress1(cust_address1);
		achinfo.setCustAddress2(cust_address2);
		achinfo.setCustCity(cust_city);
		achinfo.setCustState(cust_state);
		achinfo.setCustZip(cust_zip);
		achinfo.setCheckNum(check_num);
		 */
		ResAddAch ressaddach = new ResAddAch();
		ressaddach.setAchInfo(achinfo);
		ressaddach.setCustId(cust_id);
		ressaddach.setPhone(phone);
		ressaddach.setEmail(email);
		ressaddach.setNote(note);

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

		try
		{
			Receipt receipt = mpgReq.getReceipt();

			System.out.println("DataKey = " + receipt.getDataKey());
			System.out.println("ResponseCode = " + receipt.getResponseCode());
			System.out.println("Message = " + receipt.getMessage());
			System.out.println("TransDate = " + receipt.getTransDate());
			System.out.println("TransTime = " + receipt.getTransTime());
			System.out.println("Complete = " + receipt.getComplete());
			System.out.println("TimedOut = " + receipt.getTimedOut());
			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("Sec = " + receipt.getResSec());
			System.out.println("Cust First Name = " + receipt.getResCustFirstName());
			System.out.println("Cust Last Name = " + receipt.getResCustLastName());
			System.out.println("Cust Address 1 = " + receipt.getResCustAddress1());
			System.out.println("Cust Address 2 = " + receipt.getResCustAddress2());
			System.out.println("Cust City = " + receipt.getResCustCity());
			System.out.println("Cust State = " + receipt.getResCustState());
			System.out.println("Cust Zip = " + receipt.getResCustZip());
			System.out.println("Routing Num = " + receipt.getResRoutingNum());
			System.out.println("Masked Account Num = " + receipt.getResMaskedAccountNum());
			System.out.println("Check Num = " + receipt.getResCheckNum());
			System.out.println("Account Type = " + receipt.getResAccountType());
		}
		catch (Exception e)
		{
			e.printStackTrace();
		}
	}
}
                

Vault Add ACH transaction object definition

ResAddAch ressaddach = new ResAddAch();

HttpsPostRequest object for Vault Add ACH transaction

HttpsPostRequest mpgReq = new HttpsPostRequest();

mpgReq.setTransaction(ressaddach);

Vault Add ACH transaction object mandatory values

Value Type Limits Set method Description
ACH Info Object ACHInfo achinfo = new ACHInfo(sec, cust_first_name, cust_last_name, cust_address1, cust_address2, cust_city, cust_state, cust_zip, routing_num, account_num, check_num, account_type, micr);
ressaddach.setAchInfo(achinfo);
Refer below for further breakdown and definition.

Vault Add ACH transaction object optional values

Value Type Limits Set method Description
Customer ID String 50-character alphanumeric ressaddach.setCustId(cust_id); This can be used for policy number, membership number, student ID, invoice number and so on.

This field is searchable from the Moneris Merchant Resource Centre.
Email address String 30-character alphanumeric ressaddach.setEmail(email); Email address of the customer. Can be sent in when creating or updating a Vault profile.
Phone number String 30-character alphanumeric ressaddach.setPhone(phone); Phone number of the customer. Can be sent in when creating or updating a Vault profile.
Note String 30-character alphanumeric ressaddach.setNote(note); This optional field can be used for supplementary information to be sent in with the transaction. This field can be sent in when creating or updating a Vault profile.

ACH Info Mandatory Values

VALUE TYPE LIMITS VARIABLE DESCRIPTION
SEC code String ppd/ccd/web sec ACH sec Code: 
The following sec codes apply 
ppd - Prearranged Payment and Deposit 
ccd - Cash Concentration or Disbursement 
web - Internet Initiated Entry 
Routing Number String 9-character numeric routing_num The first number in the MICR, or magnetic ink character recognition, line at the bottom of a check is the bank's check routing number. It is exactly nine digits long and always starts with 0, 1, 2 or 3.
Account Number String 15-character alphanumeric account_num The account number may appear before or after the check number in the check's MICR line at the bottom of the check. The length of the account number varies with a maximum length of 50 digits.
Account Type String savings/checking account_type Identifies the type of bank account. The account type must be submitted as either ‘savings’ or ‘checking’. This field is case sensitive.
 

ACH Info Optional Values

VALUE TYPE LIMITS VARIABLE DESCRIPTION
Customer First Name String 50 – character alphanumeric cust_first_name Account holder’s first name.
Customer Last Name String 50 – character alphanumeric cust_last_name Account holder’s last name.
Customer Address 1 String 50 – character alphanumeric cust_address1 Account holder’s address line 1.
Customer Address 2 String 50 – character alphanumeric cust_address2 Account holder’s address line 2.
Customer City String 50 – character alphanumeric cust_city Account holder’s city.
Customer State String 2 – character alphanumeric cust_state The state must be submitted as exactly 2 characters (ex. MI – Michigan)
Customer Zip Code String 10-character numeric cust_zip Account holder’s zip code.
Check Number String 16-character numeric check_num The sequential number for checks appears in both the MICR line at the bottom of the check and the upper right corner of the check. The check number length may vary; the maximum length is 16 digits.
 

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.
ACH Fields
SEC Code 3-character alphanumeric receipt.getResSec(); Returns the ACH SEC code saved in the profile.
Customer First Name 50-character alphanumeric receipt.getResCustFirstName(); Returns the customer first name saved in the profile.
Customer Last Name 50-character alphanumeric receipt.getResCustLastName(); Returns the customer last name saved in the profile.
Customer Address 1 50-character alphanumeric receipt.getResCustAddress1(); Returns the customer address line 1 saved in the profile.
Customer Address 2 50-character alphanumeric receipt.getResCustAddress2(); Returns the customer address line 2 saved in the profile.
Customer City 50-character alphanumeric receipt.getResCustCity(); Returns the customer city saved in the profile.
Customer State 2-character alphanumeric receipt.getResCustState(); Returns the customer state code saved in the profile.
Customer Zip Code 10-character numeric receipt.getResCustZip(); Returns the customer zip code saved in the profile.
Check Routing Number 9-character numeric receipt.getResRoutingNum(); Returns the customer check routing number saved in the profile.
Masked Account Number 15-character alphanumeric receipt.getResMaskedAccountNum(); Returns the masked first 4 last 4 of the account number saved in the profile.
Check Number 16-character numeric receipt.getResCheckNum(); Returns the check number saved in the profile.
Account Type savings/checking receipt.getResAccountType(); Returns the type of account saved in the profile.

Predecessors
  • NA
Successors

Vault Update Credit Card

Updates a Vault profile (based on the data key) to contain credit card information. All information contained within a credit card profile is updated as indicated by the submitted fields.

This will update a profile to contain Credit Card information by referencing the profile’s unique data_key. If the profile which is being updated was already a Credit Card profile, all information contained within it will simply be updated as indicated by the submitted fields. This means that all fields are optional, and only those fields that are submitted will be updated.

If however the profile was of a different payment type (ie: ACH), the old profile will be deactivated and the new Credit Card information will be associated with the data_key. As a result, the mandatory fields for creating a new Credit Card profile will be required. These fields have been listed as conditional.

Things to consider:

  • To update a specific field on the profile, only set that specific element using the corresponding set method.
  • If the Vault profile currently contains ACH payment details, then this transaction will update the token to contain Credit Card payment details and all ACH specific data, such as ACHInfo, will be overwritten.

Canada Code Sample

package Canada;

import JavaAPI.*;

public class TestCanadaResUpdateCC
{
	public static void main(String[] args)
	{
		String store_id = "moneris";
		String api_token = "hurgle";
		String data_key = "vthBJyN1BicbRkdWFZ9flyDP2";
		String pan = "4242424242424242";
		String expdate = "1901";
		String phone = "0000000000";
		String email = "bob@smith.com";
		String note = "my note";
		String cust_id = "customer1";
		String crypt_type = "7";
		String processing_country_code = "CA";
		boolean status_check = false;

		AvsInfo avsCheck = new AvsInfo();
		avsCheck.setAvsStreetNumber("212");
		avsCheck.setAvsStreetName("Payton Street");
		avsCheck.setAvsZipCode("M1M1M1");

		ResUpdateCC resUpdateCC = new ResUpdateCC();
		resUpdateCC.setData(data_key);
		resUpdateCC.setAvsInfo(avsCheck);
		resUpdateCC.setCustId(cust_id);
		resUpdateCC.setPan(pan);
		resUpdateCC.setExpdate(expdate);
		resUpdateCC.setPhone(phone);
		resUpdateCC.setEmail(email);
		resUpdateCC.setNote(note);
		resUpdateCC.setCryptType(crypt_type);

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

		try
		{
			Receipt receipt = mpgReq.getReceipt();

			System.out.println("DataKey = " + receipt.getDataKey());
			System.out.println("ResponseCode = " + receipt.getResponseCode());
			System.out.println("Message = " + receipt.getMessage());
			System.out.println("TransDate = " + receipt.getTransDate());
			System.out.println("TransTime = " + receipt.getTransTime());
			System.out.println("Complete = " + receipt.getComplete());
			System.out.println("TimedOut = " + receipt.getTimedOut());
			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("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();
		}
	}
}
                
USA Code Sample

package USA;

import JavaAPI.*;

public class TestUSAResUpdateCC
{
	public static void main(String[] args)
	{
		String store_id = "monusqa002";
		String api_token = "qatoken";
		String data_key = "HiL4u0n0pvjVYSnJc0lpATLla";
		String pan = "4242424242424242";
		String expdate = "1901"; //YYMM format
		String phone = "0000000000";
		String email = "bob@smith.com";
		String note = "my note";
		String cust_id = "customer1";
		String crypt_type = "7";
		String processing_country_code = "US";
		boolean status_check = false;

		AvsInfo avsCheck = new AvsInfo();
		avsCheck.setAvsStreetNumber("212");
		avsCheck.setAvsStreetName("Payton Street");
		avsCheck.setAvsZipCode("M1M1M1");

		ResUpdateCC usResUpdateCC = new ResUpdateCC();
		usResUpdateCC.setAvsInfo(avsCheck);
		usResUpdateCC.setCustId(cust_id);
		usResUpdateCC.setPan(pan);
		usResUpdateCC.setExpdate(expdate);
		usResUpdateCC.setPhone(phone);
		usResUpdateCC.setEmail(email);
		usResUpdateCC.setNote(note);
		usResUpdateCC.setCryptType(crypt_type);
		usResUpdateCC.setData(data_key);

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

		try
		{
			Receipt receipt = mpgReq.getReceipt();

			System.out.println("DataKey = " + receipt.getDataKey());
			System.out.println("ResponseCode = " + receipt.getResponseCode());
			System.out.println("Message = " + receipt.getMessage());
			System.out.println("TransDate = " + receipt.getTransDate());
			System.out.println("TransTime = " + receipt.getTransTime());
			System.out.println("Complete = " + receipt.getComplete());
			System.out.println("TimedOut = " + receipt.getTimedOut());
			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("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();
		}
	}
}

                

Vault Update Credit Card transaction object definition

ResUpdateCC resUpdateCC = new ResUpdateCC();

HttpsPostRequest object for Vault Update Credit Card transaction

HttpsPostRequest mpgReq = new HttpsPostRequest();

mpgReq.setTransaction(resUpdateCC);

Vault Update Credit Card transaction object mandatory values

Value Type Limits Set method Description
Data key String 25-character alphanumeric resUpdateCC.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.

Vault Update Credit Card transaction object conditional values

VALUE TYPE LIMITS SET METHOD DESCRIPTION
Credit card number String 20-character alphanumeric resUpdateCC.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. If changing an existing vault profile from ACH to Credit Card then this field is mandatory, otherwise optional.
Expiry date String 4-character alphanumeric (YYMM format) resUpdateCC.setExpdate(expdate); Note: This is the reverse of the date displayed on the physical card, which is MMYY. If changing an existing vault profile from ACH to Credit Card then this field is mandatory, otherwise optional.
E-commerce indicator String 1-character alphanumeric resUpdateCC.setCryptType(crypt_type); If changing an existing vault profile from ACH to Credit Card then this field is mandatory, otherwise optional. E-commerce indicatory, possible values: 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

Vault Update Credit Card transaction object optional values

Value Type Limits Set method Description
Credit card number String 20-character alphanumeric resUpdateCC.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) resUpdateCC.setExpdate(expdate); Note: This is the reverse of the date displayed on the physical card, which is MMYY.
E-commerce indicator String 1-character alphanumeric resUpdateCC.setCryptType(crypt_type); 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
Customer ID String 50-character alphanumeric resUpdateCC.setCustId(cust_id); This can be used for policy number, membership number, student ID, invoice number and so on.

This field is searchable from the Moneris Merchant Resource Centre.
AVS information Object AvsInfo avsCheck = new AvsInfo();
resUpdateCC.setAvsInfo(avsCheck);
Refer below for further breakdown and definition.
Email address String 30-character alphanumeric resUpdateCC.setEmail(email); Email address of the customer. Can be sent in when creating or updating a Vault profile.
Phone number String 30-character alphanumeric resUpdateCC.setPhone(phone); Phone number of the customer. Can be sent in when creating or updating a Vault profile.
Note String 30-character alphanumeric resUpdateCC.setNote(note); This optional field can be used for supplementary information to be sent in with the transaction. This field can be sent in when creating or updating a Vault profile.

AvsInfo optional values

VALUE TYPE LIMITS VARIABLE DESCRIPTION
AVS street number String 19-character alphanumeric1 avs_street_number Cardholder street number.  Value may be set to blank which will remove any AVS street number currently on file. If no need to update this field then do not set.
AVS street name String See AVS street number avs_street_name Cardholder street name. Value may be set to blank which will remove any AVS street name currently on file. If no need to update this field then do not set.
AVS zip/postal code String 9-character alphanumeric avs_zipcode Cardholder zip/postal code. Value may be set to blank which will remove any AVS zip/postal code currently on file. If no need to update this field then do not set.
 

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
  • Vault Add Credit Card (API | Batch | Hosted Vault)
  • Encrypted Vault Add Credit Card (API)
  • Vault Add Token (API)
  • Vault Tokenize Credit Card (API)
Successors
  • Vault Purchase Credit Card (API | Batch)
  • Vault Independent Refund Credit Card (API | Batch)
  • Vault Look Up Full (API)
  • Vault Look Up Masked (API)
  • Vault Delete (API | Batch)

Vault Update ACH

Updates a Vault profile (based on the unique data key) to contain ACH information.

This will update a profile to contain ACH information by referencing the profile’s unique data_key. If the profile which is being updated was already an ACH profile, all information contained within it will simply be updated as indicated by the submitted fields. This means that all fields are optional, and only those fields that are submitted will be updated.

If however the profile was of a different payment type (ie: Credit Card), the old profile will be deactivated and the new ACH information will be associated with the data_key. As a result, the mandatory fields for creating a new ACH profile will be required. These fields have been listed as conditional.

Things to consider:

  • To update a specific field on the profile, only set that specific element using the corresponding set method.
  • If the Vault profile currently contains credit card payment details, then this transaction will update the token to contain ACH payment details and all credit card specific data, such as credit card number, will be overwritten.
  • ACH transactions are available to US integrations only.

    USA Code Sample
    
    package USA;
    
    import JavaAPI.*;
    
    public class TestUSAResUpdateAch
    {
    	public static void main(String[] args)
    	{
    		String store_id = "monusqa002";
    		String api_token = "qatoken";
    		String data_key = "eRnPURQlABfvEIR44iMO6cN6S";
    		String phone = "0000000000";
    		String email = "bob@smith.com";
    		String note = "my note";
    		String cust_id = "customer1";
    
    		//ACHInfo Variables
    		String sec = "ppd";
    		String cust_first_name = "Christian";
    		String cust_last_name = "M";
    		String cust_address1 = "3300 Bloor St W";
    		String cust_address2 = "4th floor west tower";
    		String cust_city = "Toronto";
    		String cust_state = "ON";
    		String cust_zip = "M1M1M1";
    		String routing_num = "490000018";
    		String account_num = "222222";
    		String check_num = "11";
    		String account_type = "checking";
    		String processing_country_code = "US";
    		boolean status_check = false;
    
    		ACHInfo achinfo = new ACHInfo();
    		achinfo.setSec(sec);
    		achinfo.setCustFirstName(cust_first_name);
    		achinfo.setCustLastName(cust_last_name);
    		achinfo.setCustAddress1(cust_address1);
    		achinfo.setCustAddress2(cust_address2);
    		achinfo.setCustCity(cust_city);
    		achinfo.setCustState(cust_state);
    		achinfo.setCustZip(cust_zip);
    		achinfo.setRoutingNum(routing_num);
    		achinfo.setAccountNum(account_num);
    		achinfo.setCheckNum(check_num);
    		achinfo.setAccountType(account_type);
    
    		ResUpdateAch resUpdateAch = new ResUpdateAch();
    		resUpdateAch.setDataKey(data_key);
    		resUpdateAch.setAchInfo(achinfo);
    		resUpdateAch.setCustId(cust_id);
    		resUpdateAch.setPhone(phone);
    		resUpdateAch.setEmail(email);
    		resUpdateAch.setNote(note);
    
    		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(resUpdateAch);
    		mpgReq.setStatusCheck(status_check);
    		mpgReq.send();
    
    		try
    		{
    			Receipt receipt = mpgReq.getReceipt();
    
    			System.out.println("DataKey = " + receipt.getDataKey());
    			System.out.println("ResponseCode = " + receipt.getResponseCode());
    			System.out.println("Message = " + receipt.getMessage());
    			System.out.println("TransDate = " + receipt.getTransDate());
    			System.out.println("TransTime = " + receipt.getTransTime());
    			System.out.println("Complete = " + receipt.getComplete());
    			System.out.println("TimedOut = " + receipt.getTimedOut());
    			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("Sec = " + receipt.getResSec());
    			System.out.println("Cust First Name = " + receipt.getResCustFirstName());
    			System.out.println("Cust Last Name = " + receipt.getResCustLastName());
    			System.out.println("Cust Address 1 = " + receipt.getResCustAddress1());
    			System.out.println("Cust Address 2 = " + receipt.getResCustAddress2());
    			System.out.println("Cust City = " + receipt.getResCustCity());
    			System.out.println("Cust State = " + receipt.getResCustState());
    			System.out.println("Cust Zip = " + receipt.getResCustZip());
    			System.out.println("Routing Num = " + receipt.getResRoutingNum());
    			System.out.println("Masked Account Num = " + receipt.getResMaskedAccountNum());
    			System.out.println("Check Num = " + receipt.getResCheckNum());
    			System.out.println("Account Type = " + receipt.getResAccountType());
    		}
    		catch (Exception e)
    		{
    			e.printStackTrace();
    		}
    	}
    }
                    

    Vault Update ACH transaction object definition

    ResUpdateAch resUpdateAch = new ResUpdateAch();

    HttpsPostRequest object for Vault Update ACH transaction

    HttpsPostRequest mpgReq = new HttpsPostRequest();

    mpgReq.setTransaction(resUpdateAch);

    Vault Update ACH transaction object mandatory values

    Value Type Limits Set method Description
    Data key String 25-character alphanumeric resUpdateAch.setDataKey(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.

    Vault Update ACH transaction object optional values

    Value Type Limits Set method Description
    Customer ID String 50-character alphanumeric resUpdateAch.setCustId(cust_id); This can be used for policy number, membership number, student ID, invoice number and so on.

    This field is searchable from the Moneris Merchant Resource Centre.
    Email address String 30-character alphanumeric resUpdateAch.setEmail(email); Email address of the customer. Can be sent in when creating or updating a Vault profile.
    Phone number String 30-character alphanumeric resUpdateAch.setPhone(phone); Phone number of the customer. Can be sent in when creating or updating a Vault profile.
    Note String 30-character alphanumeric resUpdateAch.setNote(note); This optional field can be used for supplementary information to be sent in with the transaction. This field can be sent in when creating or updating a Vault profile.
    ACH Info Object ACHInfo achinfo = new ACHInfo(sec, cust_first_name, cust_last_name, cust_address1, cust_address2, cust_city, cust_state, cust_zip, routing_num, account_num, check_num, account_type, micr);
    resUpdateAch.setAchInfo(achinfo);
    Refer below for further breakdown and definition.

    ACH Info Conditional Values

    VALUE TYPE LIMITS VARIABLE DESCRIPTION
    SEC code String ppd/ccd/web sec If changing an existing vault profile from Credit Card to ACH then this field is mandatory, otherwise optional. ACH sec Code: 
    The following sec codes apply 
    ppd - Prearranged Payment and Deposit 
    ccd - Cash Concentration or Disbursement 
    web - Internet Initiated Entry 
    Routing Number String 9-character numeric routing_num If changing an existing vault profile from Credit Card to ACH then this field is mandatory, otherwise optional. The first number in the MICR, or magnetic ink character recognition, line at the bottom of a check is the bank's check routing number. It is exactly nine digits long and always starts with 0, 1, 2 or 3.
    Account Number String 15-character alphanumeric account_num If changing an existing vault profile from Credit Card to ACH then this field is mandatory, otherwise optional. The account number may appear before or after the check number in the check's MICR line at the bottom of the check. The length of the account number varies with a maximum length of 50 digits.
    Account Type String savings/checking account_type If changing an existing vault profile from Credit Card to ACH then this field is mandatory, otherwise optional. Identifies the type of bank account. The account type must be submitted as either ‘savings’ or ‘checking’. This field is case sensitive.
     

    ACH Info Optional Values

    VALUE TYPE LIMITS VARIABLE DESCRIPTION
    Customer First Name String 50 – character alphanumeric cust_first_name Account holder’s first name.
    Customer Last Name String 50 – character alphanumeric cust_last_name Account holder’s last name.
    Customer Address 1 String 50 – character alphanumeric cust_address1 Account holder’s address line 1.
    Customer Address 2 String 50 – character alphanumeric cust_address2 Account holder’s address line 2.
    Customer City String 50 – character alphanumeric cust_city Account holder’s city.
    Customer State String 2 – character alphanumeric cust_state The state must be submitted as exactly 2 characters (ex. MI – Michigan)
    Customer Zip Code String 10-character numeric cust_zip Account holder’s zip code.
    Check Number String 16-character numeric check_num The sequential number for checks appears in both the MICR line at the bottom of the check and the upper right corner of the check. The check number length may vary; the maximum length is 16 digits.
     

    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.
    ACH Fields
    SEC Code 3-character alphanumeric receipt.getResSec(); Returns the ACH SEC code saved in the profile.
    Customer First Name 50-character alphanumeric receipt.getResCustFirstName(); Returns the customer first name saved in the profile.
    Customer Last Name 50-character alphanumeric receipt.getResCustLastName(); Returns the customer last name saved in the profile.
    Customer Address 1 50-character alphanumeric receipt.getResCustAddress1(); Returns the customer address line 1 saved in the profile.
    Customer Address 2 50-character alphanumeric receipt.getResCustAddress2(); Returns the customer address line 2 saved in the profile.
    Customer City 50-character alphanumeric receipt.getResCustCity(); Returns the customer city saved in the profile.
    Customer State 2-character alphanumeric receipt.getResCustState(); Returns the customer state code saved in the profile.
    Customer Zip Code 10-character numeric receipt.getResCustZip(); Returns the customer zip code saved in the profile.
    Check Routing Number 9-character numeric receipt.getResRoutingNum(); Returns the customer check routing number saved in the profile.
    Masked Account Number 15-character alphanumeric receipt.getResMaskedAccountNum(); Returns the masked first 4 last 4 of the account number saved in the profile.
    Check Number 16-character numeric receipt.getResCheckNum(); Returns the check number saved in the profile.
    Account Type savings/checking receipt.getResAccountType(); Returns the type of account saved in the profile.

    Predecessors
    Successors
    • Vault Purchase ACH (API | Batch)
    • Vault Independent Refund ACH (API | Batch)
    • Vault Look Up Full (API)
    • Vault Look Up Masked (API)
    • Vault Delete (API | Batch)

    Vault Delete

    Deletes an existing Vault profile of any type using the unique data key that was assigned when the profile was added.

    It is important to note that after a profile is deleted, the information which was saved within can no longer be retrieved.

    Canada Code Sample
    
    package Canada;
    
    import JavaAPI.*;
    
    public class TestCanadaResDelete
    {
    	public static void main(String[] args)
    	{
    		String store_id = "moneris";
    		String api_token = "hurgle";
    		String data_key = "DxwdemrvfnoXO1HhmRikfw3gA";
    		String processing_country_code = "CA";
    		boolean status_check = false;
    
    		ResDelete resDelete = new ResDelete(data_key);
    
    		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(resDelete);
    		mpgReq.setStatusCheck(status_check);
    		mpgReq.send();
    
    		try
    		{
    			Receipt receipt = mpgReq.getReceipt();
    
    			System.out.println("DataKey = " + receipt.getDataKey());
    			System.out.println("ResponseCode = " + receipt.getResponseCode());
    			System.out.println("Message = " + receipt.getMessage());
    			System.out.println("TransDate = " + receipt.getTransDate());
    			System.out.println("TransTime = " + receipt.getTransTime());
    			System.out.println("Complete = " + receipt.getComplete());
    			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("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();
    		}
    	}
    }
                    
    USA Code Sample
    
    package USA;
    
    import JavaAPI.*;
    
    public class TestUSAResDelete
    {
    	public static void main(String[] args)
    	{
    		String store_id = "monusqa002";
    		String api_token = "qatoken";
    		String data_key = "A7AKitqvoSmSmI3rPTz3SgbCQ";
    		String processing_country_code = "US";
    		boolean status_check = false;
    
    		ResDelete resDelete = new ResDelete(data_key);
    
    		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(resDelete);
    		mpgReq.setStatusCheck(status_check);
    		mpgReq.send();
    
    		try
    		{
    			Receipt receipt = mpgReq.getReceipt();
    
    			System.out.println("DataKey = " + receipt.getDataKey());
    			System.out.println("ResponseCode = " + receipt.getResponseCode());
    			System.out.println("Message = " + receipt.getMessage());
    			System.out.println("TransDate = " + receipt.getTransDate());
    			System.out.println("TransTime = " + receipt.getTransTime());
    			System.out.println("Complete = " + receipt.getComplete());
    			System.out.println("TimedOut = " + receipt.getTimedOut());
    			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("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());
    			System.out.println("Presentation Type = " + receipt.getResPresentationType());
    			System.out.println("P Account Number = " + receipt.getResPAccountNumber());
    			System.out.println("Sec = " + receipt.getResSec());
    			System.out.println("Cust First Name = " + receipt.getResCustFirstName());
    			System.out.println("Cust Last Name = " + receipt.getResCustLastName());
    			System.out.println("Cust Address 1 = " + receipt.getResCustAddress1());
    			System.out.println("Cust Address 2 = " + receipt.getResCustAddress2());
    			System.out.println("Cust City = " + receipt.getResCustCity());
    			System.out.println("Cust State = " + receipt.getResCustState());
    			System.out.println("Cust Zip = " + receipt.getResCustZip());
    			System.out.println("Routing Num = " + receipt.getResRoutingNum());
    			System.out.println("Masked Account Num = " + receipt.getResMaskedAccountNum());
    			System.out.println("Check Num = " + receipt.getResCheckNum());
    			System.out.println("Account Type = " + receipt.getResAccountType());
    		}
    		catch (Exception e)
    		{
    			e.printStackTrace();
    		}
    	}
    }
                    

    Vault Delete transaction object definition

    ResDelete resDelete = new ResDelete(data_key);

    HttpsPostRequest object for Vault Delete transaction

    HttpsPostRequest mpgReq = new HttpsPostRequest();

    mpgReq.setTransaction(resDelete);

    Vault Delete transaction object mandatory values

    Value Type Limits Set method Description
    Data key String 25-character alphanumeric Not applicable (passed as argument) 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.

    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.
    ACH Fields
    SEC Code 3-character alphanumeric receipt.getResSec(); Returns the ACH SEC code saved in the profile.
    Customer First Name 50-character alphanumeric receipt.getResCustFirstName(); Returns the customer first name saved in the profile.
    Customer Last Name 50-character alphanumeric receipt.getResCustLastName(); Returns the customer last name saved in the profile.
    Customer Address 1 50-character alphanumeric receipt.getResCustAddress1(); Returns the customer address line 1 saved in the profile.
    Customer Address 2 50-character alphanumeric receipt.getResCustAddress2(); Returns the customer address line 2 saved in the profile.
    Customer City 50-character alphanumeric receipt.getResCustCity(); Returns the customer city saved in the profile.
    Customer State 2-character alphanumeric receipt.getResCustState(); Returns the customer state code saved in the profile.
    Customer Zip Code 10-character numeric receipt.getResCustZip(); Returns the customer zip code saved in the profile.
    Check Routing Number 9-character numeric receipt.getResRoutingNum(); Returns the customer check routing number saved in the profile.
    Masked Account Number 15-character alphanumeric receipt.getResMaskedAccountNum(); Returns the masked first 4 last 4 of the account number saved in the profile.
    Check Number 16-character numeric receipt.getResCheckNum(); Returns the check number saved in the profile.
    Account Type savings/checking receipt.getResAccountType(); Returns the type of account 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
    Successors
    • NA

    Vault Tokenize Credit Card

    Creates a new credit card profile using the credit card number, expiry date and e-commerce indicator that were submitted in a previous financial transaction. A transaction that was previously done in Moneris Payment Gateway is taken, and the card date from that transaction is stored in the Moneris Vault.

    As with Vault Add Credit Card, a unique data key is generated and returned to the merchant via the Receipt object. This is the profile identifier that all future financial Vault transactions will use to associate with the saved information.

    Canada Code Sample
    
    package Canada;
    
    import JavaAPI.*;
    
    public class TestCanadaResTokenizeCC
    {
    	public static void main(String[] args)
    	{
    		String store_id = "moneris";
    		String api_token = "hurgle";
    		String order_id = "mvt3212954335";
    		String txn_number = "199999-0_10";
    		String phone = "0000000000";
    		String email = "bob@smith.com";
    		String note = "my note";
    		String cust_id = "customer1";
    		String processing_country_code = "CA";
    		boolean status_check = false;
    
    		AvsInfo avsCheck = new AvsInfo();
    		avsCheck.setAvsStreetNumber("212");
    		avsCheck.setAvsStreetName("Payton Street");
    		avsCheck.setAvsZipCode("M1M1M1");
    
    		ResTokenizeCC resTokenizeCC = new ResTokenizeCC();
    		resTokenizeCC.setOrderId(order_id);
    		resTokenizeCC.setTxnNumber(txn_number);
    		resTokenizeCC.setCustId(cust_id);
    		resTokenizeCC.setPhone(phone);
    		resTokenizeCC.setEmail(email);
    		resTokenizeCC.setNote(note);
    		resTokenizeCC.setAvsInfo(avsCheck);
    
    		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(resTokenizeCC);
    		mpgReq.setStatusCheck(status_check);
    		mpgReq.send();
    
    		try
    		{
    			Receipt receipt = mpgReq.getReceipt();
    
    			System.out.println("DataKey = " + receipt.getDataKey());
    			System.out.println("ResponseCode = " + receipt.getResponseCode());
    			System.out.println("Message = " + receipt.getMessage());
    			System.out.println("TransDate = " + receipt.getTransDate());
    			System.out.println("TransTime = " + receipt.getTransTime());
    			System.out.println("Complete = " + receipt.getComplete());
    			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("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();
    		}
    	}
    }
    
                    
    USA Code Sample
    
    package USA;
    
    import JavaAPI.*;
    
    public class TestUSAResTokenizeCC
    {
    	public static void main(String[] args)
    	{
    		String store_id = "monusqa002";
    		String api_token = "qatoken";
    		String order_id = "mvt3212947254";
    		String txn_number = "123941-0_25";
    		String phone = "0000000000";
    		String email = "bob@smith.com";
    		String note = "my note";
    		String cust_id = "customer1";
    		String processing_country_code = "US";
    		boolean status_check = false;
    
    		AvsInfo avsCheck = new AvsInfo();
    		avsCheck.setAvsStreetNumber("212");
    		avsCheck.setAvsStreetName("Payton Street");
    		avsCheck.setAvsZipCode("M1M1M1");
    
    		ResTokenizeCC restokenizecc = new ResTokenizeCC();
    		restokenizecc.setOrderId(order_id);
    		restokenizecc.setTxnNumber(txn_number);
    		restokenizecc.setCustId(cust_id);
    		restokenizecc.setPhone(phone);
    		restokenizecc.setEmail(email);
    		restokenizecc.setNote(note);
    		restokenizecc.setAvsInfo(avsCheck);
    
    		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(restokenizecc);
    		mpgReq.setStatusCheck(status_check);
    		mpgReq.send();
    
    		try
    		{
    			Receipt receipt = mpgReq.getReceipt();
    
    			System.out.println("DataKey = " + receipt.getDataKey());
    			System.out.println("ResponseCode = " + receipt.getResponseCode());
    			System.out.println("Message = " + receipt.getMessage());
    			System.out.println("TransDate = " + receipt.getTransDate());
    			System.out.println("TransTime = " + receipt.getTransTime());
    			System.out.println("Complete = " + receipt.getComplete());
    			System.out.println("TimedOut = " + receipt.getTimedOut());
    			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("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();
    		}
    	}
    }
    
                    

    Vault Tokenize Credit Card transaction object definition

    ResTokenizeCC resTokenizeCC = new ResTokenizeCC();

    HttpsPostRequest object for Vault Tokenize Credit Card transaction

    HttpsPostRequest mpgReq = new HttpsPostRequest();

    mpgReq.setTransaction(resTokenizeCC);

    Vault Tokenize Credit Card transaction object mandatory values

    Value Type Limits Set method Description
    Order ID String 50-character alphanumeric resTokenizeCC.setOrderId(order_id); The order ID must reference the original transaction that is to be referenced and the card data associated with that order ID will be tokenized.
    Transaction number String 255-character alphanumeric resTokenizeCC.setTxnNumber(txn_number); Used when performing follow-on transactions. (That is, Completion, Purchase Correction or Refund.) This must be the value that was returned as the transaction number in the response of the original transaction.

    When performing a Completion, this value must reference the Pre-Authorization. When performing a Refund or a Purchase Correction, this value must reference the Completion or the Purchase.

    Vault Tokenize Credit Card transaction object optional values

    Value Type Limits Set method Description
    Customer ID String 50-character alphanumeric resTokenizeCC.setCustId(cust_id); This can be used for policy number, membership number, student ID, invoice number and so on.

    This field is searchable from the Moneris Merchant Resource Centre.
    Email address String 30-character alphanumeric resTokenizeCC.setEmail(email); Email address of the customer. Can be sent in when creating or updating a Vault profile.
    Phone number String 30-character alphanumeric resTokenizeCC.setPhone(phone); Phone number of the customer. Can be sent in when creating or updating a Vault profile.
    Note String 30-character alphanumeric resTokenizeCC.setNote(note); This optional field can be used for supplementary information to be sent in with the transaction. This field can be sent in when creating or updating a Vault profile.
    AVS information Object AvsInfo avsCheck = new AvsInfo(); resTokenizeCC.setAvsInfo(avsCheck); Refer below for further breakdown and definition.

    AvsInfo mandatory values

    VALUE TYPE LIMITS VARIABLE DESCRIPTION
    AVS street number String 19-character alphanumeric1 avs_street_number Cardholder street number.
    AVS street name String See AVS street number avs_street_name Cardholder street name.
    AVS zip/postal code String 9-character alphanumeric avs_zipcode Cardholder zip/postal code
     

    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
    Successors
    • Purchase with Vault (API | Batch)
    • Pre-Authorization with Vault (API | Batch)
    • Independent Refund with Vault (API | Batch)
    • Card Verification with Vault (API)
    • Vault Update Credit Card (API | Batch)
    • Vault Look Up Full (API)
    • Vault Look Up Masked (API)
    • Vault Delete (API | Batch)

    Vault Look Up Masked

    Verifies what is currently saved under the Vault profile associated with the given data key. The response to this transaction returns the latest active data for that profile.

    Unlike Vault Lookup Full (which returns both the masked and the unmasked credit card numbers), this transaction only returns the masked credit card number or ACH bank account number.

    Canada Code Sample
    
    package Canada;
    
    import JavaAPI.*;
    
    public class TestCanadaResLookupMasked
    {
    	public static void main(String[] args)
    	{
    		String store_id = "store1";
    		String api_token = "yesguy";
    		String data_key = "pi3ZMZoTTM8pLM9wuwws2KBxw";
    		String processing_country_code = "CA";
    		boolean status_check = false;
    
    		ResLookupMasked resLookupMasked = new ResLookupMasked();
    		resLookupMasked.setData(data_key);
    
    		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(resLookupMasked);
    		mpgReq.setStatusCheck(status_check);
    		mpgReq.send();
    
    		try
    		{
    			Receipt receipt = mpgReq.getReceipt();
    
    			System.out.println("DataKey = " + receipt.getDataKey());
    			System.out.println("ResponseCode = " + receipt.getResponseCode());
    			System.out.println("Message = " + receipt.getMessage());
    			System.out.println("TransDate = " + receipt.getTransDate());
    			System.out.println("TransTime = " + receipt.getTransTime());
    			System.out.println("Complete = " + receipt.getComplete());
    			System.out.println("TimedOut = " + receipt.getTimedOut());
    			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("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();
    		}
    	}
    }
                    
    USA Code Sample
    
    package USA;
    
    import JavaAPI.*;
    
    public class TestUSAResLookupMasked
    {
    	public static void main(String[] args)
    	{
    		String store_id = "monusqa002";
    		String api_token = "qatoken";
    		String data_key = "A7AKitqvoSmSmI3rPTz3SgbCQ";
    		String processing_country_code = "US";
    
    		ResLookupMasked resLookupMasked = new ResLookupMasked();
    		resLookupMasked.setData(data_key);
    
    		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(resLookupMasked);
    		mpgReq.send();
    
    		try
    		{
    			Receipt receipt = mpgReq.getReceipt();
    
    			System.out.println("DataKey = " + receipt.getDataKey());
    			System.out.println("ResponseCode = " + receipt.getResponseCode());
    			System.out.println("Message = " + receipt.getMessage());
    			System.out.println("TransDate = " + receipt.getTransDate());
    			System.out.println("TransTime = " + receipt.getTransTime());
    			System.out.println("Complete = " + receipt.getComplete());
    			System.out.println("TimedOut = " + receipt.getTimedOut());
    			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("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());
    			System.out.println("Presentation Type = " + receipt.getResPresentationType());
    			System.out.println("P Account Number = " + receipt.getResPAccountNumber());
    			System.out.println("Sec = " + receipt.getResSec());
    			System.out.println("Cust First Name = " + receipt.getResCustFirstName());
    			System.out.println("Cust Last Name = " + receipt.getResCustLastName());
    			System.out.println("Cust Address 1 = " + receipt.getResCustAddress1());
    			System.out.println("Cust Address 2 = " + receipt.getResCustAddress2());
    			System.out.println("Cust City = " + receipt.getResCustCity());
    			System.out.println("Cust State = " + receipt.getResCustState());
    			System.out.println("Cust Zip = " + receipt.getResCustZip());
    			System.out.println("Routing Num = " + receipt.getResRoutingNum());
    			System.out.println("Masked Account Num = " + receipt.getResMaskedAccountNum());
    			System.out.println("Check Num = " + receipt.getResCheckNum());
    			System.out.println("Account Type = " + receipt.getResAccountType());
    		}
    		catch (Exception e)
    		{
    			e.printStackTrace();
    		}
    	}
    }
                    

    Vault Look Up Masked transaction object definition

    ResLookupMasked resLookupMasked = new ResLookupMasked();

    HttpsPostRequest object for Vault Look Up Masked transaction

    HttpsPostRequest mpgReq = new HttpsPostRequest();

    mpgReq.setTransaction(resLookupMasked);

    Vault Look Up Masked transaction object mandatory values

    Value Type Limits Set method Description
    Data key String 25-character alphanumeric resLookupMasked.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.

    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.
    ACH Fields
    SEC Code 3-character alphanumeric receipt.getResSec(); Returns the ACH SEC code saved in the profile.
    Customer First Name 50-character alphanumeric receipt.getResCustFirstName(); Returns the customer first name saved in the profile.
    Customer Last Name 50-character alphanumeric receipt.getResCustLastName(); Returns the customer last name saved in the profile.
    Customer Address 1 50-character alphanumeric receipt.getResCustAddress1(); Returns the customer address line 1 saved in the profile.
    Customer Address 2 50-character alphanumeric receipt.getResCustAddress2(); Returns the customer address line 2 saved in the profile.
    Customer City 50-character alphanumeric receipt.getResCustCity(); Returns the customer city saved in the profile.
    Customer State 2-character alphanumeric receipt.getResCustState(); Returns the customer state code saved in the profile.
    Customer Zip Code 10-character numeric receipt.getResCustZip(); Returns the customer zip code saved in the profile.
    Check Routing Number 9-character numeric receipt.getResRoutingNum(); Returns the customer check routing number saved in the profile.
    Masked Account Number 15-character alphanumeric receipt.getResMaskedAccountNum(); Returns the masked first 4 last 4 of the account number saved in the profile.
    Check Number 16-character numeric receipt.getResCheckNum(); Returns the check number saved in the profile.
    Account Type savings/checking receipt.getResAccountType(); Returns the type of account 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
    Successors
    • Purchase with Vault (API | Batch)
    • Pre-Authorization with Vault (API | Batch)
    • Independent Refund with Vault (API | Batch)
    • Card Verification with Vault (API)
    • Vault Update Credit Card (API | Batch)
    • Vault Delete Credit Card (API | Batch)
    • Purchase with Vault and ACH (API | Batch)
    • Independent Refund with Vault and ACH (API | Batch)
    • Vault Update ACH (API | Batch)

    Vault Look Up Full

    Verifies what is currently saved under the Vault profile associated with the given data key. The response to this transaction returns the latest active data for that profile.

    Unlike Vault Lookup Masked (which returns the masked credit card numbers or ACH bank account number), this transaction returns both the masked and unmasked credit card number or ACH bank account number.

    Things to consider:
    • Because of the potential for fraud, permission for this transaction is not granted to all accounts by default. If it is required for your business, it must be requested via your account manager.

    Canada Code Sample
    
    package Canada;
    
    import JavaAPI.*;
    
    public class TestCanadaResLookupFull
    {
    	public static void main(String[] args)
    	{
    		String store_id = "store1";
    		String api_token = "yesguy";
    		String data_key = "pi3ZMZoTTM8pLM9wuwws2KBxw";
    		String processing_country_code = "CA";
    		boolean status_check = false;
    
    		ResLookupFull resLookupFull = new ResLookupFull(data_key);
    
    		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(resLookupFull);
    		mpgReq.setStatusCheck(status_check);
    		mpgReq.send();
    
    		try
    		{
    			Receipt receipt = mpgReq.getReceipt();
    
    			System.out.println("DataKey = " + receipt.getDataKey());
    			System.out.println("ResponseCode = " + receipt.getResponseCode());
    			System.out.println("Message = " + receipt.getMessage());
    			System.out.println("TransDate = " + receipt.getTransDate());
    			System.out.println("TransTime = " + receipt.getTransTime());
    			System.out.println("Complete = " + receipt.getComplete());
    			System.out.println("TimedOut = " + receipt.getTimedOut());
    			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("Pan = " + receipt.getResPan());
    			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();
    		}
    	}
    }
                    
    USA Code Sample
    
    package USA;
    
    import JavaAPI.*;
    
    public class TestUSAResLookupFull
    {
    	public static void main(String[] args)
    	{
    		String store_id = "monusqa002";
    		String api_token = "qatoken";
    		String data_key = "A7AKitqvoSmSmI3rPTz3SgbCQ";
    		String processing_country_code = "US";
    
    		ResLookupFull resLookupFull = new ResLookupFull();
    		resLookupFull.setData(data_key);
    
    		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(resLookupFull);
    		mpgReq.send();
    
    		try
    		{
    			Receipt receipt = mpgReq.getReceipt();
    
    			System.out.println("DataKey = " + receipt.getDataKey());
    			System.out.println("ResponseCode = " + receipt.getResponseCode());
    			System.out.println("Message = " + receipt.getMessage());
    			System.out.println("TransDate = " + receipt.getTransDate());
    			System.out.println("TransTime = " + receipt.getTransTime());
    			System.out.println("Complete = " + receipt.getComplete());
    			System.out.println("TimedOut = " + receipt.getTimedOut());
    			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("Pan = " + receipt.getResPan());
    			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());
    			System.out.println("Presentation Type = " + receipt.getResPresentationType());
    			System.out.println("P Account Number = " + receipt.getResPAccountNumber());
    			System.out.println("Sec = " + receipt.getResSec());
    			System.out.println("Cust First Name = " + receipt.getResCustFirstName());
    			System.out.println("Cust Last Name = " + receipt.getResCustLastName());
    			System.out.println("Cust Address 1 = " + receipt.getResCustAddress1());
    			System.out.println("Cust Address 2 = " + receipt.getResCustAddress2());
    			System.out.println("Cust City = " + receipt.getResCustCity());
    			System.out.println("Cust State = " + receipt.getResCustState());
    			System.out.println("Cust Zip = " + receipt.getResCustZip());
    			System.out.println("Routing Num = " + receipt.getResRoutingNum());
    			System.out.println("Account Num = " + receipt.getResAccountNum());
    			System.out.println("Masked Account Num = " + receipt.getResMaskedAccountNum());
    			System.out.println("Check Num = " + receipt.getResCheckNum());
    			System.out.println("Account Type = " + receipt.getResAccountType());
    		}
    		catch (Exception e)
    		{
    			e.printStackTrace();
    		}
    	}
    }
                    

    Vault Look Up Full transaction object definition

    ResLookupFull resLookupFull = new ResLookupFull(data_key);

    HttpsPostRequest object for Vault Look Up Full transaction

    HttpsPostRequest mpgReq = new HttpsPostRequest();

    mpgReq.setTransaction(resLookupFull);

    Vault Look Up Full transaction object mandatory values

    Value Type Limits Set method Description
    Data key String 25-character alphanumeric Not applicable (passed as argument) 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.

    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.
    ACH Fields
    SEC Code 3-character alphanumeric receipt.getResSec(); Returns the ACH SEC code saved in the profile.
    Customer First Name 50-character alphanumeric receipt.getResCustFirstName(); Returns the customer first name saved in the profile.
    Customer Last Name 50-character alphanumeric receipt.getResCustLastName(); Returns the customer last name saved in the profile.
    Customer Address 1 50-character alphanumeric receipt.getResCustAddress1(); Returns the customer address line 1 saved in the profile.
    Customer Address 2 50-character alphanumeric receipt.getResCustAddress2(); Returns the customer address line 2 saved in the profile.
    Customer City 50-character alphanumeric receipt.getResCustCity(); Returns the customer city saved in the profile.
    Customer State 2-character alphanumeric receipt.getResCustState(); Returns the customer state code saved in the profile.
    Customer Zip Code 10-character numeric receipt.getResCustZip(); Returns the customer zip code saved in the profile.
    Check Routing Number 9-character numeric receipt.getResRoutingNum(); Returns the customer check routing number saved in the profile.
    Masked Account Number 15-character alphanumeric receipt.getResMaskedAccountNum(); Returns the masked first 4 last 4 of the account number saved in the profile.
    Account Number 15-character alphanumeric receipt.getResAccountNum(); Returns the full account number saved in the profile.
    Check Number 16-character numeric receipt.getResCheckNum(); Returns the check number saved in the profile.
    Account Type savings/checking receipt.getResAccountType(); Returns the type of account 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.
    PAN 20-character numeric receipt.getResPan(); Returns the full 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
    Successors
    • Purchase with Vault (API | Batch)
    • Pre-Authorization with Vault (API | Batch)
    • Independent Refund with Vault (API | Batch)
    • Card Verification with Vault (API)
    • Vault Update Credit Card (API | Batch)
    • Vault Delete Credit Card (API | Batch)
    • Purchase with Vault and ACH (API | Batch)
    • Independent Refund with Vault and ACH (API | Batch)
    • Vault Update ACH (API | Batch)

    Vault is Corporate Card

    Determines whether a profile has a corporate card registered within it.

    After sending the transaction, the response field to the Receipt object's getCorporateCard method is either true or false depending on whether the associated card is a corporate card.

    Canada Code Sample
    
    package Canada;
    
    import JavaAPI.*;
    
    public class TestCanadaResIscorporatecard
    {
    	public static void main(String[] args)
    	{
    		String store_id = "store1";
    		String api_token = "yesguy";
    		String data_key = "eLqsADfwqHDxIpJG9vLnELx01";
    		String processing_country_code = "CA";
    		boolean status_check = false;
    
    		ResIscorporatecard resIscorporatecard = new ResIscorporatecard();
    		resIscorporatecard.setData(data_key);
    
    		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(resIscorporatecard);
    		mpgReq.setStatusCheck(status_check);
    		mpgReq.send();
    
    		try
    		{
    			Receipt receipt = mpgReq.getReceipt();
    
    			System.out.println("DataKey = " + receipt.getDataKey());
    			System.out.println("CorporateCard = " + receipt.getCorporateCard());
    			System.out.println("ResponseCode = " + receipt.getResponseCode());
    			System.out.println("Message = " + receipt.getMessage());
    			System.out.println("TransDate = " + receipt.getTransDate());
    			System.out.println("TransTime = " + receipt.getTransTime());
    			System.out.println("Complete = " + receipt.getComplete());
    			System.out.println("TimedOut = " + receipt.getTimedOut());
    			System.out.println("ResSuccess = " + receipt.getResSuccess());
    			System.out.println("PaymentType = " + receipt.getPaymentType());
    		}
    		catch (Exception e)
    		{
    			e.printStackTrace();
    		}
    	}
    }
                    
    USA Code Sample
    
    package USA;
    
    import JavaAPI.*;
    
    public class TestUSAResIscorporatecard
    {
    	public static void main(String[] args)
    	{
    		String store_id = "monusqa002";
    		String api_token = "qatoken";
    		String data_key = "6iK9Z010IkV2hzKYUCpsREEjB";
    		String processing_country_code = "US";
    		boolean status_check = false;
    
    		ResIscorporatecard resIscorporatecard = new ResIscorporatecard();
    		resIscorporatecard.setData(data_key);
    
    		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(resIscorporatecard);
    		mpgReq.setStatusCheck(status_check);
    		mpgReq.send();
    
    		try
    		{
    			Receipt receipt = mpgReq.getReceipt();
    
    			System.out.println("DataKey = " + receipt.getDataKey());
    			System.out.println("CorporateCard = " + receipt.getCorporateCard());
    			System.out.println("ResponseCode = " + receipt.getResponseCode());
    			System.out.println("Message = " + receipt.getMessage());
    			System.out.println("TransDate = " + receipt.getTransDate());
    			System.out.println("TransTime = " + receipt.getTransTime());
    			System.out.println("Complete = " + receipt.getComplete());
    			System.out.println("TimedOut = " + receipt.getTimedOut());
    			System.out.println("ResSuccess = " + receipt.getResSuccess());
    			System.out.println("PaymentType = " + receipt.getPaymentType());
    		}
    		catch (Exception e)
    		{
    			e.printStackTrace();
    		}
    	}
    }
                    

    Vault is Corporate Card transaction object definition

    ResIscorporatecard resIscorporatecard = new ResIscorporatecard();

    HttpsPostRequest object for Vault is Corporate Card transaction

    HttpsPostRequest mpgReq = new HttpsPostRequest();

    mpgReq.setTransaction(ResIscorporateCard);

    Vault is Corporate Card transaction object mandatory values

    Value Type Limits Set method Description
    Data key String 25-character alphanumeric resIscorporatecard.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.

    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
    Successors
    • Purchase with Vault (API | Batch)
    • Pre-Authorization with Vault (API | Batch)
    • Independent Refund with Vault (API | Batch)
    • Card Verification with Vault (API)

    Vault Get Expiring

    Verifies which profiles have credit cards that are expiring during the current and next calendar month. For example, if you are processing this transaction on September 30, then it will return all cards that expire(d) in September and October of this year.

    When generating a list of profiles with expiring credit cards, only the masked credit card numbers are returned.

    This transaction can be performed no more than 2 times on any given calendar day, and it only applies to credit card profiles.

    Canada Code Sample
    
    package Canada;
    
    import JavaAPI.*;
    
    public class TestCanadaResGetExpiring
    {
    	public static void main(String[] args)
    	{
    		String store_id = "store1";
    		String api_token = "yesguy";
    		String processing_country_code = "CA";
    		boolean status_check = false;
    
    		ResGetExpiring resGetExpiring = new ResGetExpiring();
    
    		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(resGetExpiring);
    		mpgReq.setStatusCheck(status_check);
    		mpgReq.send();
    
    		try
    		{
    			Receipt receipt = mpgReq.getReceipt();
    
    			System.out.println("DataKey = " + receipt.getDataKey());
    			System.out.println("ResponseCode = " + receipt.getResponseCode());
    			System.out.println("Message = " + receipt.getMessage());
    			System.out.println("TransDate = " + receipt.getTransDate());
    			System.out.println("TransTime = " + receipt.getTransTime());
    			System.out.println("Complete = " + receipt.getComplete());
    			System.out.println("TimedOut = " + receipt.getTimedOut());
    			System.out.println("ResSuccess = " + receipt.getResSuccess());
    			System.out.println("PaymentType = " + receipt.getPaymentType());
    
    			//ResolveData
    			for (int index =0; index < receipt.getExpiredCardCount(); index++)
    			{
    				System.out.println("\nDataKey = " + index);
    				System.out.println("Payment Type = " + receipt.getExpPaymentType(index));
    				System.out.println("Cust ID = " + receipt.getExpCustId(index));
    				System.out.println("Phone = " + receipt.getExpPhone(index));
    				System.out.println("Email = " + receipt.getExpEmail(index));
    				System.out.println("Note = " + receipt.getExpNote(index));
    				System.out.println("Masked Pan = " + receipt.getExpMaskedPan(index));
    				System.out.println("Exp Date = " + receipt.getExpExpdate(index));
    				System.out.println("Crypt Type = " + receipt.getExpCryptType(index));
    				System.out.println("Avs Street Number = " + receipt.getExpAvsStreetNumber(index));
    				System.out.println("Avs Street Name = " + receipt.getExpAvsStreetName(index));
    				System.out.println("Avs Zipcode = " + receipt.getExpAvsZipCode(index));
    			}
    		}
    		catch (Exception e)
    		{
    			e.printStackTrace();
    		}
    	}
    }
                    
    USA Code Sample
    
    package USA;
    
    import JavaAPI.*;
    
    public class TestUSAResGetExpiring
    {
    	public static void main(String[] args)
    	{
    		String store_id = "monusqa002";
    		String api_token = "qatoken";
    		String processing_country_code = "US";
    
    		ResGetExpiring resGetExpiring = new ResGetExpiring();
    
    		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(resGetExpiring);
    		mpgReq.send();
    
    		try
    		{
    			Receipt receipt = mpgReq.getReceipt();
    
    			System.out.println("DataKey = " + receipt.getDataKey());
    			System.out.println("ResponseCode = " + receipt.getResponseCode());
    			System.out.println("Message = " + receipt.getMessage());
    			System.out.println("TransDate = " + receipt.getTransDate());
    			System.out.println("TransTime = " + receipt.getTransTime());
    			System.out.println("Complete = " + receipt.getComplete());
    			System.out.println("TimedOut = " + receipt.getTimedOut());
    			System.out.println("ResSuccess = " + receipt.getResSuccess());
    			System.out.println("PaymentType = " + receipt.getPaymentType());
    
    			//ResolveData
    			for (int index = 0; index < receipt.getExpiredCardCount(); index++)
    			{
    				System.out.println("\nDataKey = " + index);
    				System.out.println("Payment Type = " + receipt.getExpPaymentType(index));
    				System.out.println("Cust ID = " + receipt.getExpCustId(index));
    				System.out.println("Phone = " + receipt.getExpPhone(index));
    				System.out.println("Email = " + receipt.getExpEmail(index));
    				System.out.println("Note = " + receipt.getExpNote(index));
    				System.out.println("Masked Pan = " + receipt.getExpMaskedPan(index));
    				System.out.println("Exp Date = " + receipt.getExpExpdate(index));
    				System.out.println("Crypt Type = " + receipt.getExpCryptType(index));
    				System.out.println("Avs Street Number = " + receipt.getExpAvsStreetNumber(index));
    				System.out.println("Avs Street Name = " + receipt.getExpAvsStreetName(index));
    				System.out.println("Avs Zipcode = " + receipt.getExpAvsZipCode(index));
    				System.out.println("Presentation Type = " + receipt.getExpPresentationType(index));
    				System.out.println("P Account Number = " + receipt.getExpPAccountNumber(index));
    			}
    		}
    		catch (Exception e)
    		{
    			e.printStackTrace();
    		}
    	}
    }
                    

    Vault Get Expiring transaction object definition

    ResGetExpiring resGetExpiring = new ResGetExpiring();

    HttpsPostRequest object for Vault Get Expiring transaction

    HttpsPostRequest mpgReq = new HttpsPostRequest();

    mpgReq.setTransaction(resGetExpiring);

    Vault Response Fields

    Value Limits Get Method Description
    Data Key Array
    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.
    Expiring card's payment type cc receipt.getExpPaymentType(); Indicates the payment type associated with a Vault profile.
    Expiring card's Customer ID 30-character alphanumeric receipt.getExpCustId(); Returns the customer ID saved in the profile.
    Expiring card's Phone Number 30-character alphanumeric receipt.getExpPhone(); Returns the phone number saved in the profile.
    Expiring card's Email Address 30-character alphanumeric receipt.getExpEmail(); Returns the email address saved in the profile.
    Expiring card's Note 30-character alphanumeric receipt.getExpNote(); Returns the note saved in the profile.
    Credit Card Fields
    Expiring card's Masked PAN 20-character numeric receipt.getExpMaskedPan(); Returns the first 4 last 4 of the card number saved in the profile.
    Expiring card's Expiry Date 4-character numeric receipt.getExpExpdate(); Returns the expiry date of the card number saved in the profile. YYMM format.
    Expiring card's E-Commerce Indicator 1-character numeric receipt.getExpCryptType(); Returns the e-commerce indicator saved in the profile.
    Expiring card's AVS Street Number 19-character alphanumeric receipt.getExpAvsStreetNumber(); 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.
    Expiring card's AVS Street Name 19-character alphanumeric receipt.getExpAvsStreetName(); 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.
    Expiring card's AVS Zip/Postal Code 9-character alphanumeric receipt.getExpAvsZipcode(); 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
    Successors
    • Purchase with Vault (API | Batch)
    • Pre-Authorization with Vault (API | Batch)
    • Independent Refund with Vault (API | Batch)
    • Card Verification with Vault (API)
    • Vault Update Credit Card (API | Batch)
    • Vault Delete Credit Card (API | Batch)

    Vault Add Token

    Converts a Hosted Tokenization temporary token to a permanent Vault token.

    A temporary token is valid for 15 minutes after it is created. This transaction must be performed within that timeframe if the token is to be changed to a permanent one for future use.

    Canada Code Sample
    
    package Canada;
    
    import JavaAPI.*;
    
    public class TestCanadaResAddToken
    {
    	public static void main(String[] args)
    	{
    		String store_id = "moneris";
    		String api_token = "hurgle";
    		String data_key = "ot-IPFUqKokKWYzLN0zmzAhNYSCs";
    		String expdate = "0115";
    		String phone = "0000000000";
    		String email = "bob@smith.com";
    		String note = "my note";
    		String cust_id = "customer1";
    		String crypt_type = "7";
    		String processing_country_code = "CA";
    		boolean status_check = false;
    
    
    		AvsInfo avsCheck = new AvsInfo();
    		avsCheck.setAvsStreetNumber("212");
    		avsCheck.setAvsStreetName("Payton Street");
    		avsCheck.setAvsZipCode("M1M1M1");
    
    		ResAddToken resAddToken = new ResAddToken();
    		resAddToken.setDataKey(data_key);
    		resAddToken.setCryptType(crypt_type);
    		resAddToken.setExpdate(expdate);
    		resAddToken.setCustId(cust_id);
    		resAddToken.setPhone(phone);
    		resAddToken.setEmail(email);
    		resAddToken.setNote(note);
    		resAddToken.setAvsInfo(avsCheck);
    
    		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(resAddToken);
    		mpgReq.setStatusCheck(status_check);
    		mpgReq.send();
    
    		try
    		{
    			Receipt receipt = mpgReq.getReceipt();
    
    			System.out.println("DataKey = " + receipt.getDataKey());
    			System.out.println("ResponseCode = " + receipt.getResponseCode());
    			System.out.println("Message = " + receipt.getMessage());
    			System.out.println("TransDate = " + receipt.getTransDate());
    			System.out.println("TransTime = " + receipt.getTransTime());
    			System.out.println("Complete = " + receipt.getComplete());
    			System.out.println("TimedOut = " + receipt.getTimedOut());
    			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("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();
    		}
    	}
    }
                    
    USA Code Sample
    
    package USA;
    
    import JavaAPI.*;
    
    public class TestUSAResAddToken
    {
    	public static void main(String[] args)
    	{
    		String store_id = "monusqa002";
    		String api_token = "qatoken";
    		String data_key = "ot-jI3S4L4BeW7RsO7XsRVli9OSQ";
    		String phone = "0000000000";
    		String email = "bob@smith.com";
    		String note = "my note";
    		String cust_id = "customer1";
    		String crypt_type = "7";
    		String processing_country_code = "US";
    
    		AvsInfo avsCheck = new AvsInfo();
    		avsCheck.setAvsStreetNumber("212");
    		avsCheck.setAvsStreetName("Payton Street");
    		avsCheck.setAvsZipCode("M1M1M1");
    
    		ResAddToken resAddToken = new ResAddToken();
    		resAddToken.setCustId(cust_id);
    		resAddToken.setPhone(phone);
    		resAddToken.setEmail(email);
    		resAddToken.setNote(note);
    		resAddToken.setAvsInfo(avsCheck);
    		resAddToken.setData(data_key);
    		resAddToken.setCryptType(crypt_type);
    
    		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(resAddToken);
    		mpgReq.send();
    
    		try
    		{
    			Receipt receipt = mpgReq.getReceipt();
    
    			System.out.println("DataKey = " + receipt.getDataKey());
    			System.out.println("ResponseCode = " + receipt.getResponseCode());
    			System.out.println("Message = " + receipt.getMessage());
    			System.out.println("TransDate = " + receipt.getTransDate());
    			System.out.println("TransTime = " + receipt.getTransTime());
    			System.out.println("Complete = " + receipt.getComplete());
    			System.out.println("TimedOut = " + receipt.getTimedOut());
    			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("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();
    		}
    	}
    }
                    

    Vault Add Token object

    ResAddToken resAddToken = new ResAddToken();

    HttpsPostRequest object for Vault Add Token transaction

    HttpsPostRequest mpgReq = new HttpsPostRequest();

    mpgReq.setTransaction(resAddToken);

    Vault Add Token transaction object mandatory values

    Value Type Limits Set method Description
    Data key String 25-character alphanumeric resAddToken.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.
    E-commerce indicator String 1-character alphanumeric resAddToken.setCryptType(crypt_type); 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

    Vault Add Token transaction object conditional values

    VALUE TYPE LIMITS SET METHOD DESCRIPTION
    Expiry date String 4-character alphanumeric (YYMM format) resAddToken.setExpdate(expdate); Note: This is the reverse of the date displayed on the physical card, which is MMYY. If Hosted Tokenization solution already collected the expiry date, then this is optional.  If it did not, then this is mandatory.
     

    Vault Add Token transaction object optional values

    Value Type Limits Set method Description
    Customer ID String 50-character alphanumeric resAddToken.setCustId(cust_id); This can be used for policy number, membership number, student ID, invoice number and so on.

    This field is searchable from the Moneris Merchant Resource Centre.
    AVS information Object AvsInfo avsCheck = new AvsInfo();
    resAddToken.setAvsInfo(avsCheck);
    Refer below for further breakdown and definition.
    Email address String 30-character alphanumeric resAddToken.setEmail(email); Email address of the customer. Can be sent in when creating or updating a Vault profile.
    Phone number String 30-character alphanumeric resAddToken.setPhone(phone); Phone number of the customer. Can be sent in when creating or updating a Vault profile.
    Note String 30-character alphanumeric resAddToken.setNote(note); This optional field can be used for supplementary information to be sent in with the transaction. This field can be sent in when creating or updating a Vault profile.

    AvsInfo mandatory values

    VALUE TYPE LIMITS VARIABLE DESCRIPTION
    AVS street number String 19-character alphanumeric1 avs_street_number Cardholder street number.
    AVS street name String See AVS street number avs_street_name Cardholder street name.
    AVS zip/postal code String 9-character alphanumeric avs_zipcode Cardholder zip/postal code

    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
    • Hosted Tokenization into a permanent token
    • Vault Temporary Token Add (API)
    Successors
    • Purchase with Vault (API | Batch)
    • Pre-Authorization with Vault (API | Batch)
    • Independent Refund with Vault (API | Batch)
    • Card Verification with Vault (API)
    • Vault Update Credit Card (API | Batch)
    • Vault Look Up Full (API)
    • Vault Look Up Masked (API)
    • Vault Delete Credit Card (API | Batch)

    Vault Temporary Token Add

    Creates a new temporary token credit card profile. This transaction requires a duration to be set to indicate how long the temporary token is to be stored for. This is the API version of Hosted Tokenization.

    During the lifetime of this temporary token, it may be used for any other vault transaction before it is permanently deleted from the system.

    Things to consider:

    • The duration, or lifetime, of the temporary token can be set to be a maximum of 15 minutes.

    Canada Code Sample
    
    package Canada;
    
    import JavaAPI.*;
    
    public class TestCanadaResTempAdd
    {
    	public static void main(String[] args)
    	{
    		String store_id = "store1";
    		String api_token = "yesguy";
    		String pan = "5454545454545454";
    		String expdate = "1901"; //YYMM format
    		String crypt_type = "7";
    		String duration = "900";
    		String processing_country_code = "CA";
    		boolean status_check = false;
    
    		ResTempAdd resTempAdd = new ResTempAdd();
    		resTempAdd.setPan(pan);
    		resTempAdd.setExpdate(expdate);
    		resTempAdd.setDuration(duration);
    		resTempAdd.setCryptType(crypt_type);
    
    		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(resTempAdd);
    		mpgReq.setStatusCheck(status_check);
    		mpgReq.send();
    
    		try
    		{
    			Receipt receipt = mpgReq.getReceipt();
    
    			System.out.println("DataKey = " + receipt.getDataKey());
    			System.out.println("ResponseCode = " + receipt.getResponseCode());
    			System.out.println("Message = " + receipt.getMessage());
    			System.out.println("TransDate = " + receipt.getTransDate());
    			System.out.println("TransTime = " + receipt.getTransTime());
    			System.out.println("Complete = " + receipt.getComplete());
    			System.out.println("TimedOut = " + receipt.getTimedOut());
    			System.out.println("ResSuccess = " + receipt.getResSuccess());
    			System.out.println("PaymentType = " + receipt.getPaymentType());
    			System.out.println("MaskedPan = " + receipt.getResMaskedPan());
    			System.out.println("Exp Date = " + receipt.getResExpdate());
    		}
    		catch (Exception e)
    		{
    			e.printStackTrace();
    		}
    	}
    }
                    
    USA Code Sample
    
    package USA;
    
    import JavaAPI.*;
    
    public class TestUSAResTempAdd
    {
    	public static void main(String[] args)
    	{
    		String store_id = "monusqa002";
    		String api_token = "qatoken";
    		String pan = "5454545454545454";
    		String expdate = "1902";        //YYMM format
    		String crypt_type = "7";
    		String duration = "900";
    		String processing_country_code = "US";
    		boolean status_check = false;
    
    		ResTempAdd resTempAdd = new ResTempAdd();
    		resTempAdd.setPan(pan);
    		resTempAdd.setExpdate(expdate);
    		resTempAdd.setDuration(duration);
    		resTempAdd.setCryptType(crypt_type);
    
    		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(resTempAdd);
    		mpgReq.setStatusCheck(status_check);
    		mpgReq.send();
    
    		try
    		{
    			Receipt receipt = mpgReq.getReceipt();
    
    			System.out.println("DataKey = " + receipt.getDataKey());
    			System.out.println("ResponseCode = " + receipt.getResponseCode());
    			System.out.println("Message = " + receipt.getMessage());
    			System.out.println("TransDate = " + receipt.getTransDate());
    			System.out.println("TransTime = " + receipt.getTransTime());
    			System.out.println("Complete = " + receipt.getComplete());
    			System.out.println("TimedOut = " + receipt.getTimedOut());
    			System.out.println("ResSuccess = " + receipt.getResSuccess());
    			System.out.println("PaymentType = " + receipt.getPaymentType());
    			System.out.println("MaskedPan = " + receipt.getResMaskedPan());
    			System.out.println("Exp Date = " + receipt.getResExpdate());
    		}
    		catch (Exception e)
    		{
    			e.printStackTrace();
    		}
    	}
    }
                    

    Vault Temporary Token Add object

    ResTempAdd resTempAdd = new ResTempAdd();

    HttpsPostRequest object for Vault Temporary Token Add transaction

    HttpsPostRequest mpgReq = new HttpsPostRequest();

    mpgReq.setTransaction(resTempAdd);

    Vault Temporary Token Add transaction object mandatory values

    Value Type Limits Set method Description
    Credit card number String 20-character alphanumeric resTempAdd.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 resTempAdd.setExpdate(expdate); Submit in YYMM format.
    Note: This is the reverse of the date displayed on the physical card, which is MMYY.
    Duration String TBD resTempAdd.setDuration(duration); TBD
    E-commerce indicator String 1-character alphanumeric resTempAdd.setCryptType(crypt_type); 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

    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 receipt.getPaymentType(); Indicates the payment type associated with a Vault 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.

    Predecessors
    • Integrator can create a temp token
    Successors
    • Purchase with Vault (API | Batch)
    • Pre-Authorization with Vault (API | Batch)
    • Card Verification with Vault (API)
    • Vault Add Token (API)