In Spain we have the NIF, but the fun thing is that foreigners get a NIE instead, which is prefixed with an X or, more recently, a Y, before the digits.
Things tend to be easier now, but 10 years ago or so, many websites would refuse to accept a letter before the numbers, as they hadn't been programmed for that. Or wouldn't accept the absence of a second surname.
Sometimes inserting a '0' before the actual numbers helped (including with the actual Social Security system). Sometimes it didn't...