Note: it is not really a masked PAN as nothing is masked so to speak.
For testing purposes, I need users to only submit their first 6 and 4 last digits of their CC. At no point at all will they submit their full PAN or any other card data. Is it ok to store the first 6 and last 4 digits?
But considering that displaying the first 6 digits and the last 4 digits of a CC are compliant with PCI DSS rules, I don't think there is an issue with storing them as is.
However, I would suggest that you only store what is really required to be stored, there is no need to store the first six digits and the last four if it isn't absolutely necessary, for best practice.
– s h a a n Oct 25 '19 at 12:55