Updated: July 2026 · 10 min read
Housing & mortgages · Spain

I can't pay my mortgage: your legal options and the Code of Good Banking Practices

Falling behind on your mortgage does not mean losing your home tomorrow. Spanish law puts several walls between you and eviction: the Code of Good Banking Practices (RD-ley 6/2012, expanded in 2022), which obliges the banks that signed up to restructure the debt of vulnerable households and even to accept handing over the home to cancel the debt; a legal floor on how many missed payments it takes before the bank can call in the whole loan; and, if it reaches court, your right to oppose and to have a judge review abusive clauses. This guide explains what that Code is, who qualifies, what measures you can ask for (restructuring, a partial write-off, dación en pago with social rent), what deadlines stop the clock, and what to do if your case is already in foreclosure. We will not tell you whether it is wiser to hand over the home or refinance — that decision is yours — but we will set out exactly what rights you have and how to trigger them. The worst move is to go silent and simply stop paying without telling the bank.

What the Code of Good Practices is

The Code of Good Banking Practices (Código de Buenas Prácticas, CBP) was created by RD-ley 6/2012 and expanded by RD-ley 19/2022. It is a code banks sign up to voluntarily — but with one crucial consequence: a bank that adhered to it, and nearly every major Spanish bank did, is BOUND by it. «Voluntary» does not mean your bank can ignore it once it has signed.

Review my letter or claim — €9.90

The CBP is not a favour the bank grants out of goodwill: it is a catalogue of measures an adhering bank must apply when the borrower meets the legal requirements. Its purpose is to reorganise the debt on your main home before the problem ends in eviction.

There is a PERMANENT track for households at the so-called exclusion threshold (the most vulnerable), with a set of staged measures: first restructuring, then a possible partial write-off (quita), and, as a last resort, dación en pago — handing over the home — with the right to social rent.

There are also TIME-LIMITED measures introduced by RD-ley 19/2022 for at-risk middle-income households (for example, mortgages below a set amount, signed before the end of 2022, where the instalment eats up roughly 30–50% of income and income sits under a higher IPREM multiple than the permanent track). These were introduced with application windows and have been extended: they are not permanent, so you must check whether the window is currently open before relying on them.

The first practical rule: the CBP is triggered by the borrower. The bank does not apply it on its own. You have to request it in writing and prove your situation — the rest of this guide explains how.

Who qualifies: the vulnerability threshold

  • The permanent CBP track is aimed at households at the «exclusion threshold» (umbral de exclusión). The three usual pillars are: household income no higher than three times the annual IPREM (calculated over 14 payments), a mortgage burden that has worsened significantly relative to income, and the mortgaged property being the borrower's sole and habitual home.
  • The IPREM multiple can be raised where the family faces circumstances of special vulnerability: dependent children, members with a disability or in a situation of dependency, victims of gender violence, single-parent families with children, among others. In those cases the income ceiling is higher.
  • The second route, the RD-ley 19/2022 track for middle-income households, targets families who do not reach the exclusion threshold but still face a disproportionate mortgage effort. Its requirements (maximum loan amount, signing date, share of income spent on the instalment, income ceiling) are different and subject to extended application windows: check whether they are open.
  • Investment properties, second homes and commercial premises do not count as a protected habitual home. The CBP protects the home you actually live in, not property wealth in general.
  • Even if you do not fit either track today, the IPREM figures and the application windows change every year: it is worth recalculating your situation rather than ruling yourself out on the basis of an old snapshot of your income.
NAVILook at my situation and show the right thing to do

Upload it — in 24h for €9.90 we tell you your stage, whether the Code of Good Practices applies and what protects you now.

0/800 characters

Your options: restructuring, quita, dación

  • The CBP measures apply in a staged order; you cannot jump straight to the last one. First the bank assesses whether the debt is viable with a restructuring; only if it is not does the next step open.
  • Restructuring: the first step. It can include a grace period of up to five years on principal repayment, extending the total loan term up to 40 years, and a reduced interest rate during the grace period. The instalment falls because you repay less principal for a while, not because the debt disappears.
  • Quita (partial write-off): if the bank concludes that restructuring does not make the loan viable, it MAY offer a quita — a reduction of part of the outstanding debt. It is a power the bank holds within the Code, not an automatic right of the borrower.
  • Dación en pago: if neither restructuring nor a write-off resolves the unviability, the last resort applies. You hand the home to the bank, and doing so extinguishes the WHOLE debt — not just the part covered by the home's value. On top of that, you have the right to stay in the home as a tenant on social rent (alquiler social) for a period, at a capped rent.
  • That full extinction is the big difference from an ordinary foreclosure: here no residual debt keeps chasing you afterwards. We explain that contrast in the foreclosure section below.
  • This guide describes what each measure is and what it protects, not which one is right for you. Whether handing over the home, refinancing or negotiating a write-off is the best financial decision depends on your circumstances and, where needed, on professional advice: the law gives you the options, the choice is yours.

Deadlines and what stops the clock

  • A couple of missed instalments do NOT let the bank demand the whole loan at once. Since Ley 5/2019 (the mortgage credit law), early termination (vencimiento anticipado) is only allowed once arrears reach 12 monthly instalments or 3% of principal in the first half of the loan term, or 15 instalments or 7% in the second half. Below those thresholds, accelerating the whole debt is unlawful.
  • That gives you a real window to act before the debt balloons. The sooner you request the CBP and document your vulnerability, the more room the bank has to restructure rather than foreclose.
  • When you submit the CBP request with your vulnerability documentation, the bank must respond. It is not an inbox it can leave unanswered: an adhering bank has to process your application.
  • For vulnerable households there is also a suspension of evictions (suspensión de lanzamiento) on the habitual home, which has been extended repeatedly through successive decrees. It has no fixed, stable expiry date: check what the current end date is for your case.
  • On the court side there are short, non-extendable deadlines to oppose once you receive the foreclosure claim. Missing that deadline closes doors, so the foreclosure clock runs differently — and faster — than the clock on negotiating with the bank.

Documents to gather

  • Proof of income for the whole household: your latest tax return, work-history certificate (vida laboral), payslips or a certificate of benefits (unemployment, pensions). This is what shows you fall below the IPREM multiple.
  • A collective empadronamiento certificate (everyone living in the home) and the family book (libro de familia), to show how many people make up the household and whether there are children or other circumstances of special vulnerability.
  • The mortgage deed and your latest loan statements. The deed holds facts key to your defence: the interest rate (for example, whether it is IRPH), the early-termination clause and the default interest (intereses de demora), which may be reviewable as abusive.
  • Proof that the home is your only property (a Land Registry nota simple and a cadastral certificate) and that it is your habitual residence. The CBP only protects a sole and habitual home.
  • All communication with the bank in writing: the CBP request, its replies, letters and burofaxes. If the case reaches court, that correspondence proves you tried the Code route first.

Step by step: from arrears to a solution

  • As early as possible, contact the bank IN WRITING and expressly request to be covered by the Code of Good Practices, attaching your vulnerability documentation. Silence and simply stopping payment are the worst option: they shut down negotiation and speed up foreclosure.
  • Gather the evidence from the section above before you apply, so the bank cannot drag out the process by asking for documents one at a time. A complete file speeds up the response.
  • Check which track you can use: the permanent one (exclusion threshold, income under 3× IPREM, sole and habitual home) or the temporary RD-ley 19/2022 track for middle-income households, if its application window is still open.
  • When the bank responds, look at which measure it offers and which step you are on (restructuring, quita or dación). Remember the order is staged: dación en pago only comes into play if the earlier steps do not make the loan viable.
  • Lean on free help: the PAH (Plataforma de Afectados por la Hipoteca — Platform for People Affected by Mortgages), municipal housing offices and social services give guidance at no cost. You never need to pay anyone upfront to «stop the eviction».
  • If you have already received a foreclosure claim (demanda de ejecución hipotecaria), do not let the opposition deadline pass: it is short and strict. That is where abusive clauses are raised, and where having your file reviewed early pays off.

Costly mistakes to avoid

  • Stopping payment without telling the bank. Silent non-payment freezes nothing: it runs down the early-termination thresholds and moves you towards foreclosure without triggering any of the Code's protections.
  • Assuming that because the CBP is «voluntary» your bank is not bound. If the bank signed up — and almost all did — complying is mandatory. Check the adhesion before writing that route off.
  • Paying upfront to anyone who promises to «stop your foreclosure» or «cancel your mortgage». The CBP and court defences are free legal rights; distrust anyone charging an advance fee to activate them.
  • Signing a dación en pago or a loan novation without understanding what it does and does not extinguish. The CBP dación wipes out the whole debt; other private deals can leave residual debt behind. Read exactly what you are signing.
  • Ignoring the foreclosure claim when it arrives. Failing to oppose in time closes the door to raising abusive clauses and to having a judge review the early-termination clause, the IRPH or the default interest.
  • Ruling yourself out on an old snapshot of your income. The IPREM multiples and application windows change; recalculate your situation before assuming you fail the threshold.

If it reaches foreclosure (ejecución)

  • Foreclosure (ejecución hipotecaria) begins when the bank files a claim with the court. You will be served notice and, from then, you have a legal — and short — deadline to OPPOSE. Not doing so means giving up your best defence.
  • In the opposition you can raise abusive clauses: an unlawful early-termination clause, disproportionate default interest, or an untransparent IRPH. The EU Court of Justice (the Aziz ruling and later cases) forced Spain to let judges review such clauses in foreclosures on their own initiative, and an abusive clause can halt or reshape the process.
  • Here is the big difference from dación en pago: in an ordinary foreclosure, if the auction price does not cover the whole debt, a shortfall debt can survive and keep pursuing you even after you lose the home. The CBP's dación en pago, by contrast, extinguishes the debt in full.
  • If you are a vulnerable household, remember the eviction suspension extended by successive decrees: it can postpone the eviction, but it has a current end date you must check — not an open-ended validity.
  • No one can guarantee the foreclosure will stop: it depends on the wording of your deed, the deadlines and the judge's assessment. What you can do is not miss the deadlines, have your clauses reviewed, and reach court with your file in order.

Find out what stage you're at — 24h review for €9.90

Received a letter from your bank, or a court foreclosure demand (demanda de ejecución hipotecaria)? Upload it — in 24h for €9.90 we tell you what stage you are at, whether the Code of Good Practices applies to you, and what protects you right now. We do not promise to stop the foreclosure — no honest service does — but you will know your deadlines and your rights exactly. And if you need the full route, the €59 action plan maps out the steps of your case.

✓ Free · ✓ No account · ✓ A few minutes

Frequently asked questions

I've missed 2 payments — can they take my home now?

No. Since Ley 5/2019 the bank cannot call in the whole loan until arrears reach 12 monthly instalments or 3% of principal in the first half of the loan term, or 15 instalments or 7% in the second half. Two missed payments do not allow foreclosure. That said, default interest is running, so this is the moment to write to the bank and request the Code of Good Practices — not to hide.

Who counts as a vulnerable household for the Code?

The permanent track broadly requires household income no higher than three times the annual IPREM (14 payments), a mortgage burden that has worsened significantly, and the property being your sole and habitual home. The multiple rises if there are dependent children, disability, dependency, gender violence or a single-parent family. There is also a temporary track (RD-ley 19/2022) for middle-income households with different requirements and extended application windows: it is worth checking whether they are still open.

What is dación en pago, and does the debt fully go?

Dación en pago means handing the home to the bank to settle the mortgage. Within the Code of Good Practices it has a decisive advantage: it extinguishes the WHOLE debt — not just the part covered by the home's value — so no residual debt keeps chasing you afterwards. It is the Code's last step: it only applies if restructuring and a possible write-off do not make the loan viable.

If I hand over the home, can I stay living in it?

The Code of Good Practices provides that, after dación en pago, you can remain in the home as a tenant under social rent (alquiler social) for a period, at a capped rent. It is a right set out in the Code for households that meet the requirements, not a discretionary favour from the bank. The exact conditions depend on your situation and on the agreement itself.

They've started foreclosure — is it too late?

Not necessarily. When you receive the foreclosure claim you have a short, strict legal deadline to oppose, and there you can raise abusive clauses: an unlawful early-termination clause, disproportionate default interest, or an untransparent IRPH. The EU Court of Justice obliged Spanish judges to review such clauses in foreclosures. No one can guarantee it will stop, but failing to oppose in time does close the door to defending yourself.

Is my bank obliged to apply the Code of Good Practices?

The Code is voluntary to sign up to, but nearly every major Spanish bank adhered to it, and a bank that adhered is bound to comply. «Voluntary» does not mean your bank can ignore it once it has signed. Check whether your bank is on the list of adhering entities before writing that route off.

Someone offered to stop my foreclosure for a fee — can I trust them?

Be wary. The Code of Good Practices and court defences are legal rights that do not cost an upfront commission. You can get free help from the PAH (Plataforma de Afectados por la Hipoteca), municipal housing offices and social services. No honest service will guarantee, for money, that it will stop a foreclosure: the outcome depends on your deed, the deadlines and the judge.

Official sources

Informational guide on legal options and rights, not financial or individualised legal advice. We do not decide for you whether to hand over the home or refinance, and we do not guarantee that a bank will grant a measure or that a foreclosure will be stopped. Based on RD-ley 6/2012, RD-ley 19/2022 and Ley 5/2019 as of July 2026; some measures are subject to extendable application windows that should be verified.

Find out what stage you're at — 24h review for €9.90 Review my letter or claim — €9.90

📩 Foreigners are the last to hear what affects them directly — laws, rules, new fees and opportunities.

We won't forget you. Leave your email — we'll explain it simply, in your language.

Protection Plan · subscription

Need everyday protection, not just a one-off check?

Included: checks of Spanish documents, letters, requests and contracts before signing, Action Plans, consultation and sending your claims by burofax.

€29.90 / month VAT included. Open Protection Plan
Scroll to Top
© 2026 RightNOW · Legal Notice · Privacy Policy · Terms · About · Contact