It is widely claimed that in 1122 Pope Calixtus II gave Compostela the privilege of granting a plenary indulgence to those who visited the shrine of the Apostle in each year when the saint's day fell on a Sunday, and while there made their confession, attended Mass, gave a donation for the upkeep of the shrine, and undertook to perform good works. The papal bull of 1179 making the privilege perpetual is now thought to be a C15th forgery. The earliest documented account of indulgences granted to jacobean pilgrims by the Papacy dates from the mid-C13th, and the earliest jubilee year identified by Constance Storrs is 1395. In any case, the gaining of the plenary indulgence became a dominant motivation for the pilgrimage (in the C15th few pilgrims sailed from England except in Holy Years).
Confession and communion remained essential to the granting of the certificate of having completed the pilgrimage, first called la autentica. Originally hand-written and sealed, with slips of paper attesting confession and communion pasted on, it became in the C17th (printing reached Galicia very late) a printed document which included the confirmation of confession and communion. These two elements appear to have been dropped from the compostela in the mid-C18th, and the text as we now have it is little changed since then.
The plenary indulgence - never, as far as we know, a printed document - is still granted to those who visit the Cathedral and the tomb of the Apostle at any time during a Holy Year, make their confession, attend Mass, pray for the intentions of the Holy Father, and undertake some charitable work (this can include a charitable donation). It is not also necessary to fulfil the conditions for the granting of the Compostela. The indulgence may be gained on behalf of the dead.
Interestingly, a notice in the pilgrim office in June 2006 said that the plenary indulgence is given not only in Holy Years, but also in ordinary years on Easter Sunday; 21st April (the anniversary of the consecration of the cathedral); and on St James's three feast days (23 May - the Apparition; 25 July - his martyrdom; and 30 December - the translation of the relics).