question

wpostma avatar image
wpostma asked David Marginian Deactivated edited

Voiding a Partial Approval or Preventing Partial Authorization

A similar question asked about partial auths:

https://community.clover.com/questions/2296/can-i-turn-partial-authorizations-off.html

The answer (no) is disappointing. The custom third party android app does a payment intent launch, the clover device accepts a card, returns partial approval of the $100 bill. Now $50 is charged to the customer and $50 is owing. We must now void that $50 charge, or get $50 more from this person. Either way is a complex and error prone process.

How can we void the partial, and how can we prevent this partial case if we want to disallow partial payments, and if the answer in 2019 is still NO you can't do this, can we please request that this be fixed/corrected. It's highly problematic for our use cases.



PaymentConnector
10 |2000

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

1 Answer

David Marginian avatar image
David Marginian Deactivated answered David Marginian Deactivated edited

Just like a lot of things, this isn't as simple as it seems. In order to certify with payment networks partial authorizations must be supported (unless you provide a business case and provide a waiver). This is problematic for Clover because we support so many verticals.


Handling this is not complicated and voiding the payment is simple in all of our Clover Connector SDKs. No special handling is required to void a partial. Here is some code for handling this from the Remote Pay Cloud SDK (JavaScript) , it will be similar for Payment Connector (which you should be using instead of firing raw intents):

onSaleResponse: function(response) {
    const requestAmount = activeSaleRequest.getAmount();
    activeSaleRequest = null; // The SaleRequest is complete
    if (response.getSuccess()) {
        const payment = response.getPayment();
        // We are choosing to void the payment if it was not authorized for the full amount.
        if (payment && payment.getAmount() < requestAmount) {
            const voidPaymentRequest = new clover.remotepay.VoidPaymentRequest();
            voidPaymentRequest.setPaymentId(payment.getId());
            voidPaymentRequest.setVoidReason(clover.order.VoidReason.REJECT_PARTIAL_AUTH);
            updateStatus(`The sale was approved for a partial amount (${payment.getAmount()}) and will be voided.`, false);
            cloverConnector.voidPayment(voidPaymentRequest);
        } else {
            updateStatus("Sale complete.", response.result === "SUCCESS");
            console.log({
                message: "Sale response received",
                response: response
            });
            if (!response.getIsSale()) {
                console.log({
                    error: "Response is not a sale!"
                });
            }
        }
    } else {
        updateStatus(`The sale was not successful.`, false);
    }
},

You can find a test card to test this scenario here (manual entry required, CardEntryMethods.ALL):

https://docs.clover.com/clover-platform/docs/test-card-numbers-for-declines-and-partial-transactions

Note - You will also receive a device event when the partial auth confirmation screen is displayed on the device. You could technically use that event to select the "No" input option but the customer may select yes before you have a chance to so I don't advise doing this.


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