WhatsApp encrypts all messages by default, but there are situations when you may want to make sure. Discussing private information with a trusted person, such as a credit card number, should always be done in that way.
Start a discussion with that person to confirm the encryption. Then, tap the user's name, then select "Encryption." You will then see a 40-digit sequence, which is the security code.
By comparing the numbers, having the person scan the QR code, or scanning the code of your contact using the "Scan Code" option, you can manually validate this security code and determine whether your chat is indeed encrypted.