Using Per-Transaction Settings

Beginning with version 1.2.0 of the SDK, you can override certain merchant-level settings for specific transactions. These Per-Transaction Settings give you greater control over tips, signatures, receipts, duplicate transaction logic, offline paymentspayment confirmations, and other functionality. Per-Transaction Settings work for all subclasses of TransactionRequest.

Important

To use Per-Transaction Settings, you will need to instantiate a subclass of TransactionRequest (i.e. SaleRequest, AuthRequest, or PreAuthRequest).

Tips

TipMode (TipMode enum)

The tipMode setting on SaleRequest specifies the location from which to accept the tip. You can also omit the tip. Possible values include:

Value Description
TIP_PROVIDED The tip amount is included in the request.
ON_SCREEN_BEFORE_PAYMENT The tip is taken on the Clover device’s screen before payment. This setting is valid when a Sale is requested by a Clover Mini or Clover Mobile.
ON_SCREEN_AFTER_PAYMENT The tip is taken on the Clover device’s screen after payment. This setting is valid when a Sale is requested by a Clover Station.
NO_TIP A tip will not be requested for the payment.

To specify that the tip is included in the request, you would use:

saleRequest.TipMode = TipMode.TIP_PROVIDED;

To override the merchant setting Ask for tip: Enabled, use:

saleRequest.TipMode = TipMode.NO_TIP;

TippableAmount (Long)

This option sets the total amount to use when calculating tips.

saleRequest.TippableAmount = 2000L;


Signatures

SignatureThreshold (Long)

This setting enables you to override the merchant-level Signature Threshold, which sets a minimum amount for requiring a signature in cents.

For example, to require a signature for any transaction greater than $25.00, set the SignatureThreshold to 2500.

saleRequest.SignatureThreshold = 2500;

To require a signature for any amount, set the SignatureThreshold to 0.

saleRequest.SignatureThreshold(0);

You can also set the SignatureEntryLocation Per-Transaction Setting to NONE to override the Signature Threshold entirely so that a signature is never required.

SignatureEntryLocation (DataEntryLocation enum)

This setting enables you to override the merchant-level Signature Entry Location. The possible values are:

Value Description
ON_SCREEN Takes the signature on the Clover device’s screen.
ON_PAPER Takes the signature on the paper receipt.
NONE Skips the signature request for the specified transaction.

For example, to force the Clover device to take the signature on-screen, you would use:

saleRequest.SignatureEntryLocation = DataEntryLocation.ON_SCREEN;

AutoAcceptSignature (Boolean)

This setting enables you to automatically accept a signature (on screen or on paper) for the given transaction, if applicable. The override prevents the SDK from transmitting signature confirmation requests back to the calling program. The transaction continues processing as if the caller initiated an acceptSignature() request.

saleRequest.AutoAcceptSignature = true;


Receipts

DisableReceiptSelection (Boolean)

This setting bypasses the customer-facing receipt selection screen. For example, you may want to use this setting if you plan to print receipts from a non-Clover printer.

saleRequest.DisableReceiptSelection = true;


Duplicate Checking

DisableDuplicateChecking (Boolean)

This option bypasses logic that checks for potential duplicate transactions (payments made with the same card type and last four digits within the same hour) and asks the merchant to confirm acceptance of the payments.

Disabling duplicate checking will make your transactions faster. However, you should only implement this setting if you’re willing to accept the risk associated with a potential duplicate payment.

saleRequest.DisableDuplicateChecking = true;


Offline Payments

AllowOfflinePayment (Boolean)

Offline payments are taken without a network or Wi-Fi connection. In these cases, the Clover device is unable to verify with the payment gateway that the card is both valid and has sufficient funds.

By default, offline payments are disabled. Setting AllowOfflinePayment to true will enable merchants to take offline payments. You should only implement this setting if merchants are willing to accept the risk associated with offline payments.

Note that an offline payment will trigger a Challenge and an OnConfirmPaymentRequest() asking the merchant to confirm acceptance of the payment (and the risk associated with it). You can choose to confirm offline and potential duplicate payments automatically through the AutoAcceptPaymentConfirmations Per-Transaction Setting.

saleRequest.AllowOfflinePayment = true;

ForceOfflinePayment (Boolean)

This setting allows merchants to take payments offline, regardless of connection status.

saleRequest.ForceOfflinePayment = true;

ApproveOfflinePaymentWithoutPrompt (Boolean)

When the value for this setting is true, offline payments will be approved without a prompt.

saleRequest.ApproveOfflinePaymentWithoutPrompt = true;


Payment Confirmations

AutoAcceptPaymentConfirmations (Boolean)

This setting enables you to automatically accept any payment confirmation requests triggered by challenges encountered at the payment gateway (e.g. an offline payment or potential duplicate payment). The override prevents the SDK from transmitting payment confirmation requests back to the calling program. The transaction continues processing as if the caller initiated a confirmPayment() request.

Automatically accepting payment confirmation requests will make your transactions faster. However, you should only implement this setting if you’re willing to accept the risk associated with offline payments and potential duplicate payments.

saleRequest.AutoAcceptPaymentConfirmations = true;


Other

DisableCashback (Boolean)

This setting disables cashback functionality.

saleRequest.DisableCashback = true;

DisablePrinting (Boolean)

This setting disables automatic printing of receipts for transactions.

saleRequest.DisablePrinting = true;

DisableRestartTransactionOnFail (Boolean)

This setting prevents the Clover device from restarting a transaction that times out or is declined.

saleRequest.DisableRestartTransactionOnFail = true;

CardEntryMethods

This option sets the card entry methods the merchant accepts. If this parameter is null, the default values (CARD_ENTRY_METHOD_MAG_STRIPE, CARD_ENTRY_METHOD_ICC_CONTACT, and CARD_ENTRY_METHOD_NFC_CONTACTLESS) will be used.

saleRequest.CardEntryMethods = CloverConnector.CARD_ENTRY_METHOD_ICC_CONTACT | CloverConnector.CARD_ENTRY_METHOD_MAG_STRIPE | CloverConnector.CARD_ENTRY_METHOD_NFC_CONTACTLESS;