Next.js developer in Gdańsk

Next.js for businesses in Gdańsk, delivered remotely by one developer.

Next.js developer

My place in the WordPress community

  • I have had a wordpress.org account since 2006.
  • I contributed to WordPress core for versions 7.0 and 7.1.
  • I maintain 30 plugins on wordpress.org.
  • I organise and speak at WordCamps.
  • I have attended every WordCamp Europe from 2017 to 2026.
  • Local WordPress meetup: WordUp Trójmiasto

My WordPress.org profile

Main building of Gdansk University of Technology

The main building of Gdansk University of Technology, photographed by Ewaku and published under CC BY-SA 3.0 on Wikimedia Commons.

A platform that pays Polish suppliers, or a back office that issues invoices to Polish companies, sooner or later has to ask whether the counterparty is a registered VAT taxpayer and whether the bank account on the invoice is the one the tax office knows. The Ministry of Finance publishes this as the “wykaz podatników VAT”, usually called the white list, and as an API. I am Mariusz Szatkowski, a developer in Gdynia, a few kilometres from Gdansk, and I build such checks into Next.js back ends remotely and in writing.

#What is the VAT white list API?

The Ministry’s page on the API describes it as an interface to the list of subjects registered, not registered, removed and restored in the VAT register. It has three parts:

  • Search. The full method. You give a NIP, a REGON or a bank account number and a day, and you get all list data on the subject for that day, plus a unique identifier that confirms the query.
  • Check. The short method. You give a NIP or REGON, a bank account number and a day, and you get “TAK” or “NIE” for whether the account is assigned to that subject on that day, plus the identifier.
  • API WL2. A status call by NIP and date that returns the VAT status, the date, the response time and a query identifier.

The published description lists the endpoints as GET calls that return JSON: /api/search/nip/, /api/search/nips/, /api/search/regon/, /api/search/bank-account/, /api/check/nip/ with a bank account, and /api2/status/nip/. The identifier is the useful part for an audit trail: the Ministry says it is an electronic key confirming that the query was made, and it records which subject was asked about, for which day the answer was given and when the question was sent.

#Which address should new code use?

The Ministry’s page says the production service moved on 15 October 2026 from wl-api.mf.gov.pl to wykazpodatnikowvat.mf.gov.pl, with a changed security certificate. The old address was announced as served until 1 December 2026. An unauthenticated request to the old host still returned data on 4 December 2026, but any code or bookmark that still points there is living on borrowed time.

The addresses valid from 15 October 2026 are:

UseAddress
Production, search and checkhttps://wykazpodatnikowvat.mf.gov.pl/api/
Production, WL2 statushttps://wykazpodatnikowvat.mf.gov.pl/api2
Test, search and checkhttps://wykazpodatnikowvat-test.mf.gov.pl/api/
Test, WL2 statushttps://wykazpodatnikowvat-test.mf.gov.pl/api2

In a Next.js project the base URL belongs in a server-only environment variable. The Next.js environment variables guide says variables without the NEXT_PUBLIC_ prefix are available only in the Node.js environment, so a staging deployment can point at the test host and production at the live host with no code change, and the next host move is a configuration edit.

#What are the request limits?

The Ministry states them in one paragraph, and they shape the architecture:

  • Search: 100 requests per day, each with up to 30 subjects. The API description confirms the 30 for the NIP list and for the bank account list.
  • Check: questions about up to 5000 subjects.
  • API WL2: 50,000 requests per day.
  • Blocking: after one of the limits is used up, access can be blocked until 0:00. The block covers search, check and the web search on the list’s portal. The Ministry adds that blocking is optional on its side and that its security systems also stop queries that come too fast, without publishing the details.

Hundred search requests with thirty subjects is 3000 subjects a day at best. A payment run for a few hundred suppliers fits, but a call per page view or per keystroke does not. For very large volumes the Ministry points to a flat file, published daily at midnight, with NIP and account pairs protected by one-way hash functions, so only a holder of a correct NIP and account pair can confirm that it appears. The data are updated once per working day, as the VAT act also says.

#How do I query the white list from a Route Handler?

The call belongs on the server. A Route Handler handles it as a POST from your own form or job. The Next.js Route Handler documentation says handlers are not cached by default and that only GET handlers can opt in to caching. A cached white list answer is a wrong answer, so keep the handler uncached and decide on caching yourself, per day.

// app/api/vat-status/route.ts
const BASE = process.env.WL_API_BASE! // https://wykazpodatnikowvat.mf.gov.pl/api

function warsawToday() {
  return new Intl.DateTimeFormat('sv-SE', { timeZone: 'Europe/Warsaw' }).format(new Date())
}

export async function POST(request: Request) {
  const { nip } = await request.json()
  if (!/^\d{10}$/.test(String(nip))) {
    return Response.json({ status: 'invalid-nip' }, { status: 422 })
  }
  const date = warsawToday()
  const res = await fetch(`${BASE}/search/nip/${nip}?date=${date}`, {
    headers: { Accept: 'application/json' },
    signal: AbortSignal.timeout(8000),
  })
  if (!res.ok) {
    return Response.json({ status: 'unavailable', http: res.status }, { status: 502 })
  }
  const body = await res.json()
  const subject = body?.result?.subject
  return Response.json({
    status: subject ? subject.statusVat : 'not-on-list',
    date,
    name: subject?.name ?? null,
    accounts: subject?.accountNumbers ?? [],
    requestId: body?.result?.requestId ?? null,
  })
}

The date parameter is mandatory for search and check, according to the API description, so the handler sends the current day in Polish time. The code returns the account numbers because the typical question after a positive status is whether the account on the invoice appears in the list. The check endpoint answers that question directly, and it is the cheaper call when the NIP and the account are already known. A full response also has fields for addresses, representatives, authorised clerks and partners, so the handler keeps only the fields the flow needs.

#What does the API return for a status?

The description gives the values of statusVat in a search response: “Czynny” for an active VAT taxpayer, “Zwolniony” for an exempt one and “Niezarejestrowany” for a subject that is not registered. The WL2 status endpoint returns a code:

CodeMeaning
Cregistered as an active VAT taxpayer
Zregistered as an exempt VAT taxpayer
Nnot registered as a VAT taxpayer
BNIP not found in the VAT register
Iinvalid NIP
Ddate outside the allowed range
Xservice inactive

The last two are operational. D means a date outside the range the list allows, and X means the service is switched off, so a payment flow should treat X as “unknown, retry later” and never as “not a taxpayer”. A 400 response carries an error message with a code such as WL-101, and the Ministry publishes a table of error codes next to the API description.

#What does art. 96b of the VAT act say?

The consolidated text of the VAT act announced on 1 September 2026 (Dz. U. 2026 item 1263) contains art. 96b. Its provisions that matter for the build are these:

  • Ust. 1. The head of the National Revenue Administration keeps an electronic list of subjects that the head of the tax office did not register or removed from the register as VAT taxpayers, and of subjects registered as VAT taxpayers, including restored ones.
  • Ust. 2. The list is made available in the Public Information Bulletin so that it can be checked, also automatically, whether a subject is on the list on a chosen day, not earlier than within the five years before the year of the check. Data are shown as of the chosen day, except for the name, the tax number and the REGON number, which are shown as of the day of the check.
  • Ust. 3 pkt 2a. The status is “podatnik VAT czynny” or “podatnik VAT zwolniony” for registered subjects, or a note that the subject was not registered or was removed.
  • Ust. 3 pkt 13. The list shows the settlement accounts that the subject named in an identification or update notification and that were confirmed through STIR, except accounts held by the National Bank of Poland.
  • Ust. 5. Making the data public does not breach tax secrecy.
  • Ust. 7 and 8. A subject is removed from the list five years after the end of the calendar year in which it was not registered or was removed from the register, and the list is updated on working days once a day.

An amending act of 4 September 2026 (Dz. U. 2026 item 1270) changes a cross-reference inside ust. 2 from 1 January 2027, from “ust. 3 pkt 1-3” to “ust. 3 pkt 1, 2 and 3”. It is a wording change to a reference, and I read nothing else into it.

Art. 96b does not itself attach a liability exemption to a positive check, and I found none in it. What the statute does is define a list that can be queried for a chosen day, and other provisions refer to it. One example in the VAT act is art. 108g(3): for the payment duty linked to structured invoices, the VAT status of the payee as an active VAT taxpayer is set by the list as of the day the payment is made. The day of the check therefore matters. A status read last week does not describe the status on the day of payment.

Consequences for joint liability, cost deductibility or split payment sit in other provisions that I did not rely on here, and they depend on facts that only your adviser can assess. What I can build is the evidence: the answer, the day it relates to, the time of the query and the query identifier, stored next to the payment. Art. 96b(10) to (12) also say that a subject can ask the head of the tax office to correct non-personal data that does not match reality, so a mismatch is something the counterparty can fix, not something your integration has to guess around.

#How do I stay under the limits?

  • One check per payment run, not per page. Collect NIPs, deduplicate and send them in batches of up to 30 through the search by NIPs.
  • Cache per day, not longer. The list changes once per working day, so an answer is valid for the day it was asked about. Key the cache on NIP and date.
  • Use after. The Next.js after function runs work once the response is finished, which suits logging the query identifier and writing the audit record without slowing the response.
  • Treat a block as a state. If the API refuses until midnight, queue the NIPs and retry after 0:00 Polish time instead of looping.
  • Flat file for bulk. Reconciling a whole supplier master is a job for the daily file, not for thousands of search calls.

#Checklist for a white list integration

  • Point the base URL at the new host through a server-only variable, and keep a test host variable for staging.
  • Decide whether the flow needs the status, the account assignment or the full record.
  • Send the date explicitly, in Polish time.
  • Store the answer, the day, the query time and the query identifier per payment.
  • Handle the codes D and X as “unknown”, not as a negative result.
  • Ask your tax adviser which consequences of the list apply to your payments.

#How does a white list project run?

  1. You send the payment or invoicing flow, the number of counterparties per run and where the supplier data lives. My email reply says whether the daily limits cover your volume or the flat file is the better route.
  2. I write down the check, the audit record and the behaviour on a block or an outage.
  3. I build on a staging copy against the test host, and you try active, exempt, unregistered and mistyped NIPs.
  4. After your written acceptance I switch the variable to the production host and hand over the repository and the audit record format.

The first written estimate is free and counts how many white list calls a payment run needs per day. The Next.js developer page describes the wider offer, and the contact page takes the description of your payment flow.

Need this service: Next.js developer in Gdańsk?

Describe your project by e-mail. I reply within 24 hours.

Describe your project

Explore other WordPress services and knowledge base