Hello,
I have a B2B marketplace on VTEX IO. When a customer tries to complete a purchase via PIX or boleto, the following message appears: “The Corporate Document field in the customer profile is invalid”. However, the CNPJ, state registration, and all registration and billing details are properly filled in.
What could be causing this and how can it be resolved?
Thanks
@Cristopher, how’s it going?
The most common errors in this case occur when the data is sent in a different format, even if it appears to be filled in.
I’ll share some ideas that might help you figure out the reason.
Possible Causes and Solutions:
- CNPJ Format:
- Cause: The CNPJ may be incorrectly formatted or contain extra characters (such as dots, slashes, or spaces) that are not accepted by VTEX’s validation.
- Solution: Check that the CNPJ is in the correct format (numbers only, with no dots, slashes, or spaces). It’s recommended to validate the CNPJ using a standard regex to ensure it’s correct.
- Customer Profile Configuration:
- Cause: The customer profile may not be correctly set up in Master Data, or required fields may be missing, such as the State Registration or Entity Type.
- Solution: Confirm that all required fields in the customer registration are filled in and that the document type is set to “Legal Entity” with the CNPJ field correctly populated.
- Master Data Inconsistency:
- Cause: The Data Entity in Master Data where the CNPJ is registered may not be properly synchronized with the customer profile.
- Solution: Review the data entity configuration in Master Data to ensure that the fields related to the CNPJ are correctly mapped and synchronized.
- Payment Gateway Validation Issues:
- Cause: The payment gateway (responsible for PIX or boleto) may be performing an additional CNPJ validation that isn’t being met.
- Solution: Check whether the payment gateway is configured to accept documents from legal entities and whether any additional settings are required for payment via PIX or boleto.
Steps to Resolve:
- Check the customer registration in Master Data and review the corporate document fields to ensure they are correctly filled in and free of special characters.
- Test with another CNPJ to determine whether the issue is specific to one registration or a broader configuration problem.
I hope these tips are helpful in some way.
Best,
Estevão.