question

david06n avatar image
david06n asked david06n answered

How to have to Clover Mini print Tip and Total lines on receipts

Hello,

When I directly enter a sale on CloverMini, the receipt printed out has two lines "Tip ......" and "Total ...." for customers to write their tip amount and total.
But when I request a sale from my webapp via Cloud Pay Display api, receipts don't have those two lines. How can I make CloverMini print those two lines?

Thanks!

Harry


Here's my code:
let request = new sdk.remotepay.SaleRequest();
let externalPaymentID = Clover.CloverID.getNewId();
request.setExternalId(externalPaymentID);
let payingAmount: number = 1000;
request.setAmount(Math.round(payingAmount * 100));
request.setTaxAmount(0);
request.setAllowOfflinePayment(true);
request.setForceOfflinePayment(false);
request.setApproveOfflinePaymentWithoutPrompt(false);
request.setCardEntryMethods(Clover.CardEntryMethods.ALL);
request.setSignatureEntryLocation(sdk.payments.DataEntryLocation.ON_PAPER);
request.setSignatureThreshold(1);
request.setTipAmount(null);
request.setTipMode(sdk.payments.TipMode.ON_PAPER);
request.setTippableAmount(payingAmount);
request.setDisablePrinting(false);
request.setDisableReceiptSelection(false);
request.setDisableDuplicateChecking(false);
request.setAutoAcceptPaymentConfirmations(false);
request.setAutoAcceptSignature(true);
this.cloverConnector.sale(saleRequest);
Clover MiniPrint
10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Mark Mullan avatar image
Mark Mullan Deactivated answered
Hi @David06n,

Thanks for reaching out, and good question.

A Sale is defined as a transaction that cannot be tip adjusted after the card has been swiped. The tip amount must be added to the transaction total before the card gets dipped/swiped/etc. The SaleRequest is ignoring your setTipMode(DataEntryLocation.ON_PAPER) because that would make it inherently not a Sale.

You're looking for the AuthRequest class. Auths can be tip adjusted after the initial card transaction. Make an AuthRequest instead of a SaleRequest, and then take a look at cloverConnector.tipAdjustAuth() to actually apply the tipAmount to the transaction.

Hope this helps,
Mark
10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

david06n avatar image
david06n answered
Thanks Mark! That definitely helped me. I got the two lines on receipts now.
10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Welcome to the
Clover Developer Community