This is a square bracteate, a late medieval pfennig from the bishopric of Basel. Bracteates were thin pfennigs embossed only on one side; the image appeared in a high relief on the one face and hollow on the other. Bracteates were therefore also called hollow pfennigs. They were mostly round, but sometimes cut square, like this one.
The issuer of the coin was John II Senn of Münsingen, from 1335 until his death in 1365 bishop of Basel. The pfennig bears his head and the letters B-A for Basel.