The
Compostela has existed since the Middle Ages, and it was (and technically still is) a legal document stating that X has accomplished his Pilgrimage (and so been to Confession and prayed before the tomb of the Apostle) -- this served to show among other things that those required by a Church Court to undergo a penitential pilgrimage, or some criminals bound as punishment to accomplish one, etc had properly fulfilled their obligation, and so were no longer under that charge. But it could sometimes also serve to show that the conditions for the lifting of someone's excommunication had been fulfilled.
When the rules for excommunications started to be modernised and simplified from the 15th Century onwards though, the need for such sinners to obtain such a
Compostela for a remission started to decline, so I'd guess that it started to become the more nostalgic and symbolic document that we have today from about after the Council of Trent onwards, as that was when the old penalty of "minor excommunication" was formally abolished (though it had already fallen into disuse from the 15th Century onwards, and all references to it were only removed from the Canon Law in the 19th Century).
Of course, it didn't take the form of a printed document until modern times.
But here for example is one from 1733 :
As to the 100 kilometer rule, offhand I'm not sure when it started, but I do remember it as having been a quite recent change in 1993.
According to this, though :
http://amawalker.blogspot.com/2015/01/the-manifesto-of-villafranca-de-bierzo.html
--- the
Compostela as we know it today had its origins in the 14th Century ; the first
Credenciales were printed in the 1954 Holy Year, but the model of the one that we use nowadays was created in 1963 ; and "
The only reason that I have been able to find for the 100 km requirement, which was imposed by the church for the earning a Compostela (not by Galician tourism), was to ensure ".. effort and sacrifice in expiation of sins.." (El esfuerzo y sacrificio en expiación de los pecados...") ", and according to Rebekah Scott here
https://www.caminodesantiago.me/com...-the-100-km-rule-to-300-km.39220/#post-391375 that 100 km requirement was indeed introduced in 1993.
A major reason why the Cathedral did that is because the number of pilgrims arriving in Holy Years was starting to be a burden on the Pilgrims Office, and so they put this 100K/200K condition in place, as well as issuing an "official"
Credencial, to both limit the numbers (the rule) and help finance the work of the Pilgrims Office (the
Credencial, and the contribution in Pesetas, later Euros, to obtain one).