Swedish residents have a personal identity number issued at birth or immigration. Format: YYYYMMDD-NNNN. More details: https://en.wikipedia.org/wiki/Personal_identity_number_(Swed...
BankID is a service run by the Swedish banks that interfaces with the banks, individuals and third parties (like this chain of unmanned stores).
https://en.wikipedia.org/wiki/BankID
The banks know the identities (personal identify number) of their customers via their physical offices. BankID offers an app to individuals and an online API to paying/approved third-party services. Third-party services are able to offer BankID authentication in websites and apps. In the end the third party receives an authenticated personal identity number.
There is growing awareness that this service should not be run by private companies/banks.