A method of electroplating a tin-containing layer comprising: providing a semiconductor wafer comprising a plurality of conductive bonding features, wherein the conductive bonding features are copper pillars; contacting the semiconductor wafer with an electroplating composition comprising: a source of tin ions; an acid electrolyte; 0.0001 to 0.045 g/L of a grain refiner of formula wherein each R 1 is independently (C 1 - 6)alkyl, (C 1 - 6)alkoxy, hydroxy, or halo; R 2 and R 3 are independently chosen from Hand (C 1 - 6)alkyl; R 4 is H, OH, (C 1 - 6)alkyl or O(C 1 - 6)alkyl; m is an integer from 0 to 2; one or more nonionic surfactants of formula or: wherein A and B represent different alkyleneoxide moieties independently chosen from (C 2-4)alkyleneoxides, and x and y represent the number of repeat units of each alkyleneoxide, respectively; and water; and applying sufficient current density to deposit a tin-containing layer on the conductive bonding features; wherein the electroplating composition has a within-die uniformity of ≤ 5% and wherein the tin-containing layer on the conductive bonding features is substantially free of voids as plated and after reflow; wherein the within-die uniformity is tested by patterned wafers having 75 μm diameter vias, 3 different pitch sizes which are 150, 225 and 375 μm, a platable area of 3-20%, a negative dry film resist height of 75 μm, and a seed of 1 kÅ Ti / 3 kÅ Cu, and measuring the height of 11 tin-containing bumps on each die using a stylus profilometer to obtain within-die uniformity calculated by equation 1 below in which within-die uniformity is expressed as "coplanarity": Coplanarity % = h max − h min 2 h avg × 100 where h max is the height of the highest tin-containing bump in a die, h min is the height of the shortest tin-containing bump in a die, and h avg is the average height of tin-containing solder bumps. providing a semiconductor wafer comprising a plurality of conductive bonding features, wherein the conductive bonding features are copper pillars; contacting the semiconductor wafer with an electroplating composition comprising: a source of tin ions; an acid electrolyte; 0.0001 to 0.045 g/L of a grain refiner of formula wherein each R 1 is independently (C 1 - 6)alkyl, (C 1 - 6)alkoxy, hydroxy, or halo; R 2 and R 3 are independently chosen from Hand (C 1 - 6)alkyl; R 4 is H, OH, (C 1 - 6)alkyl or O(C 1 - 6)alkyl; m is an integer from 0 to 2; one or more nonionic surfactants of formula or: wherein A and B represent different alkyleneoxide moieties independently chosen from (C 2-4)alkyleneoxides, and x and y represent the number of repeat units of each alkyleneoxide, respectively; and water; and applying sufficient current density to deposit a tin-containing layer on the conductive bonding features; wherein the electroplating composition has a within-die uniformity of ≤ 5% and wherein the tin-containing layer on the conductive bonding features is substantially free of voids as plated and after reflow; wherein the within-die uniformity is tested by patterned wafers having 75 μm diameter vias, 3 different pitch sizes which are 150, 225 and 375 μm, a platable area of 3-20%, a negative dry film resist height of 75 μm, and a seed of 1 kÅ Ti / 3 kÅ Cu, and measuring the height of 11 tin-containing bumps on each die using a stylus profilometer to obtain within-die uniformity calculated by equation 1 below in which within-die uniformity is expressed as "coplanarity": Coplanarity % = h max − h min 2 h avg × 100 where h max is the height of the highest tin-containing bump in a die, h min is the height of the shortest tin-containing bump in a die, and h avg is the average height of tin-containing solder bumps. a source of tin ions; an acid electrolyte; 0.0001 to 0.045 g/L of a grain refiner of formula wherein each R 1 is independently (C 1 - 6)alkyl, (C 1 - 6)alkoxy, hydroxy, or halo; R 2 and R 3 are independently chosen from Hand (C 1 - 6)alkyl; R 4 is H, OH, (C 1 - 6)alkyl or O(C 1 - 6)alkyl; m is an integer from 0 to 2; one or more nonionic surfactants of formula or: wherein A and B represent different alkyleneoxide moieties independently chosen from (C 2-4)alkyleneoxides, and x and y represent the number of repeat units of each alkyleneoxide, respectively; and water; and applying sufficient current density to deposit a tin-containing layer on the conductive bonding features; wherein the electroplating composition has a within-die uniformity of ≤ 5% and wherein the tin-containing layer on the conductive bonding features is substantially free of voids as plated and after reflow; wherein the within-die uniformity is tested by patterned wafers having 75 μm diameter vias, 3 different pitch sizes which are 150, 225 and 375 μm, a platable area of 3-20%, a negative dry film resist height of 75 μm, and a seed of 1 kÅ Ti / 3 kÅ Cu, and measuring the height of 11 tin-containing bumps on each die using a stylus profilometer to obtain within-die uniformity calculated by equation 1 below in which within-die uniformity is expressed as "coplanarity": Coplanarity % = h max − h min 2 h avg × 100 where h max is the height of the highest tin-containing bump in a die, h min is the height of the shortest tin-containing bump in a die, and h avg is the average height of tin-containing solder bumps.