question

Carl avatar image
Carl asked ·

Webhook Refund Responses?

We noticed that the Webhook responses coming from Clover.com have a "type" value of "DELETE" when a Refund is processed, yet the Sandbox sends a "type" value of "UPDATE" when a Refund is processed. Is there a reason for this difference? Should we not be using this as an indication of a Refund?

Webhooks
10 |2000 characters needed characters left characters exceeded

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

1 Answer

Sam avatar image
Sam answered ·
I assume this is a webhook for `payment` and/or `order`?

Refund can either trigger two different events, depending on the lifecycle of a payment. If refunded immediately, it will be in affect `void`ed, rather than refunded. This will cause the Payment to be deleted, in affect, never been paid at all. If the refund happened after a period of time, it will be refunded. There will be a payment made, then refunded back. This is the cause for webhook for `DELETE` vs `UPDATE`.
Share
10 |2000 characters needed characters left characters exceeded

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