1

I'm interested to know if an observer or plugin will be trigger if a credit memo is created via API rest example: POST /V1/creditmemo/refund OR POST /V1/invoice/{invoiceId}/refund ref:https://devdocs.magento.com/swagger/#/salesRefundInvoiceV1

ref:https://devdocs.magento.com/swagger/#/salesCreditmemoManagementV1/salesCreditmemoManagementV1RefundPost

I basically need to check/detect for external parties creating refunds in my Magento application.

That said I need to catch data before or after observer/plugin method for a refund and probably just log it somewhere in a file in Magento.

Any one done it b4 ? any help appreciated.

0

Yes events will be triggered in your scenario. The only thing to keep in mind is that API execution happens in its own area. So if you want to add an event observer just for those use etc/webapi/events.xml (etc/frontend/events.xml would not get executed).

  • Appreciate I will give a try. I am assuming all api's will trigger event observer/plugin ? E.G: offline returns using V1/order/:orderId/refund – Juliano Vargas Dec 4 '19 at 9:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.