flatin.pt

Description

Two shortcodes for sites that write about buying property in Portugal.

  • [flatin_imt value="250000"] — what a purchase costs on top of the price:
    IMT, stamp duty and the price of registering the purchase.
  • [flatin_imi concelho="porto"] — the yearly property tax (IMI) rate for a
    municipality, with the tax year next to it.

Rendered on your server, into your page. No iframes and no client-side
drawing: the output is part of your HTML, so it is styled by your theme,
readable without JavaScript, and visible to search engines.

Where the numbers come from. IMT is calculated from the official 2026
tables. IMI rates were harvested from the Autoridade Tributária portal and
then verified line by line against that same source — all 308 municipalities.
Where a municipality sets no single rate (it sets one per freguesia instead),
the plugin says so rather than printing a zero. The registration line is not a
guess either: it is the published price of the Casa Pronta counter of the
Ministério da Justiça for one registration act. It does not cover the purchase
contract at a notary or a solicitador, and the shortcode says so under the
table.

Shortcode options

  • [flatin_imt value="250000" territory="regioes_autonomas"] — the Azores
    or Madeira scale (default: continente, mainland Portugal).
  • [flatin_imt value="250000" primary="no"] — not the buyer’s own permanent
    home (default: yes).
  • [flatin_imt value="250000" young="yes"] — the reduced IMT table and the
    stamp duty deduction for buyers aged 35 or under buying their first own
    permanent home (default: no).
  • [flatin_imt value="250000" vpt="180000"] — the VPT (valor patrimonial
    tributário) from the caderneta predial, if known. IMT and stamp duty are
    charged on the higher of the contract price and the VPT, and the answer
    says which one it used.
  • [flatin_imi concelho="porto" vpt="180000"] — also shows the yearly IMI for
    that taxable value (VPT). concelho takes a name or the four-digit code.

Credit link

The credit link is off by default. If you would like to credit the source,
switch it on in Settings flatin.pt: results then show a small
“Calculated by flatin.pt” line with a link. While it is off, the plugin adds
no link to flatin.pt anywhere in your pages — not even when the service is
unreachable — and the calculators work exactly the same either way.

Who we are

flatin.pt is a lead-generation platform for property in Portugal. It is not
a real-estate agency and holds no AMI licence
; the service itself is
provided by licensed agencies. The results are estimates from official tables,
not tax advice. This plugin sells nothing and collects nothing.

External services

This plugin connects to the flatin.pt API (https://flatin.pt/api/v1), run
by flatin.pt, to calculate taxes and look up IMI rates. The calculations are
done there so that one maintained tax table serves every site. Without this
service the shortcodes cannot show results.

When. Only when a page containing a shortcode is rendered and the answer
for that exact input is not already cached in your site’s database. Answers
are stored as transients: IMI rates for one day, IMT calculations for one
hour, invalid input (for example a misspelt municipality) for one hour. No
request is made on activation, from the settings screen, or on pages without
a shortcode.

What is sent.

  • [flatin_imt]: an HTTPS POST to https://flatin.pt/api/v1/imt/calculate
    with the price, the VPT if the shortcode gives one, the territory, and the
    two yes/no options from the shortcode.
  • [flatin_imi]: an HTTPS GET to https://flatin.pt/api/v1/imi/rates/{municipality}
    with the municipality name or code from the shortcode. The taxable value
    (vpt) is not sent: the yearly amount is calculated on your server.

Each request identifies the plugin with the User-Agent
flatin-pt-wordpress/1.0.3 (+https://flatin.pt/). Nothing about your
visitors is sent
: no visitor IP address, page URL, referrer, cookies or
identifiers. As with any HTTPS request, the flatin.pt server sees the IP
address of your web server; it is kept in server logs as described in the
privacy policy.

  • Terms of use: https://flatin.pt/en/legal/termos-utilizacao/
  • Privacy policy: https://flatin.pt/en/legal/privacidade/
  • API documentation: https://flatin.pt/en/tools/api-and-data/

Screenshots

Installation

  1. Install the plugin from the Plugins screen, or upload the flatin-pt folder to /wp-content/plugins/.
  2. Activate it.
  3. Put a shortcode into any post, page or widget, for example [flatin_imt value=”250000″].
  4. Optional: turn on the credit link in Settings flatin.pt.

FAQ

Does it work without JavaScript?

Yes. The whole output is rendered on the server.

Does it slow my page down?

The first render of a given input makes one HTTPS request with a five-second
timeout; after that the answer is served from your own database until the
cache expires. The stylesheet loads only on pages that actually use a
shortcode.

What happens if flatin.pt is unreachable?

The block shows a short notice that the calculation service did not answer,
and the rest of your page renders as usual. If you turned the credit link on,
the notice also links to the calculator on flatin.pt.

Does it collect data about my visitors or set cookies?

No. The plugin reads nothing about the visitor and sets no cookies. See
“External services” above for exactly what is sent.

Can I use it for a municipality that has no single rate?

Yes, and the plugin will tell your readers exactly that. Printing a zero there
would be untrue.

Is it available in Portuguese?

Translations are delivered through translate.wordpress.org. On a site set
to Portuguese, the output and the settings screen switch to Portuguese once
the pt_PT translation is published there.

What is removed when I delete the plugin?

The credit-link setting and every cached answer the plugin stored.

Reviews

There are no reviews for this plugin.

Contributors & Developers

“flatin.pt” is open source software. The following people have contributed to this plugin.

Contributors

Translate “flatin.pt” into your language.

Interested in development?

Browse the code, check out the SVN repository, or subscribe to the development log by RSS.

Changelog

1.0.3

  • Translations are no longer bundled; WordPress loads them from
    translate.wordpress.org.

1.0.2

  • New vpt attribute for [flatin_imt]. IMT and stamp duty are charged on
    the higher of the contract price and the VPT; the table now says which one
    it was calculated on, and without a VPT says that a higher VPT would raise
    both taxes.
  • The Casa Pronta amounts in the note under the table come with the answer
    from flatin.pt instead of being written into the plugin.

1.0.1

  • The third line of the purchase table is named for what the figure actually
    is: the published price of registering the purchase at the Casa Pronta
    counter, not an estimate for the deed. The note under the table now names
    that source, says the contract at a notary or a solicitador is charged
    separately, and warns that buying with a mortgage costs more.

1.0.0

  • First release: [flatin_imt] and [flatin_imi], server-side rendering,
    transient caching, Portuguese translation, opt-in credit link (off by
    default).