An acid electrolyte and method of using the electrolyte to both deposit tin and tin-alloys on iron containing substrates and at the same time perform as a flux to inhibit the formation of haze and stains on the tin and tin-alloys. The electrolytes and methods are suitable for plating on steel.