Medieval towns often had trade guilds and the most powerful of these would have had their own chapels. In the centre of Hay St. John's is just such a chapel.
It was probably founded in 1254. Long known as Eglwys Ifan, it served as Hay guild church in the middle ages. It was then used as the town prision for a while.
It was restored in 1930 when the East end of the building was reconverted into a chapel with a 17th century oak redos behind the altar. The rest of the building serving as a small church hall.
For four very good pages on the history of St. John's Chapel go to the Powys Digitial History Pages on St. John's.