WhatsApp has had spam-solving measures for a while now: you could block people from messaging you when you noticed something fishy about them (usually when receiving a photo, contact, link, or ad from someone you didn't know). Phone numbers that were blocked by several users eventually ended up being temporarily or permanently banned from using the service. However, there was no way for you to tell WhatsApp whether you were blocking a number for personal reasons or because they were actually sending spam messages.

That behavior has changed somewhere between version 2.12.12 and 2.12.30 (that's as far as I could narrow it down to). When you get a message from a phone number that isn't in your contacts list, you will now see two big boxes to report it as spam and block it or to add it to your phonebook.

whatsapp-spam-1 whatsapp-spam-2

This new UI lets you block a number and report it as spam in one step

The option to only block can still be found under More in the overflow menu on the top right, and it still shows up above the conversation when you've replied to the unknown sender but still haven't saved their number.

whatsapp-block-1 whatsapp-block-2

The option to only block the contact is still there, but slightly hidden

WhatsApp's current Play Store version is still 2.12.5, which doesn't have this feature yet, but you can find more recent app versions on the service's site or on APK Mirror. As mentioned above, spam reporting was added somewhere between 2.12.12 and 2.12.30, so any version after 2.12.30 should do.