My Profile_


Transaction Flow 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-level 2/3 transactions outlined here.

  • When the Pre-Authorization response contains CorporateCard equal to true then you can submit the Visa transactions.
  • If CorporateCard is false then the card does not support Level 2/3 data, non Level 2/3 transactions are to be used. If the card is not a corporate card, please refer to Non-Level 2/3 transactions  for the appropriate non-corporate card transactions.

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 Visa transactions using the transaction set outlined in Non-Level 2/3 transactions

Pre-Authorization

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.

For a list of all possible pre-Authorization options, please refer to this section.

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 Non-Level 2/3 Transactions

Predecessors:
  • None
Successors:
  •  If CorporateCard is true and Level 2/3 data will be submitted
  •  Otherwise
    • Pre-Authorization Completion ( API | Batch File)
    • Vault Tokenize Credit Card ( API )

VS Completion

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

Note: Once you have completed this transaction successfully, to submit the complete supplemental level 2/3 data, please proceed to VS Corpais.

Canada Code Sample

package Level23;
import JavaAPI.*;

public class TestVsCompletion
{
	public static void main(String[] args)
	{
		String store_id = "moneris";
		String api_token = "hurgle";
		String processing_country_code = "CA";
		boolean status_check = false;
		
		String order_id="ord-210916-15:14:46";
		String comp_amount="5.00";
		String txn_number = "19002-0_11";
		String crypt="7";
		String national_tax = "1.23";
		String merchant_vat_no = "gstno111";
		String local_tax = "2.34";
		String customer_vat_no = "gstno999";
		String cri = "CUST-REF-002";
		String customer_code="ccvsfp";
		String invoice_number="invsfp";
		String local_tax_no="ltaxno";

		VsCompletion vsCompletion = new VsCompletion();
		vsCompletion.setOrderId(order_id);
		vsCompletion.setCompAmount(comp_amount);
		vsCompletion.setTxnNumber(txn_number);
		vsCompletion.setCryptType(crypt);
		vsCompletion.setNationalTax(national_tax);
		vsCompletion.setMerchantVatNo(merchant_vat_no);
		vsCompletion.setLocalTax(local_tax);
		vsCompletion.setCustomerVatNo(customer_vat_no);
		vsCompletion.setCri(cri);
		vsCompletion.setCustomerCode(customer_code);
		vsCompletion.setInvoiceNumber(invoice_number);
		vsCompletion.setLocalTaxNo(local_tax_no);

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

        try
        {
            Receipt receipt = mpgReq.getReceipt();

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

                

VS Completion - Transaction Values

vsCompletion vsCompletion = new vsCompletion();

HttpsPostRequest mpgReq = new HttpsPostRequest();

mpgReq.setTransaction(vsCompletion);

VSCompletion Object Mandatory Values

Value

Type

Limits

Variable

Description

Order ID

String

50-character alphanumeric

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

Transaction Number

String

255 – character

vsCompletion.setTxnNumber(txn_number);

Used when performing follow-on transactions. (That is, Completion, Purchase Correction or Refund.) This must be the value that was returned as the transaction number in the response of the original transaction.

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

E-Commerce indicator

String

1-character alphanumeric

vsCompletion.setCryptType(crypt);

Supported values are:

1 - Mail Order / Telephone Order—Single

2 - Mail Order / Telephone Order—Recurring

3 - Mail Order / Telephone Order—Instalment

4 - Mail Order / Telephone Order—Unknown classification

5 - Authenticated e-commerce transaction (VBV)

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

7 - SSL-enabled merchant

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

9 - SET non-authenticated transaction

 

Visa Purchasing Corporate Card Data Processing - Level 2 Request Fields

Corporate Card Common Data 

Required

Value

Limits

 Set Method

Description

Yes

National Tax

12-character decimal

vsCompletion.setNationalTax(national_tax);

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

Minimum -  0.01 

Maximum - 999999.99.

Must have 2 decimal places.

Yes

Merchant VAT Registration/ Single Business Reference Number

20-character alphanumeric

 

vsCompletion.setMerchantVatNo(merchant_vat_no);

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

Conditional

Local Tax

12-character decimal

 vsCompletion.setLocalTax(local_tax);

Must reflect the amount of Local Tax (PST or QST) appearing 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.

Minimum -  0.01 

Maximum - 999999.99.

Must have 2 decimal places.

Conditional

Local Tax (PST/QST) Registration Number

15-character alphanumeric


vsCompletion.setLocalTaxNo(local_tax_no);

Merchant's Local Tax (PST/QST) 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


Conditional

Customer VAT Registration Number

13-character alphanumeric

vsCompletion.setCustomerVatNo(customer_vat_no);

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

Conditional

Customer Code/ Customer Reference Identifier (CRI)

16-character alphanumeric

 vsCompletion.setCri(cri);

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

No

Customer Code

17-character alphanumeric

 vsCompletion.setCustomerCode(customer_code);

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

No

Invoice Number

17-character alphanumeric

 vsCompletion.setInvoiceNumber(invoice_number);

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

 

Predecessors:
Successors:

VS Forcepost

The VSForcepost 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.

Note: Once you have completed this transaction successfully, to submit the complete supplemental level 2/3 data, please proceed to VS Corpais.

Canada Code Sample

package Level23;
import JavaAPI.*;

public class TestVsForcePost
{
	public static void main(String[] args)
	{
		String store_id = "moneris";
		String api_token = "hurgle";
		String processing_country_code = "CA";
		boolean status_check = false;
		
		java.util.Date createDate = new java.util.Date(); 
		String order_id="Test"+createDate.getTime();
		String cust_id="CUST13343";
		String amount="5.00";
		String pan="4242424254545454";
		String expiry_date="2012"; //YYMM
		String auth_code="123456";
		String crypt="7";
		String national_tax = "1.23";
		String merchant_vat_no = "gstno111";
		String local_tax = "2.34";
		String customer_vat_no = "gstno999";
		String cri = "CUST-REF-002";
		String customer_code="ccvsfp";
		String invoice_number="invsfp";
		String local_tax_no="ltaxno";

		VsForcePost vsForcePost = new VsForcePost();
		vsForcePost.setOrderId(order_id);
		vsForcePost.setCustId(cust_id);
		vsForcePost.setAmount(amount);
		vsForcePost.setPan(pan);
		vsForcePost.setExpDate(expiry_date);
		vsForcePost.setAuthCode(auth_code);
		vsForcePost.setCryptType(crypt);
		vsForcePost.setNationalTax(national_tax);
		vsForcePost.setMerchantVatNo(merchant_vat_no);
		vsForcePost.setLocalTax(local_tax);
		vsForcePost.setCustomerVatNo(customer_vat_no);
		vsForcePost.setCri(cri);
		vsForcePost.setCustomerCode(customer_code);
		vsForcePost.setInvoiceNumber(invoice_number);
		vsForcePost.setLocalTaxNo(local_tax_no);

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

		try
		{
			Receipt receipt = mpgReq.getReceipt();

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

VSForcePost - Transaction Values

vsForcePost vsForcePost = new vsForcePost();

HttpsPostRequest mpgReq = new HttpsPostRequest();

mpgReq.setTransaction(vsForcePost);

vsForcePostObject Mandatory Values

Value

Type

Limits

Variable

Description

Order ID

String

50-character alphanumeric

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

vsForcePost.setAmount(amount);

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

Credit card number

String

20-character numeric

vsForcePost.setPan(pan);

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

Expiry date

String

4-character numeric
YYMM format.

vsForcePost.setExpDate(expdate);

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

Authorization code String 8-character alphanumeric vsForcePost.setAuthCode(auth_code); Authorization code provided in the transaction response from the issuing bank. This is required for Force Post transactions.

E-Commerce indicator

String

1-character alphanumeric

vsForcePost.setCryptType(crypt);

Supported values are:

1 - Mail Order / Telephone Order—Single

2 - Mail Order / Telephone Order—Recurring

3 - Mail Order / Telephone Order—Instalment

4 - Mail Order / Telephone Order—Unknown classification

5 - Authenticated e-commerce transaction (VBV)

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

7 - SSL-enabled merchant

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

9 - SET non-authenticated transaction


VS Force Post transaction object optional values

Value Type Limits Set method Description
Customer ID String 50-character alphanumeric

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


 

Visa Purchasing Corporate Card Data Processing - Level 2 Request Fields

Corporate Card Common Data 

Required

Value

Limits

 Set Method

Description

Yes

National Tax

12-character decimal

vsForcePost.setNationalTax(national_tax);

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

Minimum -  0.01 

Maximum - 999999.99.

Must have 2 decimal places.

Yes

Merchant VAT Registration/ Single Business Reference Number

20-character alphanumeric

 

vsForcePost.setMerchantVatNo(merchant_vat_no);

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

Conditional

Local Tax

12-character decimal

 vsForcePost.setLocalTax(local_tax);

Must reflect the amount of Local Tax (PST or QST) appearing 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.

Minimum -  0.01 

Maximum - 999999.99.

Must have 2 decimal places.

Conditional

Local Tax (PST/QST) Registration Number

15-character alphanumeric

 vsForcePost.setLocalTaxNo(local_tax_no);

Merchant's Local Tax (PST/QST) 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

Conditional

Customer VAT Registration Number

13-character alphanumeric

vsForcePost.setCustomerVatNo(customer_vat_no);

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

Conditional

Customer Code/ Customer Reference Identifier (CRI)

16-character alphanumeric

 vsForcePost.setCri(cri);

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

No

Customer Code

17-character alphanumeric

 vsForcePost.setCustomerCode(customer_code);

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

No

Invoice Number

17-character alphanumeric

 vsForcePost.setInvoiceNumber(invoice_number);

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

 

Predecessors:
  • Pre-Authorization completed on an independent system
Successors:

VS Purchase Correction

VS Completion and VS Force Post 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

package Level23;
import JavaAPI.*;

public class TestVsPurchaseCorrection
{
	public static void main(String[] args)
	{
		String store_id = "moneris";
		String api_token = "hurgle";
		String processing_country_code = "CA";
		boolean status_check = false;
		
		String order_id="Test1485208113189";
		String txn_number = "39793-0_11";
		String crypt="7";

		VsPurchaseCorrection vsPurchaseCorrection = new VsPurchaseCorrection();
		vsPurchaseCorrection.setOrderId(order_id);
		vsPurchaseCorrection.setTxnNumber(txn_number);
		vsPurchaseCorrection.setCryptType(crypt);

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

		try
		{
			Receipt receipt = mpgReq.getReceipt();

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

VS Purchase Correction - Transaction Values

VsPurchaseCorrection vsPurchaseCorrection = new VsPurchaseCorrection();

HttpsPostRequest mpgReq = new HttpsPostRequest();

mpgReq.SetTransaction(vsPurchaseCorrection);

VSPurchaseCorrection Object Mandatory Values

Value

Type

Limits

Variable

Description

Order ID

String

50-character alphanumeric

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

Transaction Number

String

255 – character

vsPurchaseCorrection.SetTxnNumber(txn_number);

Used when performing follow-on transactions. (That is, Completion, Purchase Correction or Refund.) This must be the value that was returned as the transaction number in the response of the original transaction.

 

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

E-Commerce indicator

String

1-character alphanumeric

vsPurchaseCorrection.SetCryptType(crypt);

Supported values are:

1 - Mail Order / Telephone Order—Single

2 - Mail Order / Telephone Order—Recurring

3 - Mail Order / Telephone Order—Instalment

4 - Mail Order / Telephone Order—Unknown classification

5 - Authenticated e-commerce transaction (VBV)

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

7 - SSL-enabled merchant

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

9 - SET non-authenticated transaction


Predecessors:
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.

Note: Once you have completed this transaction successfully, to submit the complete supplemental level 2/3 data, please proceed to VS Corpais.

Canada Code Sample

package Level23;
import JavaAPI.*;

public class TestVsRefund
{
	public static void main(String[] args)
	{
		String store_id = "moneris";
		String api_token = "hurgle";
		String processing_country_code = "CA";
		boolean status_check = false;
		
		String order_id="Test1485208133961";
		String amount="5.00";
		String txn_number = "39795-0_11";
		String crypt="7";
		String national_tax = "1.23";
		String merchant_vat_no = "gstno111";
		String local_tax = "2.34";
		String customer_vat_no = "gstno999";
		String cri = "CUST-REF-002";
		String customer_code="ccvsfp";
		String invoice_number="invsfp";
		String local_tax_no="ltaxno";

		VsRefund vsRefund = new VsRefund();
		vsRefund.setOrderId(order_id);
		vsRefund.setAmount(amount);
		vsRefund.setTxnNumber(txn_number);
		vsRefund.setCryptType(crypt);
		vsRefund.setNationalTax(national_tax);
		vsRefund.setMerchantVatNo(merchant_vat_no);
		vsRefund.setLocalTax(local_tax);
		vsRefund.setCustomerVatNo(customer_vat_no);
		vsRefund.setCri(cri);
		vsRefund.setCustomerCode(customer_code);
		vsRefund.setInvoiceNumber(invoice_number);
		vsRefund.setLocalTaxNo(local_tax_no);

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

		try
		{
			Receipt receipt = mpgReq.getReceipt();

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

                

VS Refund - Transaction Values

VsRefund vsRefund = new VsRefund();

HttpsPostRequest mpgReq = new HttpsPostRequest();

mpgReq.SetTransaction(vsRefund);

VS Refund Object Mandatory Values

Value

Type

Limits

Variable

Description

Order ID

String

50-character alphanumeric

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

Transaction Number

String

255 – character

vsRefund.SetTxnNumber(txn_number);

Used when performing follow-on transactions. (That is, Completion, Purchase Correction or Refund.) This must be the value that was returned as the transaction number in the response of the original transaction.

 

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

Amount

String

9-character decimal

vsRefund.SetAmount(amount);

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

E-Commerce indicator

String

1-character alphanumeric

vsRefund.SetCryptType(crypt);

Supported values are:

1 - Mail Order / Telephone Order—Single

2 - Mail Order / Telephone Order—Recurring

3 - Mail Order / Telephone Order—Instalment

4 - Mail Order / Telephone Order—Unknown classification

5 - Authenticated e-commerce transaction (VBV)

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

7 - SSL-enabled merchant

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

9 - SET non-authenticated transaction


 

Visa Purchasing Corporate Card Data Processing - Level 2 Request Fields

Corporate Card Common Data 

Required

Value

Limits

 Set Method

Description

Yes

National Tax

12-character decimal

vsRefund.SetNationalTax(national_tax);

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

Minimum -  0.01 

Maximum - 999999.99.

Must have 2 decimal places.

Yes

Merchant VAT Registration/ Single Business Reference Number

20-character alphanumeric

 

vsRefund.SetMerchantVatNo(merchant_vat_no);

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

Conditional

Local Tax

12-character decimal

 vsRefund.SetLocalTax(local_tax);

Must reflect the amount of Local Tax (PST or QST) appearing 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.

Minimum -  0.01 

Maximum - 999999.99.

Must have 2 decimal places.

Conditional

Local Tax (PST/QST) Registration Number

15-character alphanumeric

 vsRefund.SetLocalTaxNo(local_tax_no);

Merchant's Local Tax (PST/QST) 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

Conditional

Customer VAT Registration Number

13-character alphanumeric

vsRefund.SetCustomerVatNo(customer_vat_no);

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

Conditional

Customer Code/ Customer Reference Identifier (CRI)

16-character alphanumeric

 vsRefund.SetCri(cri);

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

No

Customer Code

17-character alphanumeric

 vsRefund.SetCustomerCode(customer_code);

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

No

Invoice Number

17-character alphanumeric

 vsRefund.SetInvoiceNumber(invoice_number);

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

 

Predecessors:
Successors:

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.

Note: Once you have completed this transaction successfully, to submit the complete supplemental level 2/3 data, please proceed to VS Corpais.

Canada Code Sample

package Level23;
import JavaAPI.*;

public class TestVsRefund
{
	public static void main(String[] args)
	{
		String store_id = "moneris";
		String api_token = "hurgle";
		String processing_country_code = "CA";
		boolean status_check = false;
		
		String order_id="Test1485208133961";
		String amount="5.00";
		String txn_number = "39795-0_11";
		String crypt="7";
		String national_tax = "1.23";
		String merchant_vat_no = "gstno111";
		String local_tax = "2.34";
		String customer_vat_no = "gstno999";
		String cri = "CUST-REF-002";
		String customer_code="ccvsfp";
		String invoice_number="invsfp";
		String local_tax_no="ltaxno";

		VsRefund vsRefund = new VsRefund();
		vsRefund.setOrderId(order_id);
		vsRefund.setAmount(amount);
		vsRefund.setTxnNumber(txn_number);
		vsRefund.setCryptType(crypt);
		vsRefund.setNationalTax(national_tax);
		vsRefund.setMerchantVatNo(merchant_vat_no);
		vsRefund.setLocalTax(local_tax);
		vsRefund.setCustomerVatNo(customer_vat_no);
		vsRefund.setCri(cri);
		vsRefund.setCustomerCode(customer_code);
		vsRefund.setInvoiceNumber(invoice_number);
		vsRefund.setLocalTaxNo(local_tax_no);

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

		try
		{
			Receipt receipt = mpgReq.getReceipt();

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

VS Independent Refund - Transaction Values

VsIndependentRefund vsIndependentRefund = new VsIndependentRefund();

HttpsPostRequest mpgReq = new HttpsPostRequest();

mpgReq.SetTransaction(vsIndependentRefund);

VS Independent Refund Object Mandatory Values

Value

Type

Limits

Variable

Description

Order ID

String

50-character alphanumeric

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

vsIndependentRefund.SetAmount(amount);

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

Credit card number

String

20-character numeric

vsIndependentRefund.SetPan(pan);

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

Expiry date

String

4-character numeric
YYMM format.

vsIndependentRefund.SetExpDate(expdate);

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

E-Commerce indicator

String

1-character alphanumeric

vsIndependentRefund.SetCryptType(crypt);

Supported values are:

1 - Mail Order / Telephone Order—Single

2 - Mail Order / Telephone Order—Recurring

3 - Mail Order / Telephone Order—Instalment

4 - Mail Order / Telephone Order—Unknown classification

5 - Authenticated e-commerce transaction (VBV)

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

7 - SSL-enabled merchant

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

9 - SET non-authenticated transaction

VS Independent Refund transaction object optional values

Value Type Limits Set method Description

Customer ID

String

50-character alphanumeric

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


 

Visa Purchasing Corporate Card Data Processing - Level 2 Request Fields

Corporate Card Common Data 

Required

Value

Limits

 Set Method

Description

Yes

National Tax

12-character decimal

vsIndependentRefund.SetNationalTax(national_tax);

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

Minimum -  0.01 

Maximum - 999999.99.

Must have 2 decimal places.

Yes

Merchant VAT Registration/ Single Business Reference Number

20-character alphanumeric

 

vsIndependentRefund.SetMerchantVatNo(merchant_vat_no);

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

Conditional

Local Tax

12-character decimal

 vsIndependentRefund.SetLocalTax(local_tax);

Must reflect the amount of Local Tax (PST or QST) appearing 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.

Minimum -  0.01 

Maximum - 999999.99.

Must have 2 decimal places.

Conditional

Local Tax (PST/QST) Registration Number

15-character alphanumeric

 vsIndependentRefund.SetLocalTaxNo(local_tax_no);

Merchant's Local Tax (PST/QST) 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

Conditional

Customer VAT Registration Number

13-character alphanumeric

vsIndependentRefund.SetCustomerVatNo(customer_vat_no);

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

Conditional

Customer Code/ Customer Reference Identifier (CRI)

16-character alphanumeric

 vsIndependentRefund.SetCri(cri);

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

No

Customer Code

17-character alphanumeric

 vsIndependentRefund.SetCustomerCode(customer_code);

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

No

Invoice Number

17-character alphanumeric

 vsIndependentRefund.SetInvoiceNumber(invoice_number);

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:

VS Corpais Corporate Card Common Data with Line Item Details

VSCorpais will contain all the required and optional data fields for Level 2/3 Purchasing Card Addendum 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, VSIndependentRefund) and the Corporate Card flag must be set to “true” in the Pre-authorization response. 

Canada Code Sample

package Level23;
import JavaAPI.*;

public class TestVsCorpais
{
	public static void main(String[] args)
	{
		String store_id = "moneris";
		String api_token = "hurgle";
		String processing_country_code = "CA";
		boolean status_check = false;
		
		String order_id="Test1485208069127";
		String txn_number="39791-0_11";

		String buyer_name = "Buyer Manager";
		String local_tax_rate = "13.00";
		String duty_amount = "0.00";
		String discount_treatment = "0";
		String discount_amt = "0.00";
		String freight_amount = "0.20";
		String ship_to_pos_code = "M8X 2W8";
		String ship_from_pos_code = "M1K 2Y7";
		String des_cou_code = "CAN";
		String vat_ref_num = "VAT12345";
		String tax_treatment = "3";//3 = Gross prices given with tax information provided at invoice level
		String gst_hst_freight_amount = "0.00";
		String gst_hst_freight_rate = "13.00";  

		String[] item_com_code = {"X3101", "X84802"};
		String[] product_code = {"CHR123", "DDSK200"};
		String[] item_description = {"Office Chair", "Disk Drive"};
		String[] item_quantity = {"3", "1"};
		String[] item_uom = {"EA", "EA"};
		String[] unit_cost = {"0.20", "0.40"};
		String[] vat_tax_amt = {"0.00", "0.00"};
		String[] vat_tax_rate = {"13.00", "13.00"};
		String[] discount_treatmentL = {"0", "0"};
		String[] discount_amtL = {"0.00", "0.00"};

		//Create and set VsPurcha
		VsPurcha vsPurcha = new VsPurcha();
		vsPurcha.setBuyerName(buyer_name);
		vsPurcha.setLocalTaxRate(local_tax_rate);
		vsPurcha.setDutyAmount(duty_amount);
		vsPurcha.setDiscountTreatment(discount_treatment);
		vsPurcha.setDiscountAmt(discount_amt);
		vsPurcha.setFreightAmount(freight_amount);
		vsPurcha.setShipToPostalCode(ship_to_pos_code);
		vsPurcha.setShipFromPostalCode(ship_from_pos_code);
		vsPurcha.setDesCouCode(des_cou_code);
		vsPurcha.setVatRefNum(vat_ref_num);
		vsPurcha.setTaxTreatment(tax_treatment);
		vsPurcha.setGstHstFreightAmount(gst_hst_freight_amount);
		vsPurcha.setGstHstFreightRate(gst_hst_freight_rate);

		//Create and set VsPurchl
		VsPurchl vsPurchl = new VsPurchl();
		vsPurchl.setVsPurchl(item_com_code[0], product_code[0], item_description[0], item_quantity[0], item_uom[0], unit_cost[0], vat_tax_amt[0], vat_tax_rate[0], discount_treatmentL[0], discount_amtL[0]);
		vsPurchl.setVsPurchl(item_com_code[1], product_code[1], item_description[1], item_quantity[1], item_uom[1], unit_cost[1], vat_tax_amt[1], vat_tax_rate[1], discount_treatmentL[1], discount_amtL[1]);
		
		VsCorpais vsCorpais = new VsCorpais();
		vsCorpais.setOrderId(order_id);
		vsCorpais.setTxnNumber(txn_number);
		vsCorpais.setVsPurch(vsPurcha, vsPurchl);

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

		try
		{
			Receipt receipt = mpgReq.getReceipt();

			System.out.println("CardType = " + receipt.getCardType());
			System.out.println("TransAmount = " + receipt.getTransAmount());
			System.out.println("TxnNumber = " + receipt.getTxnNumber());
			System.out.println("ReceiptId = " + receipt.getReceiptId());
			System.out.println("TransType = " + receipt.getTransType());
			System.out.println("ReferenceNum = " + receipt.getReferenceNum());
			System.out.println("ResponseCode = " + receipt.getResponseCode());
			System.out.println("ISO = " + receipt.getISO());
			System.out.println("BankTotals = " + receipt.getBankTotals());
			System.out.println("Message = " + receipt.getMessage());
			System.out.println("AuthCode = " + receipt.getAuthCode());
			System.out.println("Complete = " + receipt.getComplete());
			System.out.println("TransDate = " + receipt.getTransDate());
			System.out.println("TransTime = " + receipt.getTransTime());
			System.out.println("Ticket = " + receipt.getTicket());
			System.out.println("TimedOut = " + receipt.getTimedOut());
			System.out.println("CavvResultCode = " + receipt.getCavvResultCode());
		}
		catch (Exception e)
		{
			System.out.println(e);
		}
	}
}
                
Visa Level 2/3 VSCorpais – Corporate Card Common Data with Line Item Details - Transaction Values

VsCorpais vsCorpais = new VsCorpais();

HttpsPostRequest mpgReq = new HttpsPostRequest();

mpgReq.setTransaction(vsCorpais);

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

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

Transaction Number

String

255 – character

vsCorpais.setTxnNumber(txn_number);

Used when performing follow-on transactions. (That is, Completion, Purchase Correction or Refund.) This must be the value that was returned as the transaction number in the response of the original transaction.

 

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

VSPurcha

Object

Object

VsPurcha vsPurcha = new VsPurcha();

vsCorpais.setVsPurch(vsPurcha,vsPurchl);

Corporate Card Common Data. 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. For further details on how to populate this data see "Visa Purchasing Corporate Card Data Processing - Level 2 Request Fields" below. 

VSPurchl

Object

Object

VsPurchl vsPurchl = new VsPurchl();

vsCorpais.setVsPurch(vsPurcha,vsPurchl);

Line Item Details. 1-998 counts of VSPurchl line items can be submitted. This data set includes the details about each individual item or service purchased. For further details on how to populate this data see "Visa Purchasing Corporate Card Data Processing - Level 3 Request Fields" below.

 

Visa Purchasing Corporate Card Data Processing - Level 2 Request Fields

Corporate Card Common Data (VSPurcha)

Required

Value

Limits

Set Method

Description

Conditional*

Buyer Name

30-character alphanumeric

 vsPurcha.setBuyerName(buyer_name);

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

Conditional*

Local Tax Rate

4-character decimal

 vsPurcha.setLocalTaxRate(local_tax_rate);

Indicates the detailed tax rate applied in relationship to a local tax amount. For example, 8% PST should be 8.0. 

Minimum- 0.01

Maximum- 99.99

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

No

Duty Amount

9-character decimal

 vsPurcha.setDutyAmount(duty_amount);

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

Example- 1.00 or +2.00.

No

Invoice Discount Treatment

1-character numeric

 vsPurcha.setDiscountTreatment(discount_treatment);

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.

No

Invoice Level Discount Amount

9-character decimal

 vsPurcha.setDiscountAmt(discount_amt);

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

Conditional*

Ship To Postal Code / Zip Code

10-character alphanumeric

 

 vsPurcha.setShipToPostalCode(ship_to_pos_code);

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

*Required if shipment is involved

Full alpha postal code - Valid ANA<space>NAN format if shipping to an address within Canada.

Conditional*

Ship From Postal Code / Zip Code

10-character alphanumeric

 vsPurcha.setShipFromPostalCode(ship_from_pos_code);

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

*Required if shipment is involved 

For Canadian addresses,requires full alpha postal code for the merchant with Valid ANA<space>NAN format

Conditional*

Destination Country Code

2-character alphanumeric

 vsPurcha.setDesCouCode(des_cou_code);

Code of country where purchased goods will be delivered. Use ISO 3166-1 alpha-2 format. 

*Required if it appears on the invoice for an international transaction

Yes

Unique VAT Invoice Reference Number

15-character numeric

 vsPurcha.setVatRefNum(vat_ref_num);

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

Yes

Tax Treatment

1-character alphanumeric

 vsPurcha.setTaxTreatment(tax_treatment);

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

No

Freight/Shipping Amount (Ship Amount)

9-character decimal

 vsPurcha.setFreightAmount(freight_amount);

Freight charges on total purchase. 

If shipping is not provided as a line item it must be provided here, if applicable

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.

Conditional*

GST HST Freight Rate

4-character decimal

 vsPurcha.setGstHstFreightRate(gst_hst_freight_rate);

Rate of GST (excludes PST) or HST charged on the shipping amount (in accordance with the Tax Treatment). 

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

Monetary amount, maximum is 99.99. Such as 13% HST is 13.00

Conditional*

GST HST Freight Amount

9-character decimal

 vsPurcha.setGstHstFreightAmount(gst_hst_freight_amount);

Amount of GST (excludes PST) or HST charged on the shipping amount.

If Freight/Shipping Amount is provided then this (National GST or HST) tax amount must be provided if taxTreatment is 0 or 2.

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(VSPurchl)  

string[] item_com_code = {"X3101", "X84802"}; 

string[] product_code = {"CHR123", "DDSK200"};

string[] item_description = {"Office Chair", "Disk Drive"}; 

string[] item_quantity = {"3", "1"};

string[] item_uom = {"EA", "EA"}; 

string[] unit_cost = {"0.20", "0.40"};

string[] vat_tax_amt = {"0.00", "0.00"}; 

string[] vat_tax_rate = {"13.00", "13.00"};

string[] discount_treatmentL = {"0", "0"}; 

string[] discount_amtL = {"0.00", "0.00"};

Setting Purchl Line Item Details  

vsPurchl.setVsPurchl(item_com_code[0], product_code[0], item_description[0], item_quantity[0], item_uom[0], unit_cost[0], vat_tax_amt[0], vat_tax_rate[0], discount_treatmentL[0], discount_amtL[0]);

vsPurchl.setVsPurchl(item_com_code[1], product_code[1], item_description[1], item_quantity[1], item_uom[1], unit_cost[1], vat_tax_amt[1], vat_tax_rate[1], discount_treatmentL[1], discount_amtL[1]);

Required

Value

Limits

Variable

Description

Conditional

Item Commodity Code

12-character alphanumeric

item_com_code

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

Yes

Product Code

12-character alphanumeric

product_code

Product code for this line item – merchant’s product code, manufacturer’s product code or buyer’s product code.Typically this will be the SKU or identifier by which the merchant tracks and prices the item or service. This should always be provided for every line item.

Yes

Item Description

35-character alphanumeric

item_description

Line item description

Yes

Item Quantity

12-character decimal

item_quantity

Quantity invoiced for this line item up to 4 decimal places supported. Whole numbers are accepted. 

minimum - 0.0001

maximum -  999999999999

 Yes 

Item Unit of Measure

2-character alphanumeric

item_uom

Unit of Measure. Use 

ANSI X-12 EDI Allowable Units of Measure and Codes

Yes

Item Unit Cost

12-character decimal

unit_cost

Line item cost per unit. 2-4 decimal places accepted.

minimum -  0.0001

maximum -  999999.9999

No

VAT Tax Amount

12-character decimal

vat_tax_amt

Any value-added tax or other sales tax amount. Must have 2 decimal places.

Minimum - 0.01

Maximum -  999999.99

No

VAT Tax Rate

4-character decimal

vat_tax_rate

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

Yes

Discount Treatment

1-character numeric

discount_treatmentL

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.

Conditional

Discount Amount

12-character decimal

discount_amtL

Amount of discount, if provided for this line item according to the Line Item Discount Treatment. Must be non-zero if Line Item Discount Treatment is 1 or 2. Must have 2 decimal places.

Minimum - 0.01

Maximum -  999999.99

 


If shipping is not provided as a line item it must be provided here if applicable. 

Predecessors:
Successors: