Test Fixtures
All mocked CPF, CNPJ, and document numbers from the QA mocks service. Valid formats, scenarios, and fixture mappings for Brazilian fiscal documents.
Golden Test Identities
Individual (CPF)
12345678909
Main test individual — works across ALL services for end-to-end happy-path testing.
Company (CNPJ)
12345678000195
EMPRESA TESTE LTDA — Non-MEI. Works across ALL non-MEI services for end-to-end testing.
MEI Company
33333333000191
EMPRESA TESTE SEM DIVIDA LTDA — MEI. All MEI-specific scenarios: DAS, DASN, barcode, CND, registration flow.
Focused Guides
The full fixture reference is split into focused guides by document type. Each guide includes all fixtures, supported scenarios, and credential validation test cases.
CPF Fixtures
Individuals — standalone CPFs, CPFs linked to MEI/non-MEI CNPJs, and error scenario CPFs (not found, invalid format, rate limit).
CNPJ MEI Fixtures
MEI companies — scenario-specific, sequential success range, and complete test workflow.
CNPJ Non-MEI Fixtures
Regular companies — scenario-specific, sequential success range, and complete test workflow.
Test Credentials
Password-based error scenarios for certificate, pass-invoices, and pass-govs validation. Curl examples for each error type.
Test Scenarios
Error scenarios
| Scenario | Tax Number | HTTP | Error |
|---|---|---|---|
| CPF Not Found | 00000000000 | 404 | ERRO-001 — CPF não encontrado |
| CPF Invalid Format | 11111111111 | 400 | ERRO-002 — CPF formato inválido |
| CPF Rate Limit | 99999999999 | 429 | Rate limit exceeded |
| CND Pending | 11111111000191 | 200 | Status 7 — retry after delay |
| CND Unavailable | 22222222000191 | 200 | Status 5 — not available |
| DASN Error (MEI) | 55555555000191 | 200 | DASN error scenario |
Scenario override
Override the default scenario with ?mock_scenario=success. Add delay with ?mock_delay=3000 (milliseconds). Only available in QA and Staging.
Validation Rules
CPF validation (11 digits)
- First 9 digits multiplied by weights 10, 9, 8, 7, 6, 5, 4, 3, 2
- Sum mod 11: if remainder < 2, check digit = 0; else check digit = 11 - remainder
- First 10 digits (including first check digit) multiplied by weights 11, 10, 9, 8, 7, 6, 5, 4, 3, 2
- Sum mod 11: same rule for second check digit
CNPJ validation (14 digits)
- First 12 digits multiplied by weights 5, 4, 3, 2, 9, 8, 7, 6, 5, 4, 3, 2
- Sum mod 11: if remainder < 2, check digit = 0; else check digit = 11 - remainder
- First 13 digits (including first check digit) multiplied by weights 6, 5, 4, 3, 2, 9, 8, 7, 6, 5, 4, 3, 2
- Sum mod 11: same rule for second check digit
00000000000, CNPJ 00000000000000) are always rejected, even though they technically pass the check digit algorithm.
Generating additional test numbers
To generate valid test numbers, compute the check digits using the CPF (11-digit) or CNPJ (14-digit) validation algorithm above.