My Profile_


Transaction Flow for Visa Level 2/3

Transaction Examples for Visa Level 2/3

This transaction set includes a suite of corporate card financial transactions as well as a transaction that allows for the passing of Level 2/3 data. Please ensure that Visa Level 2/3 support is enabled on your merchant account. Batch Close, Open Totals and Pre-authorization are identical to the non-MasterCard transactions outlined in Transaction Examples for Non-Level 2/3 Card Types 

  • When the Pre-authorization response contains CorporateCard equal to true then you can submit the MC transactions.
  • If CorporateCard is false then the card does not support Level 2/3 data and non Level 2/3 transaction are to be used. If the card is not a corporate card, please refer to Transaction Examples for Non-Level 2/3 Card Types for the appropriate non-corporate card transactions.
  • Ensure to collect the MessageId response field from the Pre-authorization response – this field must be sent in the Level 2/3 data transaction.

Note: This transaction set is intended for transactions where Corporate Card is true and Level 2/3 data will be submitted.

  • If the credit card is found to be a corporate card but you do not wish to send any Level 2/3 data then you may submit VS transactions using the transaction set outlined inTransaction Examples for Non-Level 2/3 Card Types

  • Pre-authorization

    Pre-authorization – (authorisation / preauthorisation) Pre-authorization verifies and locks funds on the customer’s credit card. The funds are locked for a specified amount of time, based on the card issuer. To retrieve the funds from a pre-authorization so that they may be settled in the merchant account a pre-authorization completion must be performed. CorporateCard will return as true if the card supports Level 2/3.

    Note: Refer to CorporateCard being returned within the response to determine the next transaction. If the value is”true” proceed with VSCompletion. If false, return to Transaction Examples for Non-Level 2/3 Card Types

    Canada Code Sample
    
    namespace Moneris
    {
        using System;
    	public class TestPurchase
    	{
    	  public static void Main(string[] args)
    	  {
    	        string host = ‘esqa.moneris.com’;
    	        string order_id = ‘order_id_1234’;
    	        string amount = ‘4.00’;
    	        string card = ‘4242424254545454;
    	        string exp = ‘0909’;
    	        string crypt = ‘7’;
    	
    	        HttpsPostRequest mpgReq =
    	            new HttpsPostRequest(host, ‘moneris’, ‘hurgle’,
    	                       new Preauth(order_id, amount, card, exp, crypt));
    	
    	        try
    	        {
    	            Receipt receipt = mpgReq.GetReceipt();
    	
    	    		Console.WriteLine("CardType = " + receipt.GetCardType());
    	    		Console.WriteLine("TransAmount = " + receipt.GetTransAmount());
    	    		Console.WriteLine("TxnNumber = " + receipt.GetTxnNumber());
    	    		Console.WriteLine("ReceiptId = " + receipt.GetReceiptId());
    	    		Console.WriteLine("TransType = " + receipt.GetTransType());
    	    		Console.WriteLine("ReferenceNum = " + receipt.GetReferenceNum());
    	    		Console.WriteLine("ResponseCode = " + receipt.GetResponseCode());
    	    		Console.WriteLine("ISO = " + receipt.GetISO());
    	    		Console.WriteLine("BankTotals = " + receipt.GetBankTotals());
    	    		Console.WriteLine("Message = " + receipt.GetMessage());
    	    		Console.WriteLine("AuthCode = " + receipt.GetAuthCode());
    	    		Console.WriteLine("Complete = " + receipt.GetComplete());
    	    		Console.WriteLine("TransDate = " + receipt.GetTransDate());
    	    		Console.WriteLine("TransTime = " + receipt.GetTransTime());
    	    		Console.WriteLine("Ticket = " + receipt.GetTicket());
    	    		Console.WriteLine("TimedOut = " + receipt.GetTimedOut());
    Console.WriteLine("CorporateCard = " + receipt.GetCorporateCard());
    	        }
    	        catch (Exception e)
    	        {
    	            Console.WriteLine(e);
    	        }
    	  }
    				
    	} // end TestDrive Item
    }
                    

    Pre-Authorization- Transaction Values

    HttpsPostRequest mpgReq = new HttpsPostRequest(host, store_id, api_token, new Preauth(order_id, amount, card, exp, crypt));

     

    Pre-Authorization object mandatory values

    Value

    Type

    Limits

    Variable

    Description

    Order ID

    String

    50-character alphanumeric

    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

    amount

    Transaction amount This must contain at least 3 digits, two of which are penny values.
    The minimum allowable value is $0.01, and the maximum allowable value is $999999.99. Transaction amounts of $0.00 are not allowed.

    Credit card number

    String

    20-character numeric

    card

    Most credit card numbers today are 16 digits, but some 13-digit numbers are still accepted by some issuers. This field has been intentionally expanded to 20 digits in consideration for future expansion and potential support of private label card ranges.

    Expiry date

    String

    4-character numeric
    YYMM format.

    exp

    Submit in YYMM format.
    Note: This is the reverse of the date displayed on the physical card, which is MMYY.

    E-Commerce indicator

    String

    1-character alphanumeric

    crypt

    Supported values are:

    1 - Mail Order / Telephone Order—Single

    2 - Mail Order / Telephone Order—Recurring

    3 - Mail Order / Telephone Order—Instalment

    4 - Mail Order / Telephone Order—Unknown classification

    5 - Authenticated e-commerce transaction (VBV)

    6 - Non-authenticated e-commerce transaction (VBV)

    7 - SSL-enabled merchant

    8 - Non-secure transaction (web- or email-based)

    9 - SET non-authenticated transaction


    Predecessors:
    • None
    Successors:
  • VSCompletion

  • VS Completion

    Once a Pre-authorization is obtained the funds that are locked need to be retrieved from the customer’s credit card. This Visa Completion transaction is used to secure the funds locked by a pre-authorization transaction and readies them for settlement in to the merchant account.

    Canada Code Sample
    
    using System;
    namespace Moneris
    {
    public class TestVSCompletion
    	{
    		public static void Main(string[] args)
    		{
    			string host = "esqa.moneris.com";
    			string store_id = "moneris";
    			string api_token = "hurgle";
    string order_id;
    			Console.Write ("Please enter an order ID: ");
    			order_id = Console.ReadLine();
    			string txn_number;
    			Console.Write ("Please enter a txn number: ");
    			txn_number = Console.ReadLine();				
    			string amount = "0.01";			
    			string crypt = "7";			
    string nationalTax = "1.23";		
    		  	string merchantVatNo = "gstno111";			
    			string localTax = "2.34";
    			string local_tax_no = "123456789";	
    			string customerVatNo = "pstno999";	
    			string cri = "CUST-REF-001";
    			string customerCode="ccvscomp";
    			string invoiceNumber="invscomp";
    			string statusCheck="false";
    			
    			try
    			{
                     L23HttpsPostRequest request=new L23HttpsPostRequest(host, store_id, api_token, 
    new VSCompletion(order_id, amount, txn_number, crypt, nationalTax, merchantVatNo, cri, localTax, customerVatNo, customerCode, invoiceNumber),statusCheck);
    
                                  Console.WriteLine("request = " + request.ToString());
    				Receipt myReceipt=request.GetReceipt();
    				Console.WriteLine("CardType = " + myReceipt.GetCardType());
    				Console.WriteLine("TransAmount = " + myReceipt.GetTransAmount());
    				Console.WriteLine("TxnNumber = " + myReceipt.GetTxnNumber());
    				Console.WriteLine("ReceiptId = " + myReceipt.GetReceiptId());
    				Console.WriteLine("TransType = " + myReceipt.GetTransType());
    				Console.WriteLine("ReferenceNum = " + myReceipt.GetReferenceNum());
    				Console.WriteLine("ResponseCode = " + myReceipt.GetResponseCode());
    				Console.WriteLine("ISO = " + myReceipt.GetISO());
    				Console.WriteLine("BankTotals = " + myReceipt.GetBankTotals());
    				Console.WriteLine("Message = " + myReceipt.GetMessage());
    				Console.WriteLine("AuthCode = " + myReceipt.GetAuthCode());
    				Console.WriteLine("Complete = " + myReceipt.GetComplete());
    				Console.WriteLine("TransDate = " + myReceipt.GetTransDate());
    				Console.WriteLine("TransTime = " + myReceipt.GetTransTime());
    				Console.WriteLine("Ticket = " + myReceipt.GetTicket());
    				Console.WriteLine("TimedOut = " + myReceipt.GetTimedOut());
    				Console.WriteLine("CorporateCard = "+myReceipt.GetCorporateCard());
    				Console.WriteLine("MessageId = " + myReceipt.GetMessageId());
                   	       Console.WriteLine("StatusCode = " + myReceipt.GetStatusCode());
                   	       Console.WriteLine("StatusMessage = "+myReceipt.GetStatusMessage());
    			}
    			catch ( Exception e )	{
    				Console.WriteLine(e);
    			}
    		}
    	}}}
                    

    VSCompletion - Transaction Values

    L23HttpsPostRequest request=new L23HttpsPostRequest(host, store_id, api_token, new VSCompletion(order_id, amount, txn_number, crypt, nationalTax, merchantVatNo, cri, localTax, customerVatNo, customerCode, invoiceNumber),statusCheck);

    VSCompletion Object Mandatory Values

    Value

    Type

    Limits

    Variable

    Description

    Order ID

    String

    50-character alphanumeric

    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

    amount

    Transaction amount This must contain at least 3 digits, two of which are penny values. The minimum allowable value is $0.01, and the maximum allowable value is $999999.99. Transaction amounts of $0.00 are not allowed.

    Transaction Number

    String

    255 – character

    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.

    E-Commerce indicator

    String

    1-character alphanumeric

    crypt

    Supported values are:

    1 - Mail Order / Telephone Order—Single

    2 - Mail Order / Telephone Order—Recurring

    3 - Mail Order / Telephone Order—Instalment

    4 - Mail Order / Telephone Order—Unknown classification

    5 - Authenticated e-commerce transaction (VBV)

    6 - Non-authenticated e-commerce transaction (VBV)

    7 - SSL-enabled merchant

    8 - Non-secure transaction (web- or email-based)

    9 - SET non-authenticated transaction

    Visa Purchasing Corporate Card Data Processing - Level 2 Request Fields


    Corporate Card Common Data ( VSCompletion)

     

     

    Req

    Variable

    Value

    Limits

    Description

    Y

    nationalTax

    National Tax

     

    9 decimal

    Must reflect the amount of National Tax (GST or HST) appearing on the invoice.

    C

    merchantVatNo

    Merchant VAT Registration/ Single Business Reference Number

    20 A/N

    Merchant’s Tax Registration Number must be provided if tax is included on the invoice - If National Tax included then must not be all spaces or all zeroes.

     

    N

    localTax

    Local Tax

     

    9 decimal

    Must reflect the amount of Local Tax (PST or QST) appearing on the invoice.

    C

    localTaxNo

    PST Tax Registration Number

    15 A/N

    Merchant’s PST Tax Registration Number must be provided if tax is included on the invoice - If Local Tax included then must not be all spaces or all zeroes. Must be provided if Local Tax (PST or QST) applies

    N

    customerVatNo

    Customer VAT Registration Number

    20 A/N

    If the Customer’s Tax Registration Number appears on the invoice to support tax exempt transactions it must be provided here

    N

    Cri

    Customer Code/ Customer Reference Identifier (CRI)

     

    16 A/N

    16 character value which the customer may choose to provide to the supplier at the point of sale – must be provided if provided by the customer

     

    N

    customerCode

    Customer Code

    17 A/N

    Optional customer code field that will not be passed along to Visa, but will be included on Moneris reporting.

    N

    invoiceNumber

    Invoice Number

    17 A/N

    Optional invoice number field that will not be passed along to Visa, but will be included on Moneris reporting.


    Predecessors:
    • Pre-Authorization
    Successors:
  • VS Purchase Correction
  • VS Refund

  • VS Forcepost

    The Visa Forcepost transaction is used to secure the funds locked by a pre-authorization transaction performed over IVR or equivalent terminal. The force post retrieves the locked funds and readies them for settlement in to the merchant account.

    Canada Code Sample
    
    using System;
    namespace Moneris
    {
     public class TestVSForcePost
    	{
    		public static void Main(string[] args)
    		{
    			string host = "esqa.moneris.com";
    			string store_id = "moneris";
    			string api_token = "hurgle";
    			string order_id;
    			Console.Write ("Please enter an order ID: ");
    			order_id = Console.ReadLine();
    			string amount;
    			Console.Write ("Please enter the amount: ");
    			amount = Console.ReadLine();
    			string pan;
    			Console.Write ("Please enter card number: ");
    			pan = Console.ReadLine();
    			string expDate="0912";
    			string authCode="44565";
    			string crypt = "7";
    			string cust_id = "GSP_001";
    		    	string nationalTax = "1.23";		
    		  	string merchantVatNo = "gstno111";			
    			string localTax = "2.34";	
    			string customerVatNo = "pstno999";	
    			string cri = "CUST-REF-002";
    			string customerCode="ccvsfp";
    			string invoiceNumber="invsfp";
    			string statusCheck="false";
    			try
    			{
    				L23HttpsPostRequest request=new L23HttpsPostRequest(host, store_id, api_token, 
    new VSForcePost(order_id, cust_id, amount, pan, expDate, authCode,   crypt,nationalTax, merchantVatNo, cri, localTax, customerVatNo, customerCode, invoiceNumber),statusCheck);
    				Receipt myReceipt=request.GetReceipt();
    				Console.WriteLine("CardType = " + myReceipt.GetCardType());
    				Console.WriteLine("TransAmount = " + myReceipt.GetTransAmount());
    				Console.WriteLine("TxnNumber = " + myReceipt.GetTxnNumber());
    				Console.WriteLine("ReceiptId = " + myReceipt.GetReceiptId());
    				Console.WriteLine("TransType = " + myReceipt.GetTransType());
    				Console.WriteLine("ReferenceNum = " + myReceipt.GetReferenceNum());
    				Console.WriteLine("ResponseCode = " + myReceipt.GetResponseCode());
    				Console.WriteLine("ISO = " + myReceipt.GetISO());
    				Console.WriteLine("BankTotals = " + myReceipt.GetBankTotals());
    				Console.WriteLine("Message = " + myReceipt.GetMessage());
    				Console.WriteLine("AuthCode = " + myReceipt.GetAuthCode());
    				Console.WriteLine("Complete = " + myReceipt.GetComplete());
    				Console.WriteLine("TransDate = " + myReceipt.GetTransDate());
    				Console.WriteLine("TransTime = " + myReceipt.GetTransTime());
    				Console.WriteLine("Ticket = " + myReceipt.GetTicket());
    				Console.WriteLine("TimedOut = " + myReceipt.GetTimedOut());
    				Console.WriteLine("CorporateCard = " + myReceipt.GetCorporateCard());
    				Console.WriteLine("MessageId = " + myReceipt.GetMessageId());
                    				Console.WriteLine("StatusCode = " + myReceipt.GetStatusCode());
                    				Console.WriteLine("StatusMessage = " + myReceipt.GetStatusMessage());
    			}
    			catch ( Exception e )
    			{
    				Console.WriteLine(e);
    			}
    		}
    	}
    }
                    

    VSForcepost - Transaction Values

    L23HttpsPostRequest request=new L23HttpsPostRequest(host, store_id, api_token, new VSForcepost(order_id, cust_id, amount, pan, expDate, authCode, crypt,nationalTax, merchantVatNo, cri, localTax, customerVatNo, customerCode, invoiceNumber) statusCheck);

    VSForcepost object mandatory values

    Value

    Type

    Limits

    Variable

    Description

    Order ID

    String

    50-character alphanumeric

    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

    amount

    Transaction amount This must contain at least 3 digits, two of which are penny values. The minimum allowable value is $0.01, and the maximum allowable value is $999999.99. Transaction amounts of $0.00 are not allowed.

    Transaction Number

    String

    255 – character

    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.

    E-Commerce indicator

    String

    1-character alphanumeric

    crypt

    Supported values are:

    1 - Mail Order / Telephone Order—Single

    2 - Mail Order / Telephone Order—Recurring

    3 - Mail Order / Telephone Order—Instalment

    4 - Mail Order / Telephone Order—Unknown classification

    5 - Authenticated e-commerce transaction (VBV)

    6 - Non-authenticated e-commerce transaction (VBV)

    7 - SSL-enabled merchant

    8 - Non-secure transaction (web- or email-based)

    9 - SET non-authenticated transaction

    Visa Purchasing Corporate Card Data Processing - Level 2 Request Fields

    Corporate Card Common Data (VSCompletion)

    Req

    Variable

    Value

    Limits

    Description

    Y

    nationalTax

    National Tax

     

    9 decimal

    Must reflect the amount of National Tax (GST or HST) appearing on the invoice.

    C

    merchantVatNo

    Merchant VAT Registration/ Single Business Reference Number

    20 A/N

    Merchant’s Tax Registration Number must be provided if tax is included on the invoice - If National Tax included then must not be all spaces or all zeroes.

     

    N

    localTax

    Local Tax

     

    9 decimal

    Must reflect the amount of Local Tax (PST or QST) appearing on the invoice.

    C

    localTaxNo

    PST Tax Registration Number

    15 A/N

    Merchant’s PST Tax Registration Number must be provided if tax is included on the invoice - If Local Tax included then must not be all spaces or all zeroes. Must be provided if Local Tax (PST or QST) applies

    N

    customerVatNo

    Customer VAT Registration Number

    20 A/N

    If the Customer’s Tax Registration Number appears on the invoice to support tax exempt transactions it must be provided here

    N

    Cri

    Customer Code/ Customer Reference Identifier (CRI)

     

    16 A/N

    16 character value which the customer may choose to provide to the supplier at the point of sale – must be provided if provided by the customer

     

    N

    customerCode

    Customer Code

    17 A/N

    Optional customer code field that will not be passed along to Visa, but will be included on Moneris reporting.

    N

    invoiceNumber

    Invoice Number

    17 A/N

    Optional invoice number field that will not be passed along to Visa, but will be included on Moneris reporting.


    VS Purchase Correction

    The VSCompletions can be corrected (voided) the same day* that they occur. The VSPurchaseCorrection (void) transaction is used to cancel a transaction that was performed in the current batch. No amount is required because a purchase correction is always for 100% of the original transaction.  

    A purchase correction must be for the full amount of the transaction and will remove any record of it from the cardholder statement.

    * A VSPurchaseCorrection can be performed against a transaction as long as the batch that contains the original transaction remains open.   When using the automated closing feature batch close occurs daily between 10 – 11 pm EST.

    Canada Code Sample
    
    using System;
    namespace Moneris
    {
    
    	public class TestVSPurchaseCorrection
    	{
    		public static void Main(string[] args)
    		{
    	   		string host = "esqa.moneris.com";
    	   		string store_id = "moneris";
    	   		string api_token = "hurgle";
    	   		string order_id;
    	   		string txn_number;
    
    	   		Console.Write ("Please enter an order ID: ");
    	   		order_id = Console.ReadLine();		
    
    	   		Console.Write ("Please enter a txn number: ");
    	   		txn_number = Console.ReadLine();	
    			string crypt = "7";
    
    			try
    			{
    				L23HttpsPostRequest request=new L23HttpsPostRequest(host, store_id, api_token, 
    					new VSPurchaseCorrection(order_id, txn_number, crypt));
    
    				Receipt myReceipt=request.GetReceipt();
    				Console.WriteLine("CardType = " + myReceipt.GetCardType());
    				Console.WriteLine("TransAmount = " + myReceipt.GetTransAmount());
    				Console.WriteLine("TxnNumber = " + myReceipt.GetTxnNumber());
    				Console.WriteLine("ReceiptId = " + myReceipt.GetReceiptId());
    				Console.WriteLine("TransType = " + myReceipt.GetTransType());
    				Console.WriteLine("ReferenceNum = " + myReceipt.GetReferenceNum());
    				Console.WriteLine("ResponseCode = " + myReceipt.GetResponseCode());
    				Console.WriteLine("ISO = " + myReceipt.GetISO());
    				Console.WriteLine("BankTotals = " + myReceipt.GetBankTotals());
    				Console.WriteLine("Message = " + myReceipt.GetMessage());
    				Console.WriteLine("AuthCode = " + myReceipt.GetAuthCode());
    				Console.WriteLine("Complete = " + myReceipt.GetComplete());
    				Console.WriteLine("TransDate = " + myReceipt.GetTransDate());
    				Console.WriteLine("TransTime = " + myReceipt.GetTransTime());
    				Console.WriteLine("Ticket = " + myReceipt.GetTicket());
    				Console.WriteLine("TimedOut = " + myReceipt.GetTimedOut());
    				Console.WriteLine("CorporateCard = " + myReceipt.GetCorporateCard());
    				Console.WriteLine("MessageId = " + myReceipt.GetMessageId());
    			}
    			catch ( Exception e )
    			{
    				Console.WriteLine(e);
    			}
    		}
    	}
    }
                    

    VSPurchaseCorrection - Transaction Values

    L23HttpsPostRequest request=new L23HttpsPostRequest(host, store_id, api_token,new VSPurchaseCorrection(order_id, txn_number, crypt));

    VSPurchaseCorrection object mandatory values

    Value

    Type

    Limits

    Variable

    Description

    Order ID

    String

    50-character alphanumeric

    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.

    Transaction Number

    String

    255 – character

    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.

    E-Commerce indicator

    String

    1-character alphanumeric

    crypt

    Supported values are:

    1 - Mail Order / Telephone Order—Single

    2 - Mail Order / Telephone Order—Recurring

    3 - Mail Order / Telephone Order—Instalment

    4 - Mail Order / Telephone Order—Unknown classification

    5 - Authenticated e-commerce transaction (VBV)

    6 - Non-authenticated e-commerce transaction (VBV)

    7 - SSL-enabled merchant

    8 - Non-secure transaction (web- or email-based)

    9 - SET non-authenticated transaction


    Predecessors:
    • VSCompletion
    • VSForcepost
    Successors:
  • None

  • VS Refund

    The VSRefund will credit a specified amount to the cardholder’s credit card. A refund can be sent up to the full value of the original VSCompletion or VSForcepost.

    Canada Code Sample
    
    using System;
    
    namespace Moneris
    {
    	public class TestVSRefund
    	{
    		public static void Main(string[] args)
    		{
    			string host = "esqa.moneris.com";
    			string store_id = "moneris";
    			string api_token = "hurgle";
    			string amount;
    			Console.Write ("Please enter the amount: ");
    			amount = Console.ReadLine();
    			string crypt = "7";
    			string order_id;
    			string txn_number;
    			Console.Write ("Please enter an order ID: ");
    			order_id = Console.ReadLine();		
    			Console.Write ("Please enter a txn number: ");
    			txn_number = Console.ReadLine();			
    		    	string nationalTax = "1.23";		
    		  	string merchantVatNo = "gstno111";			
    			string localTax = "2.34";	
    			string customerVatNo = "pstno999";	
    			string cri = "CUST-REF-004";
    			Random random = new Random();
    //13 digit ticket number
    			string ticketNumber=random.Next(100000000, 999999999).ToString()+random.Next(1000, 9999).ToString();
    			string statusCheck="false";
    
    			try
    			{
    				L23HttpsPostRequest request=new L23HttpsPostRequest(host, store_id, api_token, 
    					new VSRefund(order_id, amount, txn_number, crypt, nationalTax, merchantVatNo, cri, 
    					                 localTax, customerVatNo, ticketNumber),statusCheck);
    				Receipt myReceipt=request.GetReceipt();
    				Console.WriteLine("CardType = " + myReceipt.GetCardType());
    				Console.WriteLine("TransAmount = " + myReceipt.GetTransAmount());
    				Console.WriteLine("TxnNumber = " + myReceipt.GetTxnNumber());
    				Console.WriteLine("ReceiptId = " + myReceipt.GetReceiptId());
    				Console.WriteLine("TransType = " + myReceipt.GetTransType());
    				Console.WriteLine("ReferenceNum = " + myReceipt.GetReferenceNum());
    				Console.WriteLine("ResponseCode = " + myReceipt.GetResponseCode());
    				Console.WriteLine("ISO = " + myReceipt.GetISO());
    				Console.WriteLine("BankTotals = " + myReceipt.GetBankTotals());
    				Console.WriteLine("Message = " + myReceipt.GetMessage());
    				Console.WriteLine("AuthCode = " + myReceipt.GetAuthCode());
    				Console.WriteLine("Complete = " + myReceipt.GetComplete());
    				Console.WriteLine("TransDate = " + myReceipt.GetTransDate());
    				Console.WriteLine("TransTime = " + myReceipt.GetTransTime());
    				Console.WriteLine("Ticket = " + myReceipt.GetTicket());
    				Console.WriteLine("TimedOut = " + myReceipt.GetTimedOut());
    				Console.WriteLine("CorporateCard = " + myReceipt.GetCorporateCard());
    				Console.WriteLine("MessageId = " + myReceipt.GetMessageId());
                    				Console.WriteLine("StatusCode = " + myReceipt.GetStatusCode());
                   				Console.WriteLine("StatusMessage = " + myReceipt.GetStatusMessage());
    			}
    			catch ( Exception e )			{
    				Console.WriteLine(e);
    			}
    		}
    	}
    }
                    

    VSRefund - Transaction Values

    L23HttpsPostRequest request=new L23HttpsPostRequest(host, store_id, api_token,
      new VSRefund(order_id, amount, txn_number, crypt, nationalTax, merchantVatNo, cri,localTax, customerVatNo, ticketNumber),statusCheck);

    VSRefund object mandatory values

    Value

    Type

    Limits

    Variable

    Description

    Order ID

    String

    50-character alphanumeric

    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

    amount

    Transaction amount This must contain at least 3 digits, two of which are penny values. The minimum allowable value is $0.01, and the maximum allowable value is $999999.99. Transaction amounts of $0.00 are not allowed.

    Transaction Number

    String

    255 – character

    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.

    E-Commerce indicator

    String

    1-character alphanumeric

    crypt

    Supported values are:

    1 - Mail Order / Telephone Order—Single

    2 - Mail Order / Telephone Order—Recurring

    3 - Mail Order / Telephone Order—Instalment

    4 - Mail Order / Telephone Order—Unknown classification

    5 - Authenticated e-commerce transaction (VBV)

    6 - Non-authenticated e-commerce transaction (VBV)

    7 - SSL-enabled merchant

    8 - Non-secure transaction (web- or email-based)

    9 - SET non-authenticated transaction

     


    Visa Purchasing Corporate Card Data Processing - Level 2 Request Fields

     

    Corporate Card Common Data (VSCompletion)

     

    Req

    Variable

    Value

    Limits

    Description

    Y

    nationalTax

    National Tax

     

    9 decimal

    Must reflect the amount of National Tax (GST or HST) appearing on the invoice.

    C

    merchantVatNo

    Merchant VAT Registration/ Single Business Reference Number

    20 A/N

    Merchant’s Tax Registration Number must be provided if tax is included on the invoice - If National Tax included then must not be all spaces or all zeroes.

     

    N

    localTax

    Local Tax

     

    9 decimal

    Must reflect the amount of Local Tax (PST or QST) appearing on the invoice.

    C

    localTaxNo

    PST Tax Registration Number

    15 A/N

    Merchant’s PST Tax Registration Number must be provided if tax is included on the invoice - If Local Tax included then must not be all spaces or all zeroes. Must be provided if Local Tax (PST or QST) applies

    N

    customerVatNo

    Customer VAT Registration Number

    20 A/N

    If the Customer’s Tax Registration Number appears on the invoice to support tax exempt transactions it must be provided here

    N

    Cri

    Customer Code/ Customer Reference Identifier (CRI)

     

    16 A/N

    16 character value which the customer may choose to provide to the supplier at the point of sale – must be provided if provided by the customer

     

    N

    customerCode

    Customer Code

    17 A/N

    Optional customer code field that will not be passed along to Visa, but will be included on Moneris reporting.

    N

    invoiceNumber

    Invoice Number

    17 A/N

    Optional invoice number field that will not be passed along to Visa, but will be included on Moneris reporting.


    Predecessors:
    • VSCompletion
    • VSForcepost
    Successors:
  • None

  • VS Independent Refund

    The VSIndependentRefund is used when the originating transaction was not performed through Moneris Gateway. The VSIndependentRefund will credit a specified amount to the cardholder’s credit card. Please note, the Independent Refund transaction may or may not be supported on your account. If you receive a transaction not allowed error when attempting an independent refund, it may mean the transaction is not supported on your account. If you wish to have the Independent Refund transaction type temporarily enabled (or re-enabled), please contact the Service Centre at 1-866-319-7450.

    Canada Code Sample
    
    using System;
    namespace Moneris
    {
    	public class TestVSIndependentRefund
    	{
    		public static void Main(string[] args)
    		{
    			string host = "esqa.moneris.com";
    			string store_id = "moneris";
    			string api_token = "hurgle";			
    			string amount;
    			Console.Write ("Please enter the amount: ");
    			amount = Console.ReadLine();
    			string pan= "4242424254545454";
    			string expDate= "1111";
    			string crypt = "7";string order_id;
                			Console.Write ("Please enter an order ID: ");
    			order_id = Console.ReadLine();	
    			string cust_id="cid";
                			string nationalTax = "1.23";		
    		  	string merchantVatNo = "gstno111";			
    			string localTax = "2.34";	
    			string customerVatNo = "pstno999";	
    			string cri = "CUST-REF-003";
    			string customerCode="ccvsindrefund";
    			string invoiceNumber="invsindrefund";
    			string statusCheck="false";
    
    			try
    			{
    				L23HttpsPostRequest request=new L23HttpsPostRequest(host, store_id, api_token, 
    new VSIndependentRefund(order_id, cust_id, amount, pan,expDate, crypt, nationalTax, merchantVatNo, cri, localTax, customerVatNo, customerCode, invoiceNumber),statusCheck);
    				Receipt myReceipt=request.GetReceipt();
    				Console.WriteLine("CardType = " + myReceipt.GetCardType());
    				Console.WriteLine("TransAmount = " + myReceipt.GetTransAmount());
    				Console.WriteLine("TxnNumber = " + myReceipt.GetTxnNumber());
    				Console.WriteLine("ReceiptId = " + myReceipt.GetReceiptId());
    				Console.WriteLine("TransType = " + myReceipt.GetTransType());
    				Console.WriteLine("ReferenceNum = " + myReceipt.GetReferenceNum());
    				Console.WriteLine("ResponseCode = " + myReceipt.GetResponseCode());
    				Console.WriteLine("ISO = " + myReceipt.GetISO());
    				Console.WriteLine("BankTotals = " + myReceipt.GetBankTotals());
    				Console.WriteLine("Message = " + myReceipt.GetMessage());
    				Console.WriteLine("AuthCode = " + myReceipt.GetAuthCode());
    				Console.WriteLine("Complete = " + myReceipt.GetComplete());
    				Console.WriteLine("TransDate = " + myReceipt.GetTransDate());
    				Console.WriteLine("TransTime = " + myReceipt.GetTransTime());
    				Console.WriteLine("Ticket = " + myReceipt.GetTicket());
    				Console.WriteLine("TimedOut = " + myReceipt.GetTimedOut());
    				Console.WriteLine("CorporateCard = " + myReceipt.GetCorporateCard());
    				Console.WriteLine("MessageId = " + myReceipt.GetMessageId());
                   				Console.WriteLine("StatusCode = " + myReceipt.GetStatusCode());
                    				Console.WriteLine("StatusMessage = " + myReceipt.GetStatusMessage());
    			}
    			catch ( Exception e )
    			{
    				Console.WriteLine(e);
    			}
    		}
    	}
    }
                    

    VSIndependentRefund - Transaction Values

    L23HttpsPostRequest request=new L23HttpsPostRequest(host, store_id, api_token,
    new VSIndependentRefund(order_id, cust_id, amount, pan,expDate, crypt, nationalTax, merchantVatNo, cri, localTax, customerVatNo, customerCode, invoiceNumber),statusCheck);

    VSIndependentRefund object mandatory values

    Value

    Type

    Limits

    Variable

    Description

    Order ID

    String

    50-character alphanumeric

    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

    amount

    Transaction amount This must contain at least 3 digits, two of which are penny values. The minimum allowable value is $0.01, and the maximum allowable value is $999999.99. Transaction amounts of $0.00 are not allowed.

    Transaction Number

    String

    255 – character

    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.

    E-Commerce indicator

    String

    1-character alphanumeric

    crypt

    Supported values are:

    1 - Mail Order / Telephone Order—Single

    2 - Mail Order / Telephone Order—Recurring

    3 - Mail Order / Telephone Order—Instalment

    4 - Mail Order / Telephone Order—Unknown classification

    5 - Authenticated e-commerce transaction (VBV)

    6 - Non-authenticated e-commerce transaction (VBV)

    7 - SSL-enabled merchant

    8 - Non-secure transaction (web- or email-based)

    9 - SET non-authenticated transaction


    Visa Purchasing Corporate Card Data Processing - Level 2 Request Fields

     

    Corporate Card Common Data ( VSCompletion)

     

    Req

    Variable

    Value

    Limits

    Description

    Y

    nationalTax

    National Tax

     

    9 decimal

    Must reflect the amount of National Tax (GST or HST) appearing on the invoice.

    C

    merchantVatNo

    Merchant VAT Registration/ Single Business Reference Number

    20 A/N

    Merchant’s Tax Registration Number must be provided if tax is included on the invoice - If National Tax included then must not be all spaces or all zeroes.

     

    N

    localTax

    Local Tax

     

    9 decimal

    Must reflect the amount of Local Tax (PST or QST) appearing on the invoice.

    C

    localTaxNo

    PST Tax Registration Number

    15 A/N

    Merchant’s PST Tax Registration Number must be provided if tax is included on the invoice - If Local Tax included then must not be all spaces or all zeroes. Must be provided if Local Tax (PST or QST) applies

    N

    customerVatNo

    Customer VAT Registration Number

    20 A/N

    If the Customer’s Tax Registration Number appears on the invoice to support tax exempt transactions it must be provided here

    N

    Cri

    Customer Code/ Customer Reference Identifier (CRI)

     

    16 A/N

    16 character value which the customer may choose to provide to the supplier at the point of sale – must be provided if provided by the customer

     

    N

    customerCode

    Customer Code

    17 A/N

    Optional customer code field that will not be passed along to Visa, but will be included on Moneris reporting.

    N

    invoiceNumber

    Invoice Number

    17 A/N

    Optional invoice number field that will not be passed along to Visa, but will be included on Moneris reporting.


    Predecessors:
    • Transaction that was completed on an independent system
    Successors:
  • None

  • Visa Level 2/3 VSCorpais Corporate card Common Data with Line Item Details

    VSCorpais will contain all the required and optional data fields for Level 2/3 addendum Level 2/3 Purchasing Card data. VSCorpais data can be sent when the card has been identified in the Pre-authorization transaction request as being a corporate card.


    This transaction example includes the following elements for Level 2 and 3 purchasing card corporate card data processing:

    • Corporate Card Common Data (VSPurcha)
      • only 1 set of VSPurcha fields can be submitted
      • this data set includes data elements that apply to the overall order, for example the total overall taxes
    • Line Item Details (VSPurchl)
      • 1-998 counts of VSPurchl line items can be submitted
      • This data set includes the details about each individual item or service purchased

    VSCorpais request must be preceded by a financial transaction (VSCompletion, VSForcepost, VSRefund, MCIndependentRefund), the Corporate Card flag must be set to “true” in the Pre-authorization response and must also succesfully receive a message_id in the pre-authorization response.

    Canada Code Sample
    
    using System;
    namespace Moneris
    {
       public class TestVSCorpaisInvoice
       {
    	public static void Main(string[] args)
    	{
    	   string host = "esqa.moneris.com";
    	   string store_id = "moneris";
    	   string api_token = "hurgle";
    	   string order_id;
    	   string txn_number;
    
    	   Console.Write ("Please enter an order ID: ");
    	   order_id = Console.ReadLine();		
    
    	   Console.Write ("Please enter a txn number: ");
    	   txn_number = Console.ReadLine();	
    	   
    	   try
    	   {
    	   
    	   	/************************** Level 2 Addendum ********************************/
    	   	String buyerName = "Buyer Manager";
    	   	String localTaxRate = "13.00";
    	   	String dutyAmount = "0.00";
    	   	String discountTreatment = "0";
    	   	String discountAmt = "0.00";
    	   	String freightAmount = "0.20";
    	   	String shipToPosCode = "M8X 2W8";
    	   	String shipFromPosCode = "M1K 2Y7";
    	   	String desCouCode = "CAN";
    	   	String vatRefNum = "VAT12345";
    	   	String taxTreatment = "3";//3 = Gross prices given with tax information provided at invoice level
    	   	String gstHstFreightAmount = "0.00";
    	   	String gstHstFreightRate = "13.00";   	
    	   
            		VSPurchaNew data2 = 
    new VSPurchaNew(buyerName, localTaxRate, dutyAmount, discountTreatment, discountAmt, freightAmount, shipToPosCode, shipFromPosCode, desCouCode,
            			 vatRefNum, taxTreatment, gstHstFreightAmount, gstHstFreightRate);
    
    		/************************** Level 3 Addendum ********************************/
            		string[] itemComCode = new string[2]{"", ""};
    		string[] productCode = new string[2]{"CHR123", "DDSK200"};
    		string[] itemDescription = new string[2]{"Office Chair", "Disk Drive"};
    		string[] itemQuantity = new string[2]{"3", "1"};
    		string[] itemUom = new string[2]{"EA", "EA"};
    		string[] unitCost = new string[2]{"0.20", "0.40"};
    		string[] vatTaxAmt = new string[2]{"0.00", "0.00"};
    		string[] vatTaxRate = new string[2]{"13.00", "13.00"};
    		string[] discountTreatmentL = new string[2]{"0", "0"};
    		string[] discountAmtL = new string[2]{"0.00", "0.00"};
    		
    		// Every order has one or more VSPurchl, which can be also called Line Item
    		
    		VSPurchlNew[] data3 = new VSPurchlNew[2];
    
    		data3[0] = new VSPurchlNew(itemComCode[0], productCode[0], itemDescription[0], itemQuantity[0], 
    		                itemUom[0], unitCost[0], vatTaxAmt[0], vatTaxRate[0], discountTreatmentL[0], discountAmtL[0]);
    
    		data3[1] = new VSPurchlNew(itemComCode[1], productCode[1], itemDescription[1], itemQuantity[1], 
    		                 itemUom[1], unitCost[1], vatTaxAmt[1], vatTaxRate[1], discountTreatmentL[1], discountAmtL[1]);
    		
    		/****************************** Request ***************************************/
    		
    		VSPurchalNew data = new VSPurchalNew(order_id,txn_number,data2,data3);
    		
    		L23HttpsPostRequest request=new L23HttpsPostRequest(host, store_id, api_token, data);
    				
    		/****************************** Response *************************************/
    		
    		Receipt myReceipt=request.GetReceipt();
    				
    		Console.WriteLine("CardType = " + myReceipt.GetCardType());
    		Console.WriteLine("TransAmount = " + myReceipt.GetTransAmount());
    		Console.WriteLine("TxnNumber = " + myReceipt.GetTxnNumber());
    		Console.WriteLine("ReceiptId = " + myReceipt.GetReceiptId());
    		Console.WriteLine("TransType = " + myReceipt.GetTransType());
    		Console.WriteLine("ReferenceNum = " + myReceipt.GetReferenceNum());
    		Console.WriteLine("ResponseCode = " + myReceipt.GetResponseCode());
    		Console.WriteLine("ISO = " + myReceipt.GetISO());
    		Console.WriteLine("BankTotals = " + myReceipt.GetBankTotals());
    		Console.WriteLine("Message = " + myReceipt.GetMessage());
    		Console.WriteLine("AuthCode = " + myReceipt.GetAuthCode());
    		Console.WriteLine("Complete = " + myReceipt.GetComplete());
    		Console.WriteLine("TransDate = " + myReceipt.GetTransDate());
    		Console.WriteLine("TransTime = " + myReceipt.GetTransTime());
    		Console.WriteLine("Ticket = " + myReceipt.GetTicket());
    		Console.WriteLine("TimedOut = " + myReceipt.GetTimedOut());
    		Console.WriteLine("CorporateCard = " + myReceipt.GetCorporateCard());
    		Console.WriteLine("MessageId = " + myReceipt.GetMessageId()); 
    	   }
    	
    	   catch ( Exception e )
    	   {
    		Console.WriteLine("e.StackTrace:"+e.StackTrace+",e.Message:"+e.Message);
    	   }
    		
    	}
       }
    }
                    

    Visa Level 2/3 VSCorpais – Corporate Card Common Data with Line Item Details - Transaction Values


    VSPurchaNew data2 = new VSPurchaNew(); VSPurchlNew[] data3 = new VSPurchlNew[2]; VSPurchalNew data = new VSPurchalNew(order_id,txn_number,data2,data3); L23HttpsPostRequest request=new L23HttpsPostRequest(host, store_id, api_token, data);

    Visa Level 2/3 VSCorpais – Corporate Card Common Data with Line Item Details mandatory values

    Value

    Type

    Limits

    Variable

    Description

    Order ID

    String

    50-character alphanumeric

    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.

    Transaction Number

    String

    255 – character

    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.

    VSPurchNew

    n/a

    n/a

    n/a

    Corporate Card Common Data

    VSPurchlNew

    n/a

    n/a

    n/a

    Line Item Details

    MCCorpais

    n/a

    n/a

    n/a

    Corporate Card Common Data and Line Item Details



    Visa Purchasing Corporate Card Data Processing - Level 2 Request Fields

     

    Corporate Card Common Data (VSPurchaNew)

    Req

    Variable

    Value

    Limits

    Description

    N

    buyerName

    Buyer Name

    30 A/N

    Buyer/Receipient Name. Name required by CRA on transactions >$150.

    N

    localTaxRate

    Local Tax Rate

    4 numeric

    Indicates the detailed tax rate applied in relationship to a local tax amount. Like 8% PST should be 8.0. maximum 99.99.

    Must be provided if Local Tax (PST or QST) applies.

    N

    dutyAmount

    Duty Amount

    9 decimal

    Duty on total purchase amount.A minus sign means 'amount is a credit', plus sign or no sign means 'amount is a debit',maximum without sign is 999999.99

    N

    discountTreatment

    Inoice Discount Treatment

    1 N

    Fixed length 1 Numeric. Indicates how the merchant is managing discounts. Must be one of the following values:

    0 - if no invoice level discounts apply for this invoice;

    1 - if Tax was calculated on Post-Discount totals;

    2 - if Tax was calculated on Pre-Discount totals.

    N

    discountAmt

    Incoice Level Discount Amount

    9 decimal

    Amount of discount (if provided at the invoice level according to the Invoice Discount Treatment).

    Must be non-zero if Invoice Discount Treatment is 1 or 2. Minimum amount is 0.00 and maximum is 999999.99.

    N

    shipToPosCode

    Ship To Postal Code / Zip Code

    10 A/N

     

    The postal code or zip code where goods will be delivered. Destination postal code.

    Must be provided if shipment is involved - Full alpha postal code - Valid ANA<space>NAN format if shipping to an address within Canada.

    N

    shipFromPosCode

    Ship From Postal Code / Zip Code

    10 A/N

    The postal code or zip code from which items were shipped.

    Full alpha postal code for the merchant - Valid ANA<space>NAN format.

    N

    desCouCode

    Destination Country Code

    2 A/N

    Code of country where purchased goods will be delivered. If it appears on the invoice for an international transaction then it must be provided here. Must be valid 2-char country code.

    M

    vatRefNum

    Unique VAT Invoice Reference Number

    15 N

    Unique Value Added Tax Invoice Reference Number. Must be populated with the invoice number. Must not be all spaces or all zeroes.

    N

    taxTreatment

    Tax Treatment

    1 N

    Must be one of the following values:

    0 = Net Prices with tax calculated at line item level;

    1 = Net Prices with tax calculated at invoice level;

    2 = Gross prices given with tax information provided at line item level;

    3 = Gross prices given with tax information provided at invoice level;

    4 = No tax applies (small merchant) on the invoice for the transaction

    N

    freightAmount

    Freight/Shipping Amount (Ship Amount)

    9 decimal

    If shipping is not provided as a line item it must be provided here if applicable. Freight charges on total purchase. Signed monetary amount, minus sign means 'amount is a credit', plus sign or no sign means 'amount is a debit'. Maximum without sign is 999999.99. Example -1.00 or +2.00.

    N

    gstHstFreightRate

    GST HST Freight Rate

    4 decimal

    If Freight/Shipping Amount is provided then this (National GST or HST) tax rate must be provided.

    Rate of GST (excludes PST) or HST charged on the shipping amount (in accordance with the Tax Treatment). Monetary amount, maximum is 99.99. Such as 13% HST is 13.00

    N

    gstHstFreightAmount

    GST HST Freight Amount

    9 decimal

    If Freight/Shipping Amount is provided then this (National GST or HST) tax amount must be provided if taxTreatment is 0 or 2. Amount of GST (excludes PST) or HST charged on the shipping amount. Signed monetary amount, minus sign means 'amount is a credit', plus sign or no sign means 'amount is a debit'. Maximum without sign is 999999.99. Example -1.00 or +2.00.



    VS Purchal Deprecated

    VSPurchal will contain all the required and optional data fields for Level 2/3 Business to Business data. VSPurchal data can be sent when the card has been identified in the Pre-authorization transaction request as being a corporate card. Please use VSCorpais instead of VSPurchal to add Level 2/3 data

    Upon sending a VSCompletion, VSRefund, VSPurchaseCorrection and succesfully receiving a message_id in the response the Level 2/3 data can be submitted.


    Note: This transaction has been deprecated. Please use VSCorpais for processing Level 2/3 data.

     

    Canada Code Sample
    
    using System;
    
    namespace Moneris
    {
    	public class TestVSPurchal
    	{
    		public static void Main1(string[] args)
    		{
    			string host = "esqa.moneris.com";
    			string store_id = "level23";
    			string api_token = "moymoy";
    			string order_id = "TestL230505_016";
    			string txn_number = "190175-27-1";
    			try
    			{
    				VSPurcha data2=new VSPurcha("1.00","M8X 2W8","M1K 2Y7","Canada","VAT12345");
    				VSPurchl[] data3=new VSPurchl[5];
    
    				data3[0]=new VSPurchl("CC01",null,"CC01 descr","1","EA","1.01","0","0","0");
    				data3[1]=new VSPurchl(null,"VP02","VP02 descr","2","EA","2.35","0","0","0");
    				data3[2]=new VSPurchl(null,"Freight/Shipping","Freight/Shipping", "1", "EA", "1.69", "0.12", 
    							"7.00", "0");
    				data3[3]=new VSPurchl(null,"VP04","VP04 descr","4","CMT","3.34","0.94","7.00","0");
    				data3[4]=new VSPurchl(null,"Discount","Discount","1","EA","0.23","0","0","0.23");
    				
    VSPurchal data=new VSPurchal(order_id,txn_number,data2,data3);
    				L23HttpsPostRequest request=new L23HttpsPostRequest(host, store_id, api_token, data);
    
    				Receipt myReceipt=request.GetReceipt();
    				Console.WriteLine("CardType = " + myReceipt.GetCardType());
    				Console.WriteLine("TransAmount = " + myReceipt.GetTransAmount());
    				Console.WriteLine("TxnNumber = " + myReceipt.GetTxnNumber());
    				Console.WriteLine("ReceiptId = " + myReceipt.GetReceiptId());
    				Console.WriteLine("TransType = " + myReceipt.GetTransType());
    				Console.WriteLine("ReferenceNum = " + myReceipt.GetReferenceNum());
    				Console.WriteLine("ResponseCode = " + myReceipt.GetResponseCode());
    				Console.WriteLine("ISO = " + myReceipt.GetISO());
    				Console.WriteLine("BankTotals = " + myReceipt.GetBankTotals());
    				Console.WriteLine("Message = " + myReceipt.GetMessage());
    				Console.WriteLine("AuthCode = " + myReceipt.GetAuthCode());
    				Console.WriteLine("Complete = " + myReceipt.GetComplete());
    				Console.WriteLine("TransDate = " + myReceipt.GetTransDate());
    				Console.WriteLine("TransTime = " + myReceipt.GetTransTime());
    				Console.WriteLine("Ticket = " + myReceipt.GetTicket());
    				Console.WriteLine("TimedOut = " + myReceipt.GetTimedOut());
    				Console.WriteLine("CorporateCard = " + myReceipt.GetCorporateCard());
    				Console.WriteLine("MessageId = " + myReceipt.GetMessageId());
    			}
    			catch ( Exception e )
    			{
    				Console.WriteLine("e.StackTrace:"+e.StackTrace+",e.Message:"+e.Message);
    			}
    		}
    	}
    }
                    

    VS Purchal (Deprecated) Transaction Values

    VSPurchal data=new VSPurchal(order_id,txn_number,data2,data3);
    L23HttpsPostRequest request=new L23HttpsPostRequest(host, store_id, api_token, data);


    VS Purchal (Deprecated) mandatory values

    Value

    Type

    Limits

    Variable

    Description

    Order ID

    String

    50-character alphanumeric

    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.

    Transaction Number

    String

    255 – character

    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.

    VSPurchal

     

     

     

    Visa Level 2/3 Request Fields


    Visa Level 2/3 Request Fields

    Req

    Variable

    Value

    Limits

    Description

    N

    nationalTax

    National Tax

    12 N

    Indicates the amount of National Tax included in the transaction amount. For Canada, it is GST amount. Must contain 2 decimal places.

    N

    merchantVatNo

    Merchant’s Value Added Tax Registration Number

    20 A/N

    Contains the merchant’s VAT registration number or Single Business Reference Number (SBRN). For Canada, it is GST Number.

    N

    localTax

    Local Tax

    12 N

    Indicate the amount of state or provincial tax included in the transaction amount. For Canada, it is PST or QST. Must contain 2 decimal places.

    N

    customerVatNo

    Customer’s Value Added Tax Registration Number

    20 A/N

    Contains the customer’s value–added tax registration number

    N

    Cri

    Customer Reference Indentifier

    17 A/N

    Can contain a unique value to identify the client

    N/Y

    ticketNumber

    Ticket Number

    13 A/N

    Ticket number for Flight or Train. Mandatory – need it to be able to send Corpai/Corpas – Air/Rail Level 2/3 Data.

    N

    dutyAmount

    Duty Amount

    12 N

    The duty on the total purchase. Must contain 2 decimal places.

    N

    shipToPosCode

    Ship To Postal Code

    10 A/N

    The postal code or zip code where goods will be delivered

    N

    shipFromPosCode

    Ship From Postal Code

    10 A/N

    The postal code or zip code from which items were shipped

    N

    desCouCode

    Destination Country Code

    3 A/N

    The country code where goods will be delivered. Left justified with trailing spaces. ie. CAN-Canada.

    N

    vatRefNum

    VAT Reference Number

    15 N

    Unique Value Added Tax Invoice Reference Number

    Y/N

    itemComCode

    Item Commodity Code

    12 A/N

    Line item Comodity Code (if this field is not sent, then productCode must be sent)

    Y/N

    productCode

    Product Code

    12 A/N

    Line item Product Code (if this field is not sent, then itemComCode)

     

    If the order has a Freight/Shipping line item, the productCode value has to be “Freight/Shipping”. If the order has a Discount line item, the productCode value has to be “Discount”.

    Y

    itemDescription

    Item Description

    26 N

    Line item description

    Y

    ItemQuatity

    Item Quantity

    12 N

    Quantity of line item

    Y

    itemUofm

    Item Unit of Measure

    12 A/N

    Unit of Measure

    Y

    unitCost

    Unit Cost

    12 N

    Line item cost per unit. Must contain 2 decimal places.

    N

    vatTaxAmt

    GST/HST Amount

    12 N

    Amount of GST/HST for line item. (Do not include PST in the calculation)  Must contain 2 decimal places.

    N

    vatTaxRate

    GST/HST Rate

    4 N

    GST/HST rate applied to line item (Do not include PST in the calculation). May contain 2 decimal places.

    N

    discountAmt

    Discount Amount

    12 N

    The discountAmt can only be set when the product code is set to “Discount”. When the product code is set to “Discount” then discountAmt cannot be blank.  Must contain 2 decimal places.

    N

    orderLevelGst

    Order Level GST

    9 A/N

    The total Goods and Services Tax of the order. Must contain 2 decimal places. Old field – replaced by nationalTax

    N

    merchantGstNo

    Merchant GST Number

     

    The Merchant GST account number. Old field – replaced by merchantVatNo

    N

    OrderLevelPst

    Order Level PST

    9 A/N

    The total Provincial Sales Tax of the order. Must contain 2 decimal places. Old field – replaced by localTax

    N

    merchantPstNo

    Merchant PST Number

     

    The Merchant PST account number. Old field – replaced by customerVatNo

     

    Predecessors:
    • Pre-Authorization
    Successors:
  • VS Purchase Correction
  • VS Refund

  • Definition of Visa Corpais - Level 2/3 Request Fields

    Visa Purchasing Corporate Card Data Processing - Level 2 Request Fields

     

    Corporate Card Common Data (VSCompletion)

    Req

    Variable

    Value

    Limits

    Description

    Y

    nationalTax

    National Tax

     

    9 decimal

    Must reflect the amount of National Tax (GST or HST) appearing on the invoice.

    C

    merchantVatNo

    Merchant VAT Registration/ Single Business Reference Number

    20 A/N

    Merchant’s Tax Registration Number must be provided if tax is included on the invoice - If National Tax included then must not be all spaces or all zeroes.

     

    N

    localTax

    Local Tax

     

    9 decimal

    Must reflect the amount of Local Tax (PST or QST) appearing on the invoice.

    C

    localTaxNo

    PST Tax Registration Number

    15 A/N

    Merchant’s PST Tax Registration Number must be provided if tax is included on the invoice - If Local Tax included then must not be all spaces or all zeroes. Must be provided if Local Tax (PST or QST) applies

    N

    customerVatNo

    Customer VAT Registration Number

    20 A/N

    If the Customer’s Tax Registration Number appears on the invoice to support tax exempt transactions it must be provided here

    N

    Cri

    Customer Code/ Customer Reference Identifier (CRI)

     

    16 A/N

    16 character value which the customer may choose to provide to the supplier at the point of sale – must be provided if provided by the customer

     

    N

    customerCode

    Customer Code

    17 A/N

    Optional customer code field that will not be passed along to Visa, but will be included on Moneris reporting.

    N

    invoiceNumber

    Invoice Number

    17 A/N

    Optional invoice number field that will not be passed along to Visa, but will be included on Moneris reporting.



    Visa Purchasing Corporate Card Data Processing - Level 2 Request Fields

     

    Corporate Card Common Data (VSPurchaNew)

    Req

    Variable

    Value

    Limits

    Description

    N

    buyerName

    Buyer Name

    30 A/N

    Buyer/Receipient Name. Name required by CRA on transactions >$150.

    N

    localTaxRate

    Local Tax Rate

    4 numeric

    Indicates the detailed tax rate applied in relationship to a local tax amount. Like 8% PST should be 8.0. maximum 99.99.

    Must be provided if Local Tax (PST or QST) applies.

    N

    dutyAmount

    Duty Amount

    9 decimal

    Duty on total purchase amount.A minus sign means 'amount is a credit', plus sign or no sign means 'amount is a debit',maximum without sign is 999999.99

    N

    discountTreatment

    Inoice Discount Treatment

    1 N

    Fixed length 1 Numeric. Indicates how the merchant is managing discounts. Must be one of the following values:

    0 - if no invoice level discounts apply for this invoice;

    1 - if Tax was calculated on Post-Discount totals;

    2 - if Tax was calculated on Pre-Discount totals.

    N

    discountAmt

    Incoice Level Discount Amount

    9 decimal

    Amount of discount (if provided at the invoice level according to the Invoice Discount Treatment).

    Must be non-zero if Invoice Discount Treatment is 1 or 2. Minimum amount is 0.00 and maximum is 999999.99.

    N

    shipToPosCode

    Ship To Postal Code / Zip Code

    10 A/N

     

    The postal code or zip code where goods will be delivered. Destination postal code.

    Must be provided if shipment is involved - Full alpha postal code - Valid ANA<space>NAN format if shipping to an address within Canada.

    N

    shipFromPosCode

    Ship From Postal Code / Zip Code

    10 A/N

    The postal code or zip code from which items were shipped.

    Full alpha postal code for the merchant - Valid ANA<space>NAN format.

    N

    desCouCode

    Destination Country Code

    2 A/N

    Code of country where purchased goods will be delivered. If it appears on the invoice for an international transaction then it must be provided here. Must be valid 2-char country code.

    M

    vatRefNum

    Unique VAT Invoice Reference Number

    15 N

    Unique Value Added Tax Invoice Reference Number. Must be populated with the invoice number. Must not be all spaces or all zeroes.

    N

    taxTreatment

    Tax Treatment

    1 N

    Must be one of the following values:

    0 = Net Prices with tax calculated at line item level;

    1 = Net Prices with tax calculated at invoice level;

    2 = Gross prices given with tax information provided at line item level;

    3 = Gross prices given with tax information provided at invoice level;

    4 = No tax applies (small merchant) on the invoice for the transaction

    N

    freightAmount

    Freight/Shipping Amount (Ship Amount)

    9 decimal

    If shipping is not provided as a line item it must be provided here if applicable. Freight charges on total purchase. Signed monetary amount, minus sign means 'amount is a credit', plus sign or no sign means 'amount is a debit'. Maximum without sign is 999999.99. Example -1.00 or +2.00.

    N

    gstHstFreightRate

    GST HST Freight Rate

    4 decimal

    If Freight/Shipping Amount is provided then this (National GST or HST) tax rate must be provided.

    Rate of GST (excludes PST) or HST charged on the shipping amount (in accordance with the Tax Treatment). Monetary amount, maximum is 99.99. Such as 13% HST is 13.00

    N

    gstHstFreightAmount

    GST HST Freight Amount

    9 decimal

    If Freight/Shipping Amount is provided then this (National GST or HST) tax amount must be provided if taxTreatment is 0 or 2. Amount of GST (excludes PST) or HST charged on the shipping amount. Signed monetary amount, minus sign means 'amount is a credit', plus sign or no sign means 'amount is a debit'. Maximum without sign is 999999.99. Example -1.00 or +2.00.

     



    Visa Purchasing Corporate Card Data Processing - Level 3 Request Fields

     

    Line Item Details(VSPurchlNew)

    Req

    Variable

    Value

    Limits

    Description

    N

    itemComCode

    Item Commodity Code

    12 A/ N

    Line item Comodity Code (if this field is not sent, then productCode must be sent)

    N

    productCode

    Product Code

    12 A/N

    Line item Product Code (if this field is not sent, then itemComCode)

     

    If the order has a Freight/Shipping line item, the productCode value has to be “Freight/Shipping”. If the order has a Discount line item, the productCode value has to be “Discount”.

    N

    itemDescription

    Item Description

    35 A

    Line item description

    N

    itemQuantity

    Item Quantity

    5 A/N

    Quantity of line item

    N

    itemUom

    Item UOM

    3 A

    Unit of Measure

    N

    unitCost

    Unit Cost

    9 decimal

    Line item cost per unit. Must contain 2 decimal places.

    N

    vatTaxAmt

    VAT Tax Amount

    9 decimal

    Any value-added tax or other sales tax amount.

    N

    vatTaxRate

    VAT Tax Rate

    4 N

    The percentage of the sales tax. . Like 8% PST should be 8.0. Maximum 99.99.

    N

    discountTreatment

    Discount Treatment

    1 N

    Fixed length 1 Numeric. Must be one of the following values: 0 if no invoice level discounts apply for this invoice; 1 if Tax was calculated on Post-Discount totals; 2 if Tax was calculated on Pre-Discount totals.

    N

    discountAmtL

    Discount Amount

    9 decimal

    The discountAmt can only be set when the product code is set to “Discount”. When the product code is set to “Discount” then discountAmt cannot be blank.  Must contain 2 decimal places.

     


    Definition of Visa level 2/3 Request Fields Deprecated


    Visa Level 2/3 Request Fields

    Req

    Variable

    Value

    Limits

    Description

    N

    nationalTax

    National Tax

    12 N

    Indicates the amount of National Tax included in the transaction amount. For Canada, it is GST amount. Must contain 2 decimal places.

    N

    merchantVatNo

    Merchant’s Value Added Tax Registration Number

    20 A/N

    Contains the merchant’s VAT registration number or Single Business Reference Number (SBRN). For Canada, it is GST Number.

    N

    localTax

    Local Tax

    12 N

    Indicate the amount of state or provincial tax included in the transaction amount. For Canada, it is PST or QST. Must contain 2 decimal places.

    N

    customerVatNo

    Customer’s Value Added Tax Registration Number

    20 A/N

    Contains the customer’s value–added tax registration number

    N

    Cri

    Customer Reference Indentifier

    17 A/N

    Can contain a unique value to identify the client

    N/Y

    ticketNumber

    Ticket Number

    13 A/N

    Ticket number for Flight or Train. Mandatory – need it to be able to send Corpai/Corpas – Air/Rail Level 2/3 Data.

    N

    dutyAmount

    Duty Amount

    12 N

    The duty on the total purchase. Must contain 2 decimal places.

    N

    shipToPosCode

    Ship To Postal Code

    10 A/N

    The postal code or zip code where goods will be delivered

    N

    shipFromPosCode

    Ship From Postal Code

    10 A/N

    The postal code or zip code from which items were shipped

    N

    desCouCode

    Destination Country Code

    3 A/N

    The country code where goods will be delivered. Left justified with trailing spaces. ie. CAN-Canada.

    N

    vatRefNum

    VAT Reference Number

    15 N

    Unique Value Added Tax Invoice Reference Number

    Y/N

    itemComCode

    Item Commodity Code

    12 A/N

    Line item Comodity Code (if this field is not sent, then productCode must be sent)

    Y/N

    productCode

    Product Code

    12 A/N

    Line item Product Code (if this field is not sent, then itemComCode)

     

    If the order has a Freight/Shipping line item, the productCode value has to be “Freight/Shipping”. If the order has a Discount line item, the productCode value has to be “Discount”.

    Y

    itemDescription

    Item Description

    26 N

    Line item description

    Y

    ItemQuatity

    Item Quantity

    12 N

    Quantity of line item

    Y

    itemUofm

    Item Unit of Measure

    12 A/N

    Unit of Measure

    Y

    unitCost

    Unit Cost

    12 N

    Line item cost per unit. Must contain 2 decimal places.

    N

    vatTaxAmt

    GST/HST Amount

    12 N

    Amount of GST/HST for line item. (Do not include PST in the calculation)  Must contain 2 decimal places.

    N

    vatTaxRate

    GST/HST Rate

    4 N

    GST/HST rate applied to line item (Do not include PST in the calculation). May contain 2 decimal places.

    N

    discountAmt

    Discount Amount

    12 N

    The discountAmt can only be set when the product code is set to “Discount”. When the product code is set to “Discount” then discountAmt cannot be blank.  Must contain 2 decimal places.

    N

    orderLevelGst

    Order Level GST

    9 A/N

    The total Goods and Services Tax of the order. Must contain 2 decimal places. Old field – replaced by nationalTax

    N

    merchantGstNo

    Merchant GST Number

     

    The Merchant GST account number. Old field – replaced by merchantVatNo

    N

    OrderLevelPst

    Order Level PST

    9 A/N

    The total Provincial Sales Tax of the order. Must contain 2 decimal places. Old field – replaced by localTax

    N

    merchantPstNo

    Merchant PST Number

     

    The Merchant PST account number. Old field – replaced by customerVatNo