if you wipe all and formatted data and when you installed new rom then you are asked for pin? When you have 2 options activate Wlan and enter pin to use phone??
That pin is from you MI account, if you did not registered your phone to your acc then ask seller to remove your phone from their acc...