Handle voids and refunds

United States
Canada
Europe
Latin America

Merchants often need to void or refund a transaction. The Remote Pay software development kits (SDKs) provide methods to start that process on a customer-facing Clover device connected to your point of sale (POS).

Transaction voids and refunds are of three types:

Transaction typeCorresponding CloverConnector method
VoidvoidPayment
RefundrefundPayment
Manual refundmanualRefund

In the following explanations, the sample code is from the Remote Pay Android Example POS and uses the following common codes:

  • An ICloverConnector that accepts chained method calls to a getCloverConnector() call that initiates the request.
  • A store object that sets the merchant context for retrieving settings before sending requests to the device.

Void

Merchants use voids in various businesses to correct mistakes or cancel a recent sale. Voids undo two types of transactions.

  • Sales
  • Pre-authorizations

A void applies to cancel a sale for 25 minutes of the original transaction. The merchant can only refund the customer when the time elapses because the transaction goes through the funding process. If a void is attempted after 25 minutes, Clover processes it as a refund.

To void a payment, the VoidPaymentRequest must reference a specific payment and order, and the reason for voiding the payment (USER_CANCEL).

public void voidPayment(){
    VoidPaymentRequest vpr = new VoidPaymentRequest();
    vpr.setPaymentId(transaction.getId());
    vpr.setOrderId(((POSPayment)transaction).getCloverOrderId());
    vpr.setVoidReason("USER_CANCEL");
    vpr.setDisableReceiptSelection(store.getDisableReceiptOptions() != null ? store.getDisableReceiptOptions() : false);
    vpr.setDisablePrinting(store.getDisablePrinting() != null ? store.getDisablePrinting() : false);
    Log.d(TAG, "VoidPaymentRequest: " + vpr.toString());
    getCloverConnector().voidPayment(vpr);
  }

Refund

A refund is a partial or complete repayment given to a customer for a specific order by calling refundPayment(). For example, a retail customer may want to return an article of clothing that did not fit as expected.

Full refund

To completely refund a payment, set the fullRefund field to true. The RefundPaymentRequest must also reference a specific payment and order.

public void makeFullRefund() {
    RefundPaymentRequest refund = new RefundPaymentRequest();
    refund.setPaymentId(transaction.getId());
    refund.setOrderId(((POSPayment)transaction).getCloverOrderId());
    refund.setFullRefund(true);
    final ICloverConnector cloverConnector = cloverConnectorWeakReference.get();
    Log.d(TAG, "RefundPaymentRequest - Full: " + refund.toString());
    cloverConnector.refundPayment(refund);
}

Partial refund

To partially refund a payment, the RefundPaymentRequest must also reference a specific payment and order. Then, set the fullRefund field to false, and set the amount as the number of cents to be refunded.

public void makePartialRefund(long amount) {
    RefundPaymentRequest refund = new RefundPaymentRequest();
    refund.setAmount(amount);
    refund.setPaymentId(transaction.getId());
    refund.setOrderId(((POSPayment)transaction).getCloverOrderId());
    refund.setFullRefund(false);
    refund.setDisablePrinting(store.getDisablePrinting() != null ? store.getDisablePrinting() : false);
    refund.setDisableReceiptSelection(store.getDisableReceiptOptions() != null ? store.getDisableReceiptOptions() : false);
    final ICloverConnector cloverConnector = cloverConnectorWeakReference.get();
    Log.d(TAG, "RefundPaymentRequest - Partial: " + refund.toString());
    cloverConnector.refundPayment(refund);
  }

Manual refund

A manual refund occurs when a merchant refunds an amount without an associated sale or order. This type of refund is also known as credit, unmatched refund, unreferenced refund, or naked refund.

Note the following:

  • Every merchant account has a default total cumulative daily limit on manual refunds. If the merchant exceeds the daily limit, the system declines the refunds. The merchant must contact Clover Support to upgrade the unmatched refund daily limit.
  • Manual refunds can be processed in any number of transactions. However, the refund amount must be within the daily limit.
  • Manual refund must include an externalPaymentId to maintain a refund record between the point of sale (POS) and the Clover system. See Track transactions with external IDs for more information.
  • Manual refunds can be processed only when the Clover device is online.
  • Manual refunds are available only in North America and Europe, and not in Latin America.