My Profile_


MCP Independent Refund with Vault

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

This transaction request is the multi-currency pricing (MCP) enabled version of the equivalent financial transaction.

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.

MCP Independent Refund with Vault transaction object definition

MCPResIndRefundCC mcpResIndRefundCC = new MCPResIndRefundCC();

HttpsPostRequest object for MCP Independent Refund with Vault transaction

HttpsPostRequest mpgReq = new HttpsPostRequest();

mpgReq.setTransaction(mcpResIndRefundCC);

Canada Code Sample

package Canada;

import JavaAPI.*;

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

		MCPResIndRefundCC mcpResIndRefundCC = new MCPResIndRefundCC();
		mcpResIndRefundCC.setDataKey(data_key);
		mcpResIndRefundCC.setOrderId(order_id);
		mcpResIndRefundCC.setCustId(cust_id);
		mcpResIndRefundCC.setAmount(amount);
		mcpResIndRefundCC.setCryptType(crypt_type);
		
		//MCP Fields
		mcpResIndRefundCC.setMCPVersion("1.0");
		mcpResIndRefundCC.setCardholderAmount("500");
		mcpResIndRefundCC.setCardholderCurrencyCode("840");
		mcpResIndRefundCC.setMCPRateToken("R1538679861330690");

		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(mcpResIndRefundCC);
		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());
						
			System.out.println("MerchantSettlementAmount = " + receipt.getMerchantSettlementAmount());
			System.out.println("CardholderAmount = " + receipt.getCardholderAmount());
			System.out.println("CardholderCurrencyCode = " + receipt.getCardholderCurrencyCode());
			System.out.println("MCPRate = " + receipt.getMCPRate());
			System.out.println("MCPErrorStatusCode = " + receipt.getMCPErrorStatusCode());
			System.out.println("MCPErrorMessage = " + receipt.getMCPErrorMessage());
			System.out.println("HostId = " + receipt.getHostId());	
		}
		catch (Exception e)
		{
			e.printStackTrace();
		}
	}
}
                

Core connection object fields (all API transactions)

Variable Name Type and Limits Set Method Description
store ID

String

N/A

mpgReq.setStoreId(store_id); Unique identifier provided by Moneris upon merchant account set up.
API token

String

N/A

mpgReq.setApiToken(api_token);

Unique alphanumeric string assigned upon merchant account activation

To find your API token, refer to your test or production store’s Admin settings in the Merchant Resource Center, at the following URLs:

MCP Purchase with Vault transaction request fields – Required

Variable Name Type and Limits Set Method Description
data key

String

25-character alphanumeric

mcpResIndRefundCC.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 a-Z A-Z 0-9 _ - : . @ spaces

mcpResIndRefundCC.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.
electronic commerce indicator

String

1-character alphanumeric

mcpResIndRefundCC.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

MCP-specific request fields – Required

Variable Name Type and Limits Set Method Description
MCP version number

String

current version is 1.0

mcpResIndRefundCC.setMCPVersion("MCP_VERSION_NUM"); Release version number for MCP
cardholder amount

String

12-character numeric

smallest discrete unit of foreign currency

mcpResIndRefundCC.setCardholderAmount("CARDHOLDER_AMOUNT"); Amount, in units of foreign currency, the cardholder will be charged on the transaction
cardholder currency code

String

3-character numeric

mcpResIndRefundCC.setCardholderCurrencyCode("CARDHOLDER_CURRENCY_CODE"); ISO code representing the foreign currency of the cardholder

MCP Purchase with Vault transaction request fields – Optional

Variable Name Type and Limits Set Method Description
customer ID

String

30-character alphanumeric

mcpResIndRefundCC.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

MCP-specific request fields – Optional

Variable Name Type and Limits Set Method Description
MCP rate token

String

N/A

mcpResIndRefundCC.setMCPRateToken("MCP_RATE_TOKEN"); Token representing a temporarily locked-in foreign exchange rate, obtained in the response of the MCP Get Rate transaction and used in subsequent MCP financial transaction requests in order to redeem that rate