API payload (raw, 11 digits)
- Input
- 12034567899
- Expected output
- {"pis": "12034567899"}
No punctuation: this is the format most HR and eSocial endpoints expect in the request body, so drop this value straight into a payload fixture.
PIS/PASEP for test fixtures
A test suite validating payroll or eSocial onboarding needs a correctly formatted PIS/PASEP without drawing on a real person number. This generator outputs the 11 digits with the check digit computed, ready to drop into a fixture or a staging database seed.
No punctuation: this is the format most HR and eSocial endpoints expect in the request body, so drop this value straight into a payload fixture.
The mask groups the digits as 3, 5 and 2 with a dash before the check digit; use this value to exercise the masked input in the browser without the test having to reimplement the formatting.
Worth keeping as a separate fixture: it is the edge case where the check digit resolves to 0, and a parser that treats "0" as an empty field only breaks on this one.
They appear in different contexts, but many systems use the same 11-digit structure with a check digit.
The odds are the same as any 10-digit draw, but that is beside the point: the fixture is never submitted to INSS or any registry, it only needs a valid check digit to exercise your system parser in a test environment.
Copy the number from one run and paste it straight into the repository fixture (JSON file, test constant), instead of calling the generator inside the pipeline; that keeps the value fixed under version control and the check-digit audit only runs once, at generation time.
One covers the happy path; for edge coverage, generate a second with a check digit of 0 (the formula lands on 0 whenever the remainder of the division by 11 is 0 or 1) and a third with repeated digits deliberately rejected, if your validator carries that extra rule.
Check whether the form is reading the raw 11 digits or the punctuated value: a parser that expects an unmasked string but receives `120.34567.89-9` without stripping the symbols before validating the check digit is the most common cause of rejection in this scenario.
Generation happens locally in the browser. Analytics receives only action, status, type and format, never the generated PIS/PASEP.