Skip to content

Conversation

@Megamind51
Copy link
Contributor

The European union API to validate TINs do not work for foreigners living in Bulgaria that have to submit a personal foreigner number. Given the API answer is the same as an incorrect TIN we can’t rely on it to verify Bulgarian TINs.
We fix this issue by setting BG TIN checks for natural-persons in tin-validator with validateInternally: true, forcing to run your internal check instead of European union API call.

Ticket:
https://uphold.atlassian.net/browse/BKO-6360

Copilot AI review requested due to automatic review settings January 8, 2026 14:16
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR addresses a validation issue for Bulgarian Taxpayer Identification Numbers (TINs) for natural persons. The European Union API does not properly validate TINs for foreigners living in Bulgaria with personal foreigner numbers, returning the same response as an incorrect TIN. The fix forces internal validation for Bulgarian natural person TINs instead of relying on the EU API, which aligns with the approach already used for several other countries.

Key Changes:

  • Added validateInternally: true flag to the Bulgaria (BG) natural person TIN configuration

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Contributor

@vitorcoxta vitorcoxta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM to be moved to QA

Copy link

@antoniogferreira antoniogferreira left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Grant that tin from Bulgaria only check the amount of digits
Grant that tin from Bulgaria don't perform a check to VIES
Grant that others countries continue to be validated by VIES

@antoniogferreira antoniogferreira added the QA Approved Approved by QA Team label Jan 9, 2026
Copy link
Contributor

@vitorcoxta vitorcoxta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@vitorcoxta vitorcoxta merged commit d3c0518 into master Jan 9, 2026
10 checks passed
@vitorcoxta vitorcoxta deleted the support/validate-bulgaria-natural-persons-internally branch January 9, 2026 17:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

QA Approved Approved by QA Team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants