Generator · Cypriot data

Cyprus TIC

Endpoint GET /v1/cy/tic

What it covers

Returns a valid Cyprus TIC (Tax Identification Code) — 8 digits plus a correct check letter. Use `format=vat` for the CY VAT number (`CY` + TIC). Set `invalid=true` for a TIC with a deliberately wrong check letter.

How it’s calculated

The Cyprus TIC appends one check letter A–Z equal to a position-dependent weighted digit sum taken modulo 26, where even-index digits are remapped through a fixed lookup table and odd-index digits count at face value.

Algorithm

  1. Start from the 8-digit body (a plain digit string of exactly 8 digits). The first digit is 1–9 (never 0) and the whole body never begins with the reserved prefix '12'; these are issuability rules, not part of the checksum arithmetic.
  2. Index the 8 digits left-to-right as positions 0 through 7.
  3. For each EVEN-index digit (positions 0, 2, 4, 6), replace the digit value d with the mapped value from the table EVEN_DIGIT_MAP = [1, 0, 5, 7, 9, 13, 15, 17, 19, 21], i.e. d indexes into that array: 0->1, 1->0, 2->5, 3->7, 4->9, 5->13, 6->15, 7->17, 8->19, 9->21.
  4. For each ODD-index digit (positions 1, 3, 5, 7), use the digit's face value unchanged.
  5. Sum all eight contributions (four mapped even-position values plus four face-value odd-position digits) into a single total.
  6. Compute total modulo 26.
  7. Convert that remainder (0–25) into a letter by indexing into the alphabet 'ABCDEFGHIJKLMNOPQRSTUVWXYZ': 0 -> 'A', 1 -> 'B', ..., 25 -> 'Z'. This is the check letter.
  8. The TIC is the 8-digit body followed by the check letter (national form). The VAT form is the same value prefixed with 'CY'.

Worked example

Cyprus TIC body 10203040 with check letter ? (national form 10203040?)

Body digits by index: pos0=1, pos1=0, pos2=2, pos3=0, pos4=3, pos5=0, pos6=4, pos7=0.
Even positions (0,2,4,6) remapped through EVEN_DIGIT_MAP=[1,0,5,7,9,13,15,17,19,21]: pos0 digit 1 -> map[1]=0; pos2 digit 2 -> map[2]=5; pos4 digit 3 -> map[3]=7; pos6 digit 4 -> map[4]=9.
Odd positions (1,3,5,7) at face value: pos1=0, pos3=0, pos5=0, pos7=0.
Sum = (0 + 5 + 7 + 9) + (0 + 0 + 0 + 0) = 21.
21 mod 26 = 21.
Index 21 into 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' (A=0): letter is 'V'.

The check letter is 'V', giving the national TIC 10203040V (VAT form CY10203040V).

Edge cases

  • The body's first digit is drawn 1–9, so a TIC never begins with 0; a leading-zero body is not issuable in this generator.
  • The reserved body prefix '12' is never issued — bodies starting '12' are redrawn (isIssuableBody rejects them).

Gotchas

  • The 'weight' is not a multiplier: even-index digits are transformed through a lookup table (EVEN_DIGIT_MAP), not multiplied by a weight, while odd-index digits pass through unchanged.
  • The check character is a Latin letter A–Z from a mod-26 residue, not a digit; the alphabet is the plain 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' with A=0.
  • The VAT number is exactly 'CY' + the national TIC (same 8 digits + same check letter); the 'CY' prefix does not participate in the checksum.

Parameters

ParameterTypeDescription
countinteger1–1000Number of records to return, 1–1000 (your plan may lower this). Omitted returns a single record; set it for a batch.
edgebooleanRestrict output to valid edge-case TICs from the rare corners.
extremebooleanReturn a correct value wrapped in a hostile encoding (untrimmed whitespace, invisible/zero-width characters, BOM, or bidi/combining marks). Homoglyphs are excluded so the value stays machine-parseable; it still validates after normalisation.
format"national" | "vat"Rendering: bare national TIC (default) or CY VAT number.
invalidbooleanReturn a TIC with a deliberately wrong check letter.
seedintegerInteger seed for reproducible output: the same seed always yields the same record.

Response fields

FieldTypeDescription
valuestringThe TIC in the requested format (national or CY VAT).
digitsstringThe canonical 8-digit body.
letterstringThe single check letter derived from the digits.

Other generators for Cyprus

See all generators for Cyprus →

The same kind of identifier elsewhere

Try it

Generate a live example below — every response is valid by format and entirely synthetic.