The th_tin function is a specialized utility within the mock-jutsu library designed to generate authentic Thai Tax Identification Numbers for business entities. In Thailand, the TIN serves as a critical identifier for legal organizations, including companies, partnerships, and government agencies. While the structure of a Thai TIN mirrors the 13-digit format used for the national Personal Identification Number, its application is strictly focused on commercial and fiscal compliance. By utilizing th_tin, developers can produce high-quality mock data that adheres to the exact structural requirements of the Thai Revenue Department, ensuring that database schemas and input fields are validated correctly during the development lifecycle.
Under the hood, the th_tin generator follows the standard modulus 11 checksum algorithm required for Thai identification strings. Each of the thirteen digits serves a specific purpose, with the final digit acting as a verification bit calculated from the preceding twelve digits. This mathematical precision is what makes mock-jutsu an essential tool for engineers who need valid test data that won't trigger validation errors in front-end forms or back-end processing logic. Because the library handles the complex calculation of the check digit automatically, developers can focus on building features rather than manually calculating valid identifiers for their test suites.
There are numerous testing scenarios where th_tin proves invaluable, particularly when building Enterprise Resource Planning systems, e-commerce platforms, or tax reporting software targeted at the Southeast Asian market. Whether you are running performance benchmarks in JMeter using the ${__mockjutsu(th_tin,)} syntax or integrating data generation directly into a Python-based testing framework via jutsu.generate('th_tin'), the library provides a seamless experience. Generating realistic mock data at scale allows teams to simulate bulk imports and stress-test financial modules without compromising sensitive real-world information or violating privacy regulations.
Furthermore, the mock-jutsu CLI enables rapid prototyping by allowing developers to generate a th_tin directly from the terminal. This versatility ensures that regardless of the tech stack—be it a shell script, a legacy Java application, or a modern Python microservice—accessing localized Thai business identifiers is straightforward. By incorporating these realistic identifiers into your CI/CD pipelines, you can catch edge cases in data handling and formatting early, leading to more robust and reliable software deployments for the Thai market.
mockjutsu generate th_tinmockjutsu bulk th_tin --count 10mockjutsu export th_tin --count 10 --format jsonmockjutsu export th_tin --count 10 --format csvmockjutsu export th_tin --count 10 --format sql# --mask: regulation-compliant output (PCI DSS / GDPR / KVKK)mockjutsu generate th_tin --maskmockjutsu bulk th_tin --count 5 --maskfrom mockjutsu import jutsujutsu.generate('th_tin')jutsu.bulk('th_tin', count=10)jutsu.template(['th_tin'], count=5)# mask=True: regulation-compliant outputjutsu.generate('th_tin', mask=True)jutsu.bulk('th_tin', count=5, mask=True)${__mockjutsu_intl_ids(th_tin)}# JMeter Function: __mockjutsu_intl_ids# Parameter 1: th_tin# Parameter 2: (not required for this function)# Add 'mask' keyword to get a regulation-compliant masked value${__mockjutsu_intl_ids(th_tin,mask)}GET /generate/th_tin# → {"type":"th_tin","result":"...","status":"ok"}GET /bulk/th_tin?count=10POST /template {"types":["th_tin"],"count":1}# mask=true: regulation-compliant outputGET /generate/th_tin?mask=trueGET /bulk/th_tin?count=5&mask=true| Parameter | Values | Description |
|---|---|---|
| --mask | true | false | Return a regulation-compliant masked value (PCI DSS, GDPR, KVKK…) |