How to request the refund of an undue payment to the Treasury or Social Security

Paying a tax twice, entering more than due, or mistakenly paying a fee to Social Security does not necessarily mean losing that money. Both the Tax Agency and the Treasury allow requesting its refund and, in general, there is a period of four years to claim.

3 minutes

fotonoticia 20260814113925 1920

fotonoticia 20260814113925 1920

Add DEMÓCRATA to Google

Ask FREN

Published

Last updated

3 minutes

Most read

An error in entering an amount, a duplicate payment, or a Social Security contribution paid when it no longer corresponded can cause a citizen to give the Administration more money than they actually owed. The legislation provides specific mechanisms to recover these amounts, although the procedure changes depending on whether it is a tax payment or a contribution.

When money can be requested from the Tax Agency

The General Tax Law expressly recognizes the right to recover undue payments. Among the clearest cases are having paid a debt or fine twice, having deposited an amount greater than what corresponded, or having paid a tax debt when it had already expired.

If the error comes from a self-assessment submitted by the taxpayer themselves, the route may be different. The law establishes that anyone who believes their self-assessment caused an undue payment can request its rectification. This is the case, for example, of incorrectly declaring certain data and ending up paying more income tax than was due.

The Tax Agency allows electronic processing of refund requests by identifying themselves through electronic certificate, electronic ID, or Cl@ve. The procedure can also be carried out by an authorized representative.

There are four years to claim from the Tax Agency

The deadline is one of the most important elements. The right to request the refund of an undue payment expires, in general, after four years. The moment from which it begins to be counted depends on the case, although it is usually taken as a reference the day after the undue payment or, if the payment occurred within the deadline of a self-assessment, the day after the end of that deadline.

Furthermore, if the Tax Agency recognizes that too much was paid, it must add late interest without the taxpayer having to expressly request it. These interests are calculated from the date the undue payment was made until the refund is ordered.

The AEAT sets a maximum period of six months to resolve this procedure. If the request is rejected, the interested party can file a motion for reconsideration or an economic-administrative claim.

What happens if the error was in paying Social Security

The General Treasury of Social Security has a similar procedure for those who have made payments by mistake, for example when paying contributions that did not correspond or paying an amount greater than due.

The General Collection Regulation recognizes the right to recover total or partial amounts paid erroneously. Furthermore, the refund includes late interest from the date the payment was made until the refund proposal.

There is, however, a relevant exception: if at the time of the erroneous payment the interested party had other outstanding debts with Social Security or a deferral or moratorium, the amount may be used to reduce that debt instead of being refunded directly.

There are also four years to recover overpaid contributions

In the case of Social Security contributions, the right to request their refund also expires after four years, counted from the day after the payment. Once the refund is recognized, there is another four-year period to demand payment of that amount.

The request corresponds to the General Treasury of Social Security, which must resolve and notify its decision within a maximum of six months from the submission of all necessary documentation. If that period passes without an express resolution, the request may be considered denied.

It is advisable to always keep the payment receipt

To claim, it is essential to be able to identify what was paid, when, for what concept, and why it is considered undue. Therefore, it is advisable to keep receipts, bank statements, payment letters, and any resolution or document related to the debt.

It is also necessary to address the correct agency. The Tax Agency itself warns that it cannot process refunds corresponding to payments made to other public agencies: if the payment was to Social Security, the claim must be made to this agency and not to the Treasury.

The practical rule is clear: a payment by mistake to the Administration does not have to be considered lost. If it was paid twice, an amount greater was deposited, or contributions that did not correspond were paid, there may be a right to recover the money, usually with interest. The main limit is not to let the four-year period pass to initiate the claim.

More key points, information and questions with FREN

AI-GENERATED CONTENT

What is the parliamentary process to modify the statute of limitations period for the refund of undue payments?

To modify the statute of limitations period for the refund of undue payments in Spain, there is no “special procedure” different from any ordinary legal reform. The common legislative procedure is used, usually through an amendment to the law containing the applicable statute of limitations regime (typically tax or financial/public law regulations).

1. Type of norm that must be modified

The statute of limitations period for the action to request the refund of undue payments is regulated in norms with the rank of law. In tax matters, it is usually located in the law regulating the tax or in the corresponding general tax law. Therefore:

  • The modification requires a formal law (ordinary law or general tax law), approved by the Cortes Generales.
  • It cannot be done only by regulation or by simple administrative instruction, because it would affect taxpayers' rights and obligations and essential elements of tax relations.

In practice, the change is structured as:

  • A specific reform law of the current norm, modifying the articles that set the statute of limitations period, or
  • The incorporation of an additional, transitional, or final provision in another law (for example, a tax measures or budget law that includes that specific reform).

2. Who can initiate the reform

The modification can begin through different legislative initiative routes, among others:

  • Government bill: this is the most frequent route in tax and financial matters. The Council of Ministers approves a reform bill and submits it to the Congress.
  • Private member bill from:
    • Parliamentary groups of the Congress or Senate.
    • A certain number of deputies or senators (under the terms provided in each Chamber's regulations).
    • Legislative assemblies of autonomous communities, when the material scope allows it.
    • Popular legislative initiative, if material and signature requirements are met, and provided the topic is not excluded from this route.

In all cases, the result is a legislative initiative that aims to modify the provisions where the statute of limitations period for refunds of undue payments is set.

3. Parliamentary stages in Congress and Senate

Once the initiative (bill or private member bill) is registered, the ordinary legislative procedure is followed:

  • Qualification and admission for processing by the Congress Board, which verifies that it meets formal requirements.
  • Opening of amendment period, during which groups can:
    • Submit total amendments (general rejection, alternative text) and/or
    • Partial amendments to the articles, for example, proposing a different period, transitional rules, etc.
  • Debate on totality in the Congress Plenary, if there are total amendments. The Plenary decides whether the processing continues or is rejected/returned to the Government.
  • Processing in the competent committee (for example, Finance):
    • Study of the text and partial amendments.
    • Debate and vote, preparing a report with a proposed text.
  • Debate and vote in the Congress Plenary:
    • The committee report is discussed.
    • The text is voted article by article or in blocks, as well as the “live amendments” not incorporated in committee.
  • Sending to the Senate:
    • The Senate can approve the text as is, introduce amendments, or issue a veto.
    • If it introduces changes, the text returns to the Congress, which accepts or rejects the amendments.
    • If there is a veto, the Congress can override it by absolute majority or, after a time, by simple majority.
  • Sanction, promulgation, and publication:
    • The King sanctions and promulgates the law.
    • It is published in the BOE and comes into force on the date established by the law itself (or after 20 days if nothing else is stated).

4. Coordination with regulations and practical application

Once the new regulation is in force:

  • Development regulations (for example, tax regulations) must be adapted if they contain references to the old period, to avoid contradictions.
  • The reform law itself usually includes transitional provisions specifying how the new period applies to existing situations (ongoing requests, ongoing prescription, etc.).
  • The tax administration and other affected administrations issue internal instructions and interpretative criteria to unify the application of the new period.
  • The courts complete the system through their case law, resolving doubts about the calculation of the period, retroactive effects, or mixed situations.

In summary, the modification of the statute of limitations period for the refund of undue payments is structured through a law approved by the ordinary legislative procedure, and its real effectiveness depends on proper coordination with regulatory norms and subsequent administrative and judicial practice.

What are the competences of the Tax Agency and the General Treasury of Social Security regarding refunds?

In matters of refunds, it is key to distinguish between resources managed by the State Tax Administration Agency (AEAT) and those managed by the General Treasury of Social Security (TGSS). Each body can only refund what falls within its material and management scope: the AEAT handles taxes and other state resources, while the TGSS is responsible for Social Security contributions and system resources.

1. Competences of the Tax Agency in refunds

The AEAT is the entity responsible for the effective application of the state tax system and certain resources from other Administrations entrusted to it. In refunds matters, its main functions are:

  • Refunds derived from the regulations of each tax: for example, IRPF refunds in favor of the taxpayer (when withholdings and payments on account exceed the final quota), VAT refunds (balances in favor of the taxpayer), Corporate Tax refunds, or other taxes managed by the AEAT.
  • Refunds of undue payments: when an amount has been paid that was not owed (due to error in self-assessment, duplicate payment, prescription, annulment of a settlement, etc.), the AEAT processes the refund procedure of the undue payment regarding the taxes and resources it manages.
  • Compensation and refund: it can offset pending tax debts with the taxpayer's credit balances and, to the extent appropriate, order the refund of the excess amounts.
  • Collection management of other entrusted resources: in certain cases, the AEAT collects revenues from other entities (for example, some fees or other public law resources). In those cases, it also processes related refunds, but always within the framework of the agreement or norm that assigns that management.

In summary, the AEAT can only refund taxes, fees, and other resources whose tax or collection management has been assigned to it. It does not handle Social Security contributions or other resources outside its scope, unless a norm expressly entrusts it with that function.

2. Competences of the General Treasury of Social Security in refunds

The TGSS is the Social Security body responsible for the collection management of Social Security contributions, joint collection of other contributions (unemployment, vocational training, FOGASA, etc.), and other system resources. In refunds matters, its competences include:

  • Refunds of unduly paid contributions: if a company or worker has overpaid contributions, contributed for a period that did not correspond, applied incorrect bases or rates, or the obligation to contribute is annulled, the TGSS processes the refund of undue payments of those contributions.
  • Adjustments derived from reviews of labor situations or registration/deregistration: for example, when it is recognized that there was no obligation to register in a certain period or affiliation data affecting the contribution obligation are corrected.
  • Compensation with Social Security debts: as in the tax field, the TGSS can offset amounts to be refunded with pending debts of the same taxpayer with Social Security before making the actual refund.
  • Other system resources: the TGSS also manages other public law revenues of the Social Security system; regarding these, it is equally competent to process refunds of undue payments as appropriate.

Therefore, the TGSS acts on Social Security contributions and system resources, not on state taxes (IRPF, VAT, corporate tax, etc.), which are under the AEAT's competence.

3. Limits and coordination between both bodies

The essential criterion to determine who has competence in a refund is the nature of the income:

  • If the income is a state tax (IRPF, VAT, Corporate Tax, state fees…) or another tax-related resource managed by the AEAT, the refund corresponds to the AEAT.
  • If the income consists of Social Security contributions or other system resources (including joint collection of unemployment, vocational training, FOGASA…), the refund corresponds to the TGSS.

Each body can only process refunds on the concepts it manages and with the procedures established in its specific regulations. When a file has mixed elements (for example, IRPF withholdings managed by AEAT and Social Security contributions managed by TGSS), each entity resolves only on its part. There is no “single” shared refund procedure: coordination occurs, if any, through information exchange, but with separate files and well-defined competences.

What additional legal requirements must be met for an authorized representative to process the refund on behalf of a taxpayer?

For an authorized representative to process a refund on behalf of a taxpayer in Spain, it is not enough that the taxpayer “informally says so”: a series of legal and formal representation requirements must be met. These requirements aim to ensure that the Tax Administration (AEAT or regional body) deals with a person effectively authorized and that the taxpayer's rights are respected.

1. Existence of a valid power of representation

The first requirement is that there is a valid power of representation. In the tax field, this is usually structured in two ways:

  • Notarial power of attorney or private document with legitimized signature: the taxpayer grants power to a third party to act before the Tax Administration, generally or for certain procedures (for example, filing returns and requesting refunds). The document must clearly identify:
    • Data of the principal (taxpayer) and the attorney-in-fact (representative).
    • Scope of the power: whether it includes the request and collection of refunds.
    • Date of granting and valid signature.
  • Authorization before the AEAT or tax body: the taxpayer designates their representative through systems enabled by the Administration (electronic headquarters, specific authorization form, representative registry, etc.). It must include:
    • The NIF/NIE of both.
    • The type of procedure for which power is granted (filing returns, inquiries, receiving notifications, and, if applicable, refunds).

Without this power of representation, the Administration may require correction and, ultimately, not admit the representative's action.

2. Formal identification of the representative

The representative must identify themselves reliably before the Administration. Depending on the channel:

  • In person: by official identity document (DNI, NIE, valid passport) and, if applicable, providing the power or representation document.
  • Electronically: through electronic certificate, DNIe, Cl@ve, or another accepted system. In these cases, the Administration will verify that the person who signs electronically is the same to whom the power was granted.

3. Express scope of representation regarding the refund

Not all powers allow any action. To process a refund, it is important that the power:

  • Includes expressly the authority to request refunds or, if applicable, to receive them on behalf of the taxpayer.
  • If it is intended that the refund be deposited into a bank account of the representative, it is especially advisable that this authority appears clearly and specifically, to avoid conflicts or possible later challenges.

The Administration may require proof that the taxpayer consents both to the request and the destination of the refund.

4. Compliance with data protection and tax secrecy rules

Tax information is protected by tax secrecy and data protection regulations. Therefore:

  • The representative can only access the taxpayer's data to the extent that the power legitimizes it.
  • The Administration will only provide detailed information to the representative if duly accredited.
  • The representative must use the data exclusively for the entrusted management and keep it confidential.

5. Correct submission of the refund request

Besides the power, the representative must comply with the formal requirements of the request:

  • Use the official model or declaration form that originates the refund (for example, IRPF, VAT, etc.).
  • Correctly indicate the taxpayer's data and, if applicable, state that they act on their behalf.
  • Attach the necessary documentation (withholding certificates, invoices, certificates, etc.).
  • Identify the payment account, specifying the holder, and respect what appears in the power of representation.

6. Conservation of the power and possible verification

Finally, the representative must keep the representation document while the refund may be subject to verification or review. The Administration may require at any time:

  • Exhibition of the power or the registered authorization receipt.
  • Clarification of the scope of representation when there are doubts.

In summary, for an authorized representative to process a refund on behalf of a taxpayer, it is essential to formally prove the representation, clearly define its scope (including the request and, if applicable, collection of the refund), correctly identify the representative, and comply with the formal and confidentiality requirements demanded by tax and data protection regulations.

Play

Test your knowledge with FREN!

How much do you know about this topic? Answer the following 3 questions.

What is the general deadline to request the refund of an undue payment to the Tax Agency or Social Security?

Question 1 of 3

What document is essential to keep in order to claim the refund of an undue payment?

Question 2 of 3

What happens if a person has outstanding debts with Social Security when requesting the refund of an undue payment?

Question 3 of 3

Hola, soy Fren. ¿Cómo te ayudo?