I would not use either perfect tense. To me, it sounds more natural to say
Your salary was paid to you based on the declaration that you made.
That uses only the simple past, because everything that we are talking about is something that has already happened.
Let's break down this sentence:
Your salary...
We can't just say "Salary was"; salary is a "count noun", so it has to be a salary, or the salary, or your salary.
Your salary was paid to you...
We say was paid because this happened in the past, and we are using the passive voice.
Your salary was paid to you based on...
Something is based on something else.
Your salary was paid to you based on the declaration...
Like "salary", declaration is a count noun. "A declaration", "the declaration", "your declaration", etc.
Your salary was paid to you based on the declaration that you made.
You make a declaration. Because this making of the declaration was in the past, you made the declaration. Therefore, it is a declaration that you made. We're using the simple past, because the making of the declaration is a thing that is finished and done, and we already knew that, so therefore the simple past is the most logical choice.