Disclosed herein are processes for preparing 2-[(3R)-3-[4-amino-3-(2-fluoro-4-phenoxy-phenyl)pyrazolo[3,4-d]pyrimidin-1-yl]piperidine-1-carbonyl]-4-methyl-4-[4-(oxetan-3-yl)piperazin-1-yl]pent-2-enenitrile free base (compound (I)), salts of compound (I) and solid state form of said salts. Also disclosed herein are pharmaceutical compositions comprising such salts and solid state form thereof and methods of treating cancer, autoimmune, and inflammatory diseases using compound (I) or a pharmaceutically acceptable salt thereof.