I just did a quick search and found these.
The most famous biblical example of someone getting an indulgence is when Jesus, from the cross in Luke 23:43, gave the good thief complete remission for his sins, promising him that he would be in paradise that day. This power of binding and loosing sins and punishment was given to the Church by Jesus, in Matthew 18:18, when he said “Truly, I say to you, whatever you bind on earth shall be bound in heaven, and whatever you loose on earth shall be loosed in heaven.” “Whatever” means anything, including punishment for sins.
2 Machabees 12: 41-46
 Then they all blessed the just judgment of the Lord, who had discovered the things that were hidden.  And so betaking themselves to prayers, they besought him, that the sin which had been committed might be forgotten. But the most valiant Judas exhorted the people to keep themselves from sin, forasmuch as they saw before their eyes what had happened, because of the sins of those that were slain.  And making a gathering, he sent twelve thousand drachms of silver to Jerusalem for sacrifice to be offered for the sins of the dead, thinking well and religiously concerning the resurrection,  (For if he had not hoped that they that were slain should rise again, it would have seemed superfluous and vain to pray for the dead,)  And because he considered that they who had fallen asleep with godliness, had great grace laid up for them.  It is therefore a holy and wholesome thought to pray for the dead, that they may be loosed from sins.
 With godliness: Judas hoped that these men who died fighting for the cause of God and religion, might find mercy: either because they might be excused from mortal sin by ignorance; or might have repented of their sin, at least at their death.
 It is therefore a holy and wholesome thought to pray for the dead: Here is an evident and undeniable proof of the practice of praying for the dead under the old law, which was then strictly observed by the Jews, and consequently could not be introduced at that time by Judas, their chief and high priest, if it had not been always their custom.
Hope this helps