Article 426 [source]

Spanish Criminal Code
English translation

A private individual who, having occasionally agreed to a request for a gift or other remuneration made by an authority or public official, reports the fact to the authority that has the duty to investigate it before the opening of the proceedings, will be exempt from punishment for the crime of bribery, provided that no more than two months have elapsed since the date of the events.