Reprint transaction receipts
The CloverConnector#DisplayReceiptOptions
method displays the Clover device on the receipt selection screen. This allows the merchant to reprint a receipt for a transaction if needed for record keeping or other purposes.
The DisplayReceiptOptionsRequest
passed in to the call must include a specific combination of identifier (ID) values depending on the transaction type.
PaymentId | OrderId | RefundId | CreditId | |
---|---|---|---|---|
Payment | ✅ | ✅ | ||
Full refund | ✅ | ✅ | ✅ | |
Partial refund | ✅ | ✅ | ✅ | |
Manual refund (credit) | ✅ | ✅ |
Payment receipts
The receipt for any type of payment is reprinted by calling CloverConnector#DisplayReceiptOptions
with a PaymentId
and OrderId
.
function showReceiptsPayment() {
var dror = new DisplayReceiptOptionsRequest();
dror.setPaymentId(this.payment.PaymentId);
dror.setOrderId(this.payment.OrderId);
this.cloverConnector.displayReceiptOptions(dror);
}
Refund and credit receipts
Clover supports three types of refunds:
- Full payment refunds
- Partial payment refunds
- Manual refunds (credits)
For example, if you want to display receipt options for a full refund, call CloverConnector#DisplayReceiptOptions
with a PaymentId
and OrderId
, as well as the RefundId
of the transaction you want to reprint.
function showReceiptsRefund() {
var dror = new DisplayReceiptOptionsRequest();
dror.setPaymentId(this.payment.PaymentId);
dror.setOrderId(this.payment.OrderId);
dror.setRefundId(this.payment.RefundId);
this.cloverConnector.displayReceiptOptions(dror);
}
For a partial refund, you also need to include a PaymentId
, OrderId
, and the RefundId
of the transaction.
function showReceiptsPartialRefund() {
var dror = new DisplayReceiptOptionsRequest();
dror.setPaymentId(this.payment.PaymentId);
dror.setOrderId(this.payment.OrderId);
dror.setRefundId(this.payment.RefundId);
this.cloverConnector.displayReceiptOptions(dror);
}
When a manual refund is processed, a CreditId
is generated that uniquely identifies the transaction. To reprint the receipt for this refund you need to include the OrderId
and the CreditID
.
function showReceiptsManualRefund() {
var dror = new DisplayReceiptOptionsRequest();
dror.setOrderId(this.payment.OrderId);
dror.setCreditId(this.payment.CreditId);
this.cloverConnector.displayReceiptOptions(dror);
}
Updated 10 months ago