(2) If the sender is a bank and the sender (i) credited an account of the receiving bank with the sender, or (ii) caused an account of the receiving bank in another bank to be credited, payment occurs when the credit is withdrawn or, if not withdrawn, at midnight of the day on which the credit is withdrawable and the receiving bank learns of that fact.
(3) If the receiving bank debits an account of the sender with the receiving bank, payment occurs when the debit is made to the extent the debit is covered by a withdrawable credit balance in the account.
(b) If the sender and receiving bank are members of a funds-transfer system that nets obligations multilaterally among participants, the receiving bank receives final settlement when settlement is complete in accordance with the rules of the system. The obligation of the sender to pay the amount of a payment order transmitted through the funds-transfer system may be satisfied, to the extent permitted by the rules of the system, by setting off and applying against the sender's obligation the right of the sender to receive payment from the receiving bank of the amount of any other payment order transmitted to the sender by the receiving bank through the funds-transfer system. The aggregate balance of obligations owed by each sender to each receiving bank in the funds-transfer system may be satisfied, to the extent permitted by the rules of the system, by setting off and applying against that balance the aggregate balance of obligations owed to the sender by other members of the system. The aggregate balance is determined after the right of setoff stated in the second sentence of this subsection has been exercised.
(c) If two banks transmit payment orders to each other under an agreement that settlement of the obligations of each bank to the other under Section 4A-402 will be made at the end of the day or other period, the total amount owed with respect to all orders transmitted by one bank shall be set off against the total amount owed with respect to all orders transmitted by the other bank. To the extent of the setoff, each bank has made payment to the other.
(d) In a case not covered by subsection (a), the time when payment of the sender's obligation under Section 4A-402(b) or 4A-402(c) occurs is governed by applicable principles of law that determine when an obligation is satisfied.