Spotify uses the algorithm of the third party API which is calledIt is mentioned in their student discount TOS-
How To Get Spotify Student Discount
SheerID of Spotify has the agreement with universities. In fact, it’s quite sensitive. If someone’s legal name is different from my preferred name. They couldn’t get the Spotify discount if they use the preferred name — They have to use their legal name which is the name they are officially enrolled in the university.
Spotify Premium Student Discount
There’s an option to upload your own verification documents from your school if you’re a student and but fail SheerID verification.