To comply with GDPR (General Data Protection Regulation - Europe) and LGPD - Lei Geral de Proteção de Dados (General Data Protection Law - Brazil), among other solutions, VTEX offers the Save User Data opt-in functionality. Through it, users can select whether they want the store to keep their personal and payment data saved.
The Save user data opt-in feature is only available for Checkout v6.
Save user data opt-in activation
To use the Save user data opt-in functionality in your store, you must first enable it. Then, follow the settings below:
- Make a
GETrequest using the endpoint Get orderForm configuration.
- Make a
POSTrequest using the endpoint Update orderForm configuration with the same data obtained in the GET request, just modifying the value of the
- Make a new
GETrequest using the endpoint Get orderForm configuration to confirm activation. This will be indicated by the presence of the
savePersonalDatafields under the
clientPreferencesDataobject in the
saveUserDatafield may be indicated as
true. This field is ignored, and kept in this configuration for backwards compatibility only.
Saving personal and payment data
Once the Save user data opt-in is enabled, the user will have access to checkboxes on the Checkout page to select whether their personal and payment data should be kept by the store and used in future orders.
Checkbox for saving personal data:
Previously, it was possible to display this checkbox by modifying the
displayproperty of the
.save-dataelement, via CSS. However, with the Save user data opt-in enabled, the method through CSS is no longer recommended.
Checkbox for saving payment data:
The checkbox for saving payment data will only be shown if the user has already selected the option to save their personal data.
Checkbox not available to save payment data if (the user has not previously selected the option to save personal data):
If the user chooses to use two cards to pay for the purchase, when selecting the option to save payment data, the data of both cards will be saved. There is no option to save only one of the cards.
Checkbox to save payment data from both cards: