In any case in which advances of money, repayable on demand, to an amount not less than five thousand dollars, are made upon documents of title within article seven of the uniform commercial code or negotiable instruments within article three or article eight of the uniform commercial code pledged as collateral security for such repayment, it shall be lawful to receive or to contract to receive and collect, as compensation for making such advances, any sum to be agreed upon in writing, by the parties to such transaction, provided that there shall not be received or contracted to be received and collected on such advances any amount which would be in violation of section 190.40 of the penal law.
N.Y. Gen. Oblig. Law § 5-523