4D Payments SDK 2016 .NET Edition

Questions / Feedback?

Gratuity Property

Gratuity amount for settling restaurant/retail industry transactions.


public string Gratuity { get; set; }
Public Property Gratuity As String

Default Value



This field contains the gratuity (tip) amount of the transaction being settled. This amount is only sent when the TSYSSettle component's IndustryType is set to "sitRestaurant", "sitRetail " or "sitGroceryStore".

For transactions with Tip at the time of sale, the value of TransactionAmount in the original authorization request must reflect the cost of the goods/service purchased plus this Gratuity amount.

For example, to add a gratuity at the time of sale:

  //Cost of goods/services purchased is $10 and Gratuity/Tip amount is $2
  TSYSRetail.TransactionAmount = "1200" //$12
  //SettlementAmount in the Detail Record equals the original authorized amount $12
  DetailRecord.Gratuity = "200" //Indicates the Gratuity/Tip included at the time of sale $2
  TSYSSettle.DetailAggregate[0] = DetailRecord.GetDetailAggregate()

For Tip Adjusts (transactions where Gratuity/Tip is included after the time of sale), the SettlementAmount must reflect the total of the AuthorizedAmount plus the Gratuity.

For example, to perform a Tip Adjust/adding the gratuity after the time of sale:

  //Cost of goods/services purchased is $10;
  TSYSRetail.TransactionAmount = "1000" 
  DetailRecord.Gratuity = "200" //Indicates the Gratuity/Tip added after the time of Sale $2
  //SettlementAmount must include the tip, therefore it is higher than the original AuthorizedAmount
  DetailRecord.SettlementAmount = DetailRecord.AuthorizedAmount + DetailRecord.Gratuity
  TSYSSettle.DetailAggregate[0] = DetailRecord.GetDetailAggregate()

This amount is to be presented with an implied decimal point. For example, US $10.00 must be represented as 1000, and $0.10 is likewise simply 10. The allowable number of significant digits as well as the positioning of any implied decimal point is dictated by the designated CurrencyCode configuration setting. In the United States (default), the number of allowable significant digits is seven. Thus the maximum TransactionAmount is "9999999", yielding a US dollar amount of $99,999.99. This field may not contain a negative number.

NOTE: TSYS does not support Credit/Debit transactions containing both CashOver/CashBack and Gratuity/Tip amounts.

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