In the case of a tax payable in installments, if the taxpayer has paid as an installment of the tax more than the amount determined to be the correct amount of such installment, the overpayment shall be credited against the unpaid installments, if any. If the amount already paid, whether or not on the basis of installments, exceeds the amount determined to be the correct amount of the tax, the overpayment shall be credited or refunded as provided in section
6402.