When does confirming bank earn its fees?

Hi all,

Bank A: Issuer

Bank B: Advising Bank/ "Confirming" bank

Bank C: Negotiating bank

LC was issued by Bank A and advised through bank B, which added its confirmation. Seller decided that fees were too high and asked for amendment of the LC to delete confirmation.  Issuer sent swift message asking bank B to delete confirmation.  LC was payable at issuer's counters. 

Seller's negotiating bank (Bank C) accidentally sent the docs to Bank B instead of bank A.  Docs were discrepant and returned to Bank C. 

(Docs were eventually properly sent to bank A and payment was made with no problem)

Bank B is now asking Bank C for the confirmation charge, examination fee and discrepancy fee.    Question: Does Bank B have the right to demand these charges? Are confirmation charges earned when confirmation is given, or when docs are presented to confirming bank? 

Thank you!