Dyego Costa avatar image
Dyego Costa asked Dyego Costa commented

Is it possible to void a payment but keep it on an order with a "voided" status?

I tried to void a payment transaction using the Javascript SDK and looks like it removes the payment from the order (created automatically by the JS SDK upon payment creation using Clover#sale()) and leaves the order open with no payment.

I was expecting a behaviour like the "refund" action I can take from the JS SDK. Using the "refund" the payment on the order gets the "refunded" status and the order goes to a complete state of "refunded".

Is this "void" behaviour the final version of it and is supposed to work this way or will/can it be changed to behave somewhat like the "refund"?

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

Jeffrey Blattman avatar image
Jeffrey Blattman answered Dyego Costa commented

Voided payments are removed from the order. This behavior cannot be changed. This matches with the semantics of a void which is, in layman's terms, make the payment go away like it never happened.

10 |2000

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

How is it legal that if you have a transaction that touches a customer's account, in any way, that there isn't record maintained for that transaction? And what happens when a transaction is voided that didn't result from a user's actions? How are we notified of this?

1 Like 1 ·

Ok, underestood. What do you recommend to do with the open order that voiding the payment leaves behind? Is there any future feature planned for the remote-pay-cloud to handle that?

0 Likes 0 ·

What do you think should happen to that order? By design it will go back to being open (or partially paid) and can be re-opened or a payment can be added. It can also be deleted if permissions allow (and there are no payments).

0 Likes 0 ·

Since it's automatically created and I can't modify it (can I?) using the SDK I'd expect it to be closed/canceled/deleted automatically, ideally with some indication that it was voided. I'd expect that because the next attempt of creating a payment would result in a new order and the old one would be left open until someone take care of it manually.

0 Likes 0 ·

You can modify orders with the SDK.

That's not how voids are going to work. You are describing a refund. Again, the semantics of a void are "make the payment go away". Often a void occurs because of things other than user interaction, so keeping a record of the void would be confusing in most cases.

Clover does leave around a lot of incomplete orders. We opt for that in the cases where a merchant created a large or complex order and doesn't want to re-create it. Again, the merchant can delete orders if they have permission.

0 Likes 0 ·

Welcome to the
Clover Developer Community