4D Payments SDK 2016 .NET Edition
4D Payments SDK 2016 .NET Edition
Questions / Feedback?

TSYSLevel3 Component

Properties   Methods   Events   Configuration Settings   Errors  

The TSYSLevel3 component is a tool used to create Level3 Corporate Purchasing Card addendum aggregates, which can then be passed to the TSYSSETTLE component and settled.

Syntax

DPayments.DPaymentsSDK.Tsyslevel3

Remarks

This TSYSLevel3 component creates Level III addendum data, which can be sent in the settlement to achieve a better interchange rate when accepting corporate purchasing cards. The Level III addendum allows the merchant to send very detailed information about every item that was purchased by the card holder, as well as tax and shipping information.

This component creates a different addendum aggregate based on the CardType. Visa and MasterCard addendums differ slightly, and therefore a slightly different set of properties are required for each.

The following fields are valid for both ctVisa and ctMasterCard CardTypes.

Additional fields for the ctVisa CardType include:

Additional fields for the ctMasterCard CardType include:

The following example illustrates how to build a Level III addendum for the ctVisa CardType:

  // First authorize the credit card
  TSYSECommerce1.TransactionAmount = "53";
  TSYSECommerce.Authorize();
  
  // Then, put the result into the settlement component
  TSYSSettle.DetailRecords.Add(new TSYSRecordType());
	TSYSSettle.DetailRecords[0].DetailAggregate = TSYSECommerce.GetDetailAggregate();  

  // Now build the Level3 Extension. 
  // The following properties are required for a Visa Corporate Purchasing Card:
  TSYSLevel3.CardType = ctVisa;
  TSYSLevel3.LocalTax = "EXEMPT";
  TSYSLevel3.NationalTax = "0";
  TSYSLevel3.PurchaseOrder = "purchOrdNum";
  TSYSLevel3.MerchantTaxId = "merchantTaxId";
  TSYSLevel3.CustomerTaxId = "customerTaxId";
  TSYSLevel3.CommodityCode = "fake";
  TSYSLevel3.DiscountAmount = "0";
  TSYSLevel3.FreightAmount = "0";
  TSYSLevel3.DutyAmount = "0";
  TSYSLevel3.DestinationZip = "27709";
  TSYSLevel3.ShipFromZip = "27709";
  TSYSLevel3.DestinationCountry = "840";
  TSYSLevel3.TaxInvoiceNumber = "VATInvoiceRefNo";
  TSYSLevel3.OrderDate = "060526";
  TSYSLevel3.FreightTaxAmount = "0";
  TSYSLevel3.FreightTaxRate = "0";
  
  // Begin adding line items:  
  
	TSYSLevel3.LineItems.Add(new TSYSLineItem());
  TSYSLevel3.LineItems[0].CommodityCode = "fake";
  TSYSLevel3.LineItems[0].Description = "hardware";
  TSYSLevel3.LineItems[0].ProductCode = "productCode123";
  TSYSLevel3.LineItems[0].Quantity = 1;
  TSYSLevel3.LineItems[0].Units = "";
  TSYSLevel3.LineItems[0].UnitCost = "33";
  TSYSLevel3.LineItems[0].TaxAmount = "0";
  TSYSLevel3.LineItems[0].TaxRate = "0";
  TSYSLevel3.LineItems[0].DiscountAmount = "0";
  TSYSLevel3.LineItems[0].Total = "33";
  
	TSYSLevel3.LineItems.Add(new TSYSLineItem());
  TSYSLevel3.LineItems[1].CommodityCode = "fake";
  TSYSLevel3.LineItems[1].Description = "hardware";
  TSYSLevel3.LineItems[1].ProductCode = "productCode124";
  TSYSLevel3.LineItems[1].Quantity = 1;
  TSYSLevel3.LineItems[1].Units = "";
  TSYSLevel3.LineItems[1].UnitCost = "20";
  TSYSLevel3.LineItems[1].TaxAmount = "0";
  TSYSLevel3.LineItems[1].TaxRate = "0";
  TSYSLevel3.LineItems[1].DiscountAmount = "0";
  TSYSLevel3.LineItems[1].Total = "20";
  
  // Finally, add the Level3 addendum to the same index in the settlement.
	TSYSSettle.DetailRecords[0].AddendumAggregate = TSYSLevel3.GetAddendum();

A Level III addendum for the ctMasterCard CardType is constructed similarly:


  'First authorize the credit card
  TSYSECommerce1.TransactionAmount = "200"
  TSYSECommerce.Authorize()
  
  'Then, put the result into the settlement component
  TSYSSettle.DetailRecordCount = 2
  TSYSSettle.DetailAggregate[1] = TSYSECommerce.GetDetailAggregate()

  'Now build the Level3 Extension. 
  TSYSLevel3.cardType = ctMasterCard
  TSYSLevel3.LocalTax = "EXEMPT"
  TSYSLevel3.NationalTax = "0"
  TSYSLevel3.PurchaseOrder = "cardholderRefId"
  TSYSLevel3.FreightAmount = "0"
  TSYSLevel3.DutyAmount = "0"
  TSYSLevel3.DestinationZip = "27709"
  TSYSLevel3.ShipFromZip = "27709"
  TSYSLevel3.DestinationCountry = "USA"
  TSYSLevel3.AlternateTaxAmount = "0"
  TSYSLevel3.AlternateTaxId = "altTaxId"
  
  'Begin adding line items:
	
  
	TSYSLevel3.LineItems.Add(new TSYSLineItem());
	TSYSLevel3.LineItems[0].
	TSYSLevel3.LineItems[0].Description = "bolt"
  TSYSLevel3.LineItems[0].ProductCode = "BOLT6x20"
  TSYSLevel3.LineItems[0].Quantity = 2
  TSYSLevel3.LineItems[0].Units = "each"  
  TSYSLevel3.LineItems[0].TaxRate = "0"
  TSYSLevel3.LineItems[0].TaxType = "taxType"
  TSYSLevel3.LineItems[0].TaxAmount = "0"
  TSYSLevel3.LineItems[0].DiscountAmount = "0"
  TSYSLevel3.LineItems[0].TaxIncluded = False
  TSYSLevel3.LineItems[0].Total = "100"
  TSYSLevel3.LineItems[0].DiscountAmount = "0"
  TSYSLevel3.LineItems[0].DiscountRate = "0"

	TSYSLevel3.LineItems.Add(new TSYSLineItem());
  
  TSYSLevel3.LineItems[1].Description = "flange nut"
  TSYSLevel3.LineItems[1].ProductCode = "FLANGE6"
  TSYSLevel3.LineItems[1].Quantity = 1
  TSYSLevel3.LineItems[1].Units = "each"  
  TSYSLevel3.LineItems[1].TaxRate = "0"
  TSYSLevel3.LineItems[1].TaxType = "taxType"
  TSYSLevel3.LineItems[1].TaxAmount = "0"
  TSYSLevel3.LineItems[1].DiscountAmount = "0"
  TSYSLevel3.LineItems[1].TaxIncluded = False
  TSYSLevel3.LineItems[1].Total = "100"
  TSYSLevel3.LineItems[1].DiscountAmount = "0"
  TSYSLevel3.LineItems[1].DiscountRate = "0"

	// Finally, add the Level3 addendum to the same index in the settlement.  
	TSYSSettle1.DetailRecords[1].AddendumAggregate = TSYSLevel3.GetAddendum();
	

Note that while Level3 addendum data is only applicable to corporate purchasing cards, however you may send Level3 data for all Visa and Master Card cards if you wish.

Property List


The following is the full list of the properties of the component with short descriptions. Click on the links for further details.

AlternateTaxAmountSecondary tax amount (only applicable in some countries).
AlternateTaxIdTax Id number of the merchant that reported the AlternateTaxAmount .
CardTypeThe card type for which a Level2 or Level3 addendum will be created.
CommodityCodeCode indicating the type of goods or services sold.
CustomerTaxIdCustomer's Value Added Tax registration number.
DestinationCountryCountry the goods are to be shipped to.
DestinationZipZip code the goods are to be shipped to.
DiscountAmountAmount of any discount subtracted from the line item totals.
DutyAmountDuty fees (if any) for imported goods.
FreightAmountShipping charges associated with this transaction.
FreightTaxAmountPortion of the FreightAmount that is tax.
FreightTaxRateRate used to calculate the FreightTaxAmount .
LineItemsA collection of line items to be included in the Level III addendum.
LocalTaxAmount of local or state taxes that are a part of this transaction.
MerchantTaxIdMerchant's government tax Id number.
NationalTaxAmount of federal or national taxes that are a part of this transaction.
OrderDateDate of the order in YYMMDD format.
PurchaseIdentifierOptional purchase order number assigned by the merchant.
PurchaseOrderPurchase Order Number supplied by the cardholder.
ShipFromZipZip code the goods are being shipped from.
TaxInvoiceNumberUnique Value Added Tax Invoice Reference Number.

Method List


The following is the full list of the methods of the component with short descriptions. Click on the links for further details.

ConfigSets or retrieves a configuration setting .
GetAddendumReturns a Level III Purchasing card addendum based on the specified CardType .
ResetClears all properties to their default values.

Event List


The following is the full list of the events fired by the component with short descriptions. Click on the links for further details.

ErrorInformation about errors during data delivery.

Configuration Settings


The following is a list of configuration settings for the component with short descriptions. Click on the links for further details.

UseFractionalQuantitiesAllows the use of fractional quantities in the ItemQuantity property.
GUIAvailableTells the component whether or not a message loop is available for processing events.
UseBackgroundThreadWhether threads created by the component are background threads.
UseInternalSecurityAPITells the component whether or not to use the system security libraries or an internal implementation.

 
 
Copyright (c) 2020 4D Payments Inc. - All rights reserved.
4D Payments SDK 2016 .NET Edition - Version 16.0 [Build 7502]