Jadpo is experimental and not ready for production. These docs follow the compiler's main branch as of 5 Nov 2026. What's built · Install 0.3.0
jadpo
ReferenceTax and identity numbers

LanguageValues and typesStandard typesTax and identity numbers

TaxId

On this page

A taxpayer's identification number, with the country that issued it.

Use it for tax numbers from any country, such as in tax residence forms. For a known UK or US number, UkUtr, UkNationalInsuranceNumber or UsSsn checks it more closely.

Shape

Field Type Required?
country Country Yes
number Text Yes

Its parts keep these rules, and a value that breaks one fails with the rule's name:

  • number_of_country: number is in the form of its country's numbers

Example

example
TaxId { country: Country.gb number: "AB123456C" }

Good to know

  • text.format shows only the last four characters, •••• 456C.
  • == tells you whether two are the same. < and list.sort_by don't take it, so sort by one of its parts instead.
  • A field that holds one counts as personal data (government_id), so you don't mark it yourself.

In JSON

An object of its parts, in a request, a response or json.write:

json
{"country":"GB","number":"AB123456C"}{"country":"US","number":"123456789"}

Details

Text form, storage, how it is shown, and operations

TaxId is in the group Tax and identity numbers, and has been in Jadpo since 0.1.0.

Text form

It has no single text form, so text.from and text.parse don't take it.

How it is stored

It is stored in 2 columns, each named for the field, _ and its suffix. This is {"country":"US","number":"123456789"}:

Column Type Holds
<field>_country text 'US'
<field>_number text '123456789'

How it is shown to people

text.format(value, locale:) shows it to people in their locale.

With locale: Locale.en_gb:

Value Shown
{"country":"GB","number":"AB123456C"} •••• 456C
{"country":"US","number":"123456789"} •••• 6789

Operations

It also takes text.format, json.read, json.write and ==. How every standard type behaves says how they work.

Markdown for agents: /docs/types/type-tax-id.md.Built from Jadpo main at aee2e8f.