Notwithstanding the provisions of section 540.10, when bail has been posted in a city court, town court or village court in connection with a local criminal court accusatory instrument, other than a felony complaint, and thereafter such bail is forfeited, the following rules are applicable:
1. If such bail consists of a bail bond, the financial officer of such city, town or village must promptly commence an action for the recovery of the sum of money specified in such bond, and upon collection thereof shall pay the same over to the treasurer or financial officer of the city, the supervisor of the town or the treasurer of the village. Any amount recovered in such action, unless otherwise provided by law, shall be the property of the city, town or village in which the offense charged is alleged to have been committed.2. If such bail consists of cash bail, the local criminal court must:(a) If it is a city court, pay the forfeited bail to the treasurer or other financial officer of the city. Such forfeited bail, unless otherwise provided by law, is the property of such city.(b) If it is a town court or a village court, pay the forfeited bail to the state comptroller on or before the tenth day of the month next succeeding such forfeiture. Such forfeited bail, unless otherwise provided by law, is the property of the town or village in which the offense charged is alleged to have been committed; provided, however, that when (i) a single amount of bail is posted for more than a single offense charged, and (ii) the town or village justice court does not attribute a specific amount of bail to each offense, and (iii) forfeited bail for at least two of the offenses would be the property of different governmental entities, the entire amount of forfeited bail shall be the property of the town or village in which the offenses charged are alleged to have been committed, except that, when forfeited bail for at least one of the offenses would be the property of the state, the entire amount of forfeited bail shall be the property of the state.N.Y. Crim. Proc. Law § 540.20