question

Omar Reyes avatar image
Omar Reyes asked David Marginian Deactivated commented

Could not refund transaction: DECLINED: No reason provided.

Hi,


We are currently attempting to partially refund $3.00 on a payment of $5.00 using the Network Pay Display app. When I attempt to refund we receive the following error:

The error result and reason is "FAIL" and the message says "Could not refund transaction: Declined: No reason provided."


This is how I am executing the refund:


var refundRequest = new clover.remotepay.RefundPaymentRequest();

refundRequest.setOrderId(refund.orderId);

refundRequest.setPaymentId(refund.paymentId);

refundRequest.setAmount(refund.amount);

getCloverConnector().refundPayment(refundRequest);



What could be the cause of this? If I refund the full $5.00 amount is goes through without issues but any partial amount fails with this error.


orderID: K0PS1SHQT36CE

paymentID: M9XRJ2XATMW1M


Thanks.

semi-integrations
1580504868567.png (106.4 KiB)
1 comment
10 |2000

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

Omar Reyes avatar image Omar Reyes commented ·

Turns out that I only get this issue when I try to partially refund an Android Pay payment. If I partially refund a payment where I entered the chip of the card it goes through successfully. Any ideas why?

0 Likes 0 ·

1 Answer

·
David Marginian avatar image
David Marginian Deactivated answered David Marginian Deactivated commented

It is possible that you need to set the fullRefund flag to false (although this does seem like it should be unnecessary) - https://docs.clover.com/clover-platform/docs/voids-and-refunds.

4 comments
10 |2000

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

Omar Reyes avatar image Omar Reyes commented ·

Turns out that I only get this issue when I try to partially refund an Android Pay payment. If I partially refund a payment where I entered the chip of the card it goes through successfully. Any ideas why?

0 Likes 0 ·
David Marginian avatar image David Marginian ♦♦ Omar Reyes commented ·

There is likely an explanation for this but I will have to ask the payment folks. What type of payment are you trying to refund? If it is a pre-auth have you captured it?

0 Likes 0 ·
Omar Reyes avatar image Omar Reyes David Marginian ♦♦ commented ·

It is a normal sale using the following code:

const saleRequest = new clover.remotepay.SaleRequest();

saleRequest.setExternalId(clover.CloverID.getNewId());

saleRequest.setCardEntryMethods(clover.CardEntryMethods.ALL);

saleRequest.setAmount(sale.amount);

saleRequest.setAutoAcceptSignature(false);

if (!sale.tip) saleRequest.setTipMode(clover.payments.TipMode.NO_TIP);

0 Likes 0 ·
Show more comments

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

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