A letter to the London Gazette captured an early iteration of the Pied Piper legend:
Your correspondent, who enquires for the story of the Pied Piper, may find it in Howel's Familiar Letters, p272, of the Sixth Edition, 1683, where it is told in the following words:
The Town of Hamelen was annoyed with rats and mice, and it chanced that a pied-coated Piper came thither, who covenated with the chief Burgers for such a reward, if he could free them quite from the said vermin; nor could he demand it till a twelvemonth and a day after.
The agreement being made, he began to play on his pipe, and all the rats and mice followed him to a lough hard by, where they perished; so the town was infested no more.
At the end of the year, the Pied Piper returned for his reward: the Burgers put him off with slightings and neglect, offering him some small matter, which he refusing, and staying some days in the town; on Sunday Morning at high mass, when most people were at church, he fell to play on his his pipes, and all the children up and down followed him out of town to a great hill not far off, which rent in two, and opened and let him and the children in, and so closed up again.
This happened, says Howel, a matter of two hundred and fifty years since - and his letter is dated 1 Ocotober, 1643. Such is the story of the Red Piper.