I'm trying to integrate "Paypal smart buttons" in my webpage which was with a deprecated paypal implementation. On this new integration I'm using server-side SDK and I can create and capture an order and save data in my DB.
The problem I have now is to implement the refund. On my last implementation I had an IPN Listener and whenever I get a refund I could register it in my BD. Since now IPN listener is deprecated, how can I implemented the "listener function"? Is the webhooks the new approach to implement the listener? I know that with Webhooks Management API I can list all webhooks events, but then how can I related them with the payment made and registered before in my BD?
I've already read lots of official paypal documentation but this is no clear to me, yet.