This question is hard to answer as written because responsibility shifts depending on the circumstances: amount, transaction type (i.e. PIN vs chip vs "card not present"), the timeliness in which the error is reported, and a number of other factors. Much of the rules governing this are dictated by regulation, although the card networks also implement additional rules in their contracts with banks. Further, individual card issuing banks generally provide additional protection as a service to their customers.
Generally, if you as a customer reports an error to their card issuing bank, they will either correct it, or pass it on to the party responsible for correction. These error correction transactions are (generally) implemented directly through the card processing networks (i.e. VISA, MasterCard) that handles normal transactions on your card. From the customer's perspective, the involvement (or not) of the merchant in deciding what happens may not be a visible factor in the dispute process (i.e. you may not actually know if the merchant needs to "agree" with you or not).
One important difference people often point out about debit cards is that it is "your" money, so if processing the dispute takes a certain length of time, you are essentially out of pocket until it is resolved. Although - again - often, card issuing banks will have policies to reimburse the customer immediately, and then chase the funds themselves.
If you feel the need to have a specific answer for a specific type of dispute, you should call your card issuing bank and ask them. This is the best way to have a "final" answer that considers both typical rules implemented via regulation, plus that bank's own policies.