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
ReferenceMoney and banking

LanguageValues and typesStandard typesMoney and banking

BankAccount

On this page

A bank account to pay into or take from, in any country.

Use it when an account could be from anywhere. It holds a UK sort code and account number, an IBAN, or another country's details, and you choose which you were given.

Shape

One of these, each with its own fields:

Variant Field Type Required?
BankAccount.uk sort_code UkSortCode Yes
account_number UkAccountNumber Yes
BankAccount.iban iban Iban Yes
BankAccount.other country Country Yes
bank_code Text No
account_number Text Yes

Example

example
BankAccount.uk { sort_code: "089999" account_number: "66374958" }

Good to know

  • The others are BankAccount.iban { iban: ... } and BankAccount.other { country: ... bank_code: ... account_number: ... }.
  • text.format shows only the last four digits, •••• 4958.
  • == tells you whether two are the same. < and list.sort_by don't take it.
  • A field that holds one counts as personal data (financial), so you don't mark it yourself.

In JSON

An object of its variant's name, as tag, and the variant's fields, in a request, a response or json.write:

json
{"tag":"uk","sort_code":"089999","account_number":"66374958"}{"tag":"iban","iban":"GB29NWBK60161331926819"}{"tag":"other","country":"US","bank_code":"021000021","account_number":"123456789"}

Details

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

BankAccount is in the group Money and banking, 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 6 columns, each named for the field, _ and its suffix. This is {"tag":"other","country":"US","bank_code":"021000021","account_number":"123456789"}:

Column Type Holds
<field>_kind text 'other'
<field>_sort_code text NULL::text
<field>_account_number text '123456789'
<field>_iban text NULL::text
<field>_country text 'US'
<field>_bank_code text '021000021'

How it is shown to people

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

With locale: Locale.en_gb:

Value Shown
{"tag":"uk","sort_code":"089999","account_number":"66374958"} •••• 4958
{"tag":"iban","iban":"GB29NWBK60161331926819"} •••• 6819
{"tag":"other","country":"US","bank_code":"021000021","account_number":"123456789"} •••• 6789
{"tag":"other","country":"NZ","bank_code":null,"account_number":"010202012345600"} •••• 5600

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-bank-account.md.Built from Jadpo main at aee2e8f.