Credit or refund of any overpayment of tax imposed by section
4251,
4261, or
4271 may be allowed to the person who collected the tax and paid it to the Secretary if such person establishes, under such regulations as the Secretary may prescribe, that he has repaid the amount of such tax to the person from whom he collected it, or obtains the consent of such person to the allowance of such credit or refund.