My Profile_


Independent Refund

Credits a specified amount to the cardholder’s credit card. The credit card number and expiry date are mandatory.

It is not necessary for the transaction that you are refunding to have been processed via the Moneris Payment Gateway.

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 TestCanadaIndependentRefund
{
	public static void main(String[] args)
	{
		java.util.Date createDate = new java.util.Date(); 
		String order_id = "Test"+createDate.getTime();
		String store_id = "store5";
		String api_token = "yesguy";
		String cust_id = "my customer id";
		String amount = "20.00";
		String pan = "4242424242424242";
		String expdate = "1901"; //YYMM
		String crypt = "7";
		String processing_country_code = "CA";
		boolean status_check = false;

		IndependentRefund indrefund = new IndependentRefund();
		indrefund.setOrderId(order_id);
		indrefund.setCustId(cust_id);
		indrefund.setAmount(amount);
		indrefund.setPan(pan);
		indrefund.setExpdate(expdate);
		indrefund.setCryptType(crypt);
		indrefund.setDynamicDescriptor("123456");

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

		try
		{
			Receipt receipt = mpgReq.getReceipt();

			System.out.println("CardType = " + receipt.getCardType());
			System.out.println("TransAmount = " + receipt.getTransAmount());
			System.out.println("TxnNumber = " + receipt.getTxnNumber());
			System.out.println("ReceiptId = " + receipt.getReceiptId());
			System.out.println("TransType = " + receipt.getTransType());
			System.out.println("ReferenceNum = " + receipt.getReferenceNum());
			System.out.println("ResponseCode = " + receipt.getResponseCode());
			System.out.println("ISO = " + receipt.getISO());
			System.out.println("BankTotals = " + receipt.getBankTotals());
			System.out.println("Message = " + receipt.getMessage());
			System.out.println("AuthCode = " + receipt.getAuthCode());
			System.out.println("Complete = " + receipt.getComplete());
			System.out.println("TransDate = " + receipt.getTransDate());
			System.out.println("TransTime = " + receipt.getTransTime());
			System.out.println("Ticket = " + receipt.getTicket());
			System.out.println("TimedOut = " + receipt.getTimedOut());
			System.out.println("IsVisaDebit = " + receipt.getIsVisaDebit());
		}
		catch (Exception e)
		{
			e.printStackTrace();
		}
	}
}

                
USA Code Sample

package USA;

import JavaAPI.*;

public class TestUSAIndependentRefund
{
	public static void main(String[] args)
	{
		java.util.Date createDate = new java.util.Date();
		String order_id = "Test"+createDate.getTime();
		String store_id = "monusqa002";
		String api_token = "qatoken";
		String cust_id = "my customer id";
		String amount = "20.00";
		String pan = "4242424242424242";
		String expdate = "1602";        //YYMM format
		String crypt = "7";
		String commcard_invoice = "INVC090";
		String commcard_tax_amount = "1.00";
		String processing_country_code = "US";
		boolean status_check = false;

		IndependentRefund indrefund = new IndependentRefund();
		indrefund.setOrderId(order_id);
		indrefund.setCustId(cust_id);
		indrefund.setAmount(amount);
		indrefund.setPan(pan);
		indrefund.setExpdate(expdate);
		indrefund.setCryptType(crypt);
		indrefund.setCommcardInvoice(commcard_invoice);
		indrefund.setCommcardTaxAmount(commcard_tax_amount);
		indrefund.setDynamicDescriptor("123456");

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

		try
		{
			Receipt receipt = mpgReq.getReceipt();

			System.out.println("CardType = " + receipt.getCardType());
			System.out.println("TransAmount = " + receipt.getTransAmount());
			System.out.println("TxnNumber = " + receipt.getTxnNumber());
			System.out.println("ReceiptId = " + receipt.getReceiptId());
			System.out.println("TransType = " + receipt.getTransType());
			System.out.println("ReferenceNum = " + receipt.getReferenceNum());
			System.out.println("ResponseCode = " + receipt.getResponseCode());
			System.out.println("ISO = " + receipt.getISO());
			System.out.println("BankTotals = " + receipt.getBankTotals());
			System.out.println("Message = " + receipt.getMessage());
			System.out.println("AuthCode = " + receipt.getAuthCode());
			System.out.println("Complete = " + receipt.getComplete());
			System.out.println("TransDate = " + receipt.getTransDate());
			System.out.println("TransTime = " + receipt.getTransTime());
			System.out.println("Ticket = " + receipt.getTicket());
			System.out.println("TimedOut = " + receipt.getTimedOut());
			System.out.println("IsVisaDebit = " + receipt.getIsVisaDebit());
		}
		catch (Exception e)
		{
			e.printStackTrace();
		}
	}
}

                

Independent Refund transaction object definition

IndependentRefund indrefund = new IndependentRefund();

HttpsPostRequest object for Independent Refund transaction

HttpsPostRequest mpgReq = new HttpsPostRequest();

mpgReq.setTransaction(indrefund);

Independent Refund transaction object mandatory values

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

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

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

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

If the order ID has fewer than 3 characters, it may display a blank or 0000000000 in the Invoice Number field.
Amount String 9-character decimal indrefund.setAmount(amount); Transaction amount. Used in a number of transactions. Note that this is different from the amount used in a Completion transaction, which is an alphanumeric value.

This must contain at least 3 digits, two of which are penny values.

The minimum allowable value is $0.01, and the maximum allowable value is 999 999.99. Transaction amounts of $0.00 are not allowed.
Credit card number String 20-character alphanumeric indrefund.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.
indrefund.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 indrefund.setCryptType(crypt); 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

Independent Refund transaction object optional values

Value Type Limits Set method Description
Customer ID String 50-character alphanumeric indrefund.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.
Dynamic Descriptor String 20-character alphanumeric indrefund.setDynamicDescriptor("123456"); Merchant-defined description sent on a per-transaction basis that will appear on the credit card statement appended to the merchant’s business name.
Status Check Boolean true/false mpgReq.setStatusCheck(status_check); Status Check is a connection object value that allows merchants to verify whether a previously sent transaction was processed successfully. To submit a Status Check request, resend the original transaction with all the same parameter values, but set the status check value to either true or false. Once set to “true”, the gateway will check the status of a transaction that has an order_id that matches the one passed.
  • If the transaction is found, the gateway will respond with the specifics of that transaction.
  • If the transaction is not found, the gateway will respond with a not found message.
  • Once it is set to “false”, the transaction will process as a new transaction.
Things to consider:
  • The Status Check request should only be used once and immediately (within 2 minutes) after the last transaction that had failed.
  • Do not resend the Status Check request if it has timed out. Additional investigation is required.
Commercial card invoice String 17-character alphanumeric indrefund.setCommcardInvoice(commcard_invoice); Available to US integrations only. Level 2 Invoice Number for the transaction used for Corporate Credit Card transactions (Commercial Purchasing Cards). Characters allowed for commcard_invoice: a-z A-Z 0-9 spaces
Commercial card tax amount String 9-character decimal.
Must contain at least 3 digits, two of which must be penny values.
indrefund.setCommcardTaxAmount(commcard_tax_amount); Available to US integrations only. Level 2 Tax Amount of the transaction used for Corporate Credit Card transactions (Commercial Purchasing Cards). This must contain 3 digits with two penny values. The minimum value passed can be 0.00 and the maximum is 9999999.99

Predecessors
  • Transaction that was completed on an independent system
Successors
  • Vault Tokenize Credit card (API)

Independent Refund with Vault Credit Card

This transaction uses the data key to identify a previously registered credit card profile. The details saved within the profile are then submitted to perform an Independent Refund transaction.

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

Canada Code Sample

package Canada;

import JavaAPI.*;

public class TestCanadaResIndRefundCC
{
	public static void main(String[] args)
	{
		java.util.Date createDate = new java.util.Date(); 
		String order_id = "Test"+createDate.getTime();   
		String store_id = "moneris";
		String api_token = "hurgle";
		String data_key = "eRNr6lU1RD6jmgS9OPqmmbVrk";
		String amount = "1.00";
		String cust_id = "customer1";
		String crypt_type = "1";
		String processing_country_code = "CA";
		boolean status_check = false;

		ResIndRefundCC resIndRefundCC = new ResIndRefundCC();
		resIndRefundCC.setOrderId(order_id);
		resIndRefundCC.setCustId(cust_id);
		resIndRefundCC.setAmount(amount);
		resIndRefundCC.setCryptType(crypt_type);
		resIndRefundCC.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(resIndRefundCC);
		mpgReq.setStatusCheck(status_check);
		mpgReq.send();

		try
		{
			Receipt receipt = mpgReq.getReceipt();

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

                
USA Code Sample

package USA;

import JavaAPI.*;

public class TestUSAResIndRefundCC
{
	public static void main(String[] args)
	{
		java.util.Date createDate = new java.util.Date();
		String order_id = "Test"+createDate.getTime();
		String store_id = "monusqa002";
		String api_token = "qatoken";
		String data_key = "yhJ7kVwUDwhZRS7dwaB98ETMm";
		String amount = "1.00";
		String cust_id = "customer1";
		String crypt_type = "1";
		String dynamic_descriptor = "123456";
		String processing_country_code = "US";

		ResIndRefundCC resIndRefundCC = new ResIndRefundCC();
		resIndRefundCC.setOrderId(order_id);
		resIndRefundCC.setCustId(cust_id);
		resIndRefundCC.setAmount(amount);
		resIndRefundCC.setCryptType(crypt_type);
		resIndRefundCC.setData(data_key);
		resIndRefundCC.setDynamicDescriptor(dynamic_descriptor);

		HttpsPostRequest mpgReq = new HttpsPostRequest();
		mpgReq.setProcCountryCode(processing_country_code);
		mpgReq.setTestMode(true); //false or comment out this line for production transactions
		mpgReq.setStoreId(store_id);
		mpgReq.setApiToken(api_token);
		mpgReq.setTransaction(resIndRefundCC);
		mpgReq.send();

		try
		{
			Receipt receipt = mpgReq.getReceipt();

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

                

ResIndRefundCC transaction object definition

ResIndRefundCC resIndRefundCC = new ResIndRefundCC();

HttpsPostRequest object for ResIndRefundCC transaction

HttpsPostRequest mpgReq = new HttpsPostRequest();

mpgReq.setTransaction(resIndRefundCC);

ResIndRefundCC transaction object mandatory values

Value Type Limits Set method Description
Data key String 25-character alphanumeric resIndRefundCC.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.
Order ID String 50-character alphanumeric resIndRefundCC.setOrderId(order_id); test Merchant-defined transaction identifier that must be unique for every Purchase, Pre-Authorization and Independent Refund transaction. No two transactions of these types may have the same order ID.

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

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

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

If the order ID has fewer than 3 characters, it may display a blank or 0000000000 in the Invoice Number field.
Amount String 9-character decimal resIndRefundCC.setAmount(amount); Transaction amount. Used in a number of transactions. Note that this is different from the amount used in a Completion transaction, which is an alphanumeric value.

This must contain at least 3 digits, two of which are penny values.

The minimum allowable value is $0.01, and the maximum allowable value is 999 999.99. Transaction amounts of $0.00 are not allowed.
E-Commerce indicator String 1-character alphanumeric resIndRefundCC.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

Independent Refund with Vault Credit Card transaction object optional values

Value Type Limits Set method Description
Customer ID String 50-character alphanumeric resIndRefundCC.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.
Status Check Boolean true/false mpgReq.setStatusCheck(status_check); Status Check is a connection object value that allows merchants to verify whether a previously sent transaction was processed successfully. To submit a Status Check request, resend the original transaction with all the same parameter values, but set the status check value to either true or false. Once set to “true”, the gateway will check the status of a transaction that has an order_id that matches the one passed.
  • If the transaction is found, the gateway will respond with the specifics of that transaction.
  • If the transaction is not found, the gateway will respond with a not found message.
  • Once it is set to “false”, the transaction will process as a new transaction.
Things to consider:
  • The Status Check request should only be used once and immediately (within 2 minutes) after the last transaction that had failed.
  • Do not resend the Status Check request if it has timed out. Additional investigation is required.
Dynamic Descriptor String 20-character alphanumeric resIndRefundCC.setDynamicDescriptor("2134565"); Merchant-defined description sent on a per-transaction basis that will appear on the credit card statement appended to the merchant’s business name.

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
  • Transaction that was completed on an idependent system
  • Vault Add Credit Card (API | Batch | Hosted Vault)
  • Vault Tokenize Credit Card (API)
  • Vault Add Token (API)
  • Vault Temporary Token Add (API)
Successors

Independent Refund with Vault and ACH

This transaction uses the data key to identify a previously registered ACH profile. The details saved within the profile are then submitted to perform the transaction.

This transaction is processed as an ACH Credit. The ACH Info registered for this profile will be used. The details submitted within ACHInfo object are returned in the response.

ACH transactions are available to US integrations only.

USA Code Sample

package USA;

import JavaAPI.*;

public class TestUSAResIndRefundAch
{
	public static void main(String[] args)
	{
		java.util.Date createDate = new java.util.Date(); 
		String order_id = "Test"+createDate.getTime(); 
		String store_id = "monusqa002";
		String api_token = "qatoken";
		String data_key = "hYa5CcGERZkfzzWReCAlXzB0e";
		String amount = "1.00";
		String cust_id = "customer1";
		String processing_country_code = "US";

		ResIndRefundAch resIndRefundAch = new ResIndRefundAch();
		resIndRefundAch.setOrderId(order_id);
		resIndRefundAch.setCustId(cust_id);
		resIndRefundAch.setAmount(amount);
		resIndRefundAch.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(resIndRefundAch);
		mpgReq.send();

		try
		{
			Receipt receipt = mpgReq.getReceipt();

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

                

Independent Refund with Vault and ACH transaction object definition

ResIndRefundAch resIndRefundAch = new ResIndRefundAch();

HttpsPostRequest mpgReq = new HttpsPostRequest();

mpgReq.setTransaction(resIndRefundAch);

Independent Refund with Vault and ACH transaction mandatory values

Value Type Limits Set method Description
Data key String 25-character alphanumeric resIndRefundAch.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.
Order ID String 50-character alphanumeric resIndRefundAch.setOrderId(order_id); Merchant-defined transaction identifier that must be unique for every ACH debit and credit transaction. No two transactions of these types may have the same order ID.
For ACH Reversal transactions, the order ID must be the same as that of the original transaction.
Amount String 9-character decimal resIndRefundAch.setAmount(amount); Transaction amount. Used in a number of transactions. Note that this is different from the amount used in a Completion transaction, which is an alphanumeric value.

This must contain at least 3 digits, two of which are penny values.

The minimum allowable value is $0.01, and the maximum allowable value is 999 999.99. Transaction amounts of $0.00 are not allowed.

Independent Refund with Vault and ACH transaction optional values

Value Type Limits Set method Description
Customer ID String 50-character alphanumeric resIndRefundAch.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.
Status Check Boolean true/false mpgReq.setStatusCheck(status_check); Status Check is a connection object value that allows merchants to verify whether a previously sent transaction was processed successfully. To submit a Status Check request, resend the original transaction with all the same parameter values, but set the status check value to either true or false. Once set to “true”, the gateway will check the status of a transaction that has an order_id that matches the one passed.
  • If the transaction is found, the gateway will respond with the specifics of that transaction.
  • If the transaction is not found, the gateway will respond with a not found message.
  • Once it is set to “false”, the transaction will process as a new transaction.
Things to consider:
  • The Status Check request should only be used once and immediately (within 2 minutes) after the last transaction that had failed.
  • Do not resend the Status Check request if it has timed out. Additional investigation is required.

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
  • Transaction that was completed on an independent system
  • Vault Add ACH (API | Batch | Hosted Vault)
Successors