Skip to content

feat: add tax-id validator for the invoice VKN / TCKN field - #3

Merged
bahriy-dev merged 1 commit into
mainfrom
feat/tax-id-validator
Nov 12, 2026
Merged

bahriy-dev merged 1 commit into
mainfrom
feat/tax-id-validator

Conversation

@bahriy-dev

@bahriy-dev bahriy-dev commented Nov 9, 2026 •

Copy link
Copy Markdown
Owner

Turkish invoices have a single "VKN / TCKN" field, so checkout forms had to guess which endpoint to call.

What changed

  • New tax-id validator: 10 digits → VKN check, 11 digits → TCKN check
  • Returns details.kind (vkn / tckn) and details.holder (company / individual)
  • Works on GET /v1/tax-id/{value} and in POST /v1/validate
  • Added to the OpenAPI spec and README
  • 4 new tests (47 total)

Closes #2

Adds a "tax-id" type that picks the VKN or TCKN check by length and reports
whether the holder is a company or an individual. Available on GET /v1/tax-id/{value},
in the batch endpoint and in the OpenAPI spec. Adds 4 tests.

Closes #2
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 9, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-09T07:06:54.990234Z 7ea0217 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@bahriy-dev
bahriy-dev force-pushed the feat/tax-id-validator branch from 7ea0217 to d3b399c Compare November 12, 2026 18:30
@bahriy-dev
bahriy-dev merged commit 9eb89c1 into main Nov 12, 2026
7 checks passed
@bahriy-dev
bahriy-dev deleted the feat/tax-id-validator branch November 12, 2026 18:49
bahriy-dev added a commit that referenced this pull request Nov 13, 2026
Turkish invoices have a single "VKN / TCKN" field, so checkout forms had
to guess which endpoint to call.

## What changed
- New `tax-id` validator: 10 digits → VKN check, 11 digits → TCKN check
- Returns `details.kind` (`vkn` / `tckn`) and `details.holder`
(`company` / `individual`)
- Works on `GET /v1/tax-id/{value}` and in `POST /v1/validate`
- Added to the OpenAPI spec and README
- 4 new tests (47 total)

Closes #2
bahriy-dev added a commit that referenced this pull request Nov 13, 2026
Turkish invoices have a single "VKN / TCKN" field, so checkout forms had
to guess which endpoint to call.

## What changed
- New `tax-id` validator: 10 digits → VKN check, 11 digits → TCKN check
- Returns `details.kind` (`vkn` / `tckn`) and `details.holder`
(`company` / `individual`)
- Works on `GET /v1/tax-id/{value}` and in `POST /v1/validate`
- Added to the OpenAPI spec and README
- 4 new tests (47 total)

Closes #2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add a combined VKN / TCKN validator for invoice forms

1 participant