Developer fixtures

South African ID Validator & Test Cases

Curated synthetic fixtures for unit tests, CI, and local debugging — plus a client-side structural validator that uses the same CheckID rules as production. This is not a consumer ID checker and not an unrestricted ID generator.

Need automated validation in production? Use the CheckID API. API Starter is R99/month for 1,000 single production calls; compare plans on CheckID pricing for API and bulk plans.

What these fixtures are for

If you are wiring South African ID validation into an onboarding form, import job, or test suite, you need known-good and known-bad inputs. The set below covers valid male and female examples, citizenship variants, a leap-year date, an invalid checksum, and malformed dates of birth.

Every number is labelled as a synthetic test fixture. They are the same structural examples CheckID already uses in automated tests, or close variants of those examples with a single digit changed. They do not represent real people.

Not an ID generator

This page does not mint unlimited valid ID numbers. Use the curated list in tests. For live product traffic, call the API rather than copying fixtures into customer records. Structural validity is not identity proof.

Synthetic fixtures and browser validator

Inspect a row to see why it passes or fails. Copy a single fixture, or copy the whole set as JSON. The paste box is for testing your own fixtures against CheckID rules in this browser — nothing is posted to CheckID.

Synthetic South African ID test fixtures
FixtureNumberExpectedActions
Valid male SA citizen8001015009087Valid
Valid female SA citizen8001010000008Valid
Valid non-SA citizen8001015009186Valid
Valid refugee indicator8001015009285Valid
Valid leap-year date of birth0002295000083Valid
Invalid checksum8001015009086Invalid checksum
Malformed date of birth (impossible day)8001325009081Malformed DOB
Malformed date of birth (29 Feb in a non-leap year)9902290000085Malformed DOB

Inspect selected fixture

8001015009087

Known-valid 13-digit number: 1980-01-01, male sequence, citizenship 0, matching Luhn digit.

Structurally valid

Passes CheckID structural rules: 13 digits, encoded date of birth, gender sequence, citizenship indicator, and Luhn checksum.

Date of birth
1980-01-01
Gender
Male
Citizenship
SA Citizen
Age (from encoded DOB)
46

CheckID unit tests and public sample ID used in docs (8001015009087).

Test a fixture in the browser

Paste one of the numbers above, or another fixture from your own test suite. Validation uses the same CheckID rules as production and never leaves this page — we do not send, store, log, or analyse the digits.

Copy all fixtures as JSON for CI or unit tests.

Assert fixtures in tests

Keep the canonical sample 8001015009087 in your suite, then assert that checksum and date failures stay invalid. Language-specific production examples live in the 5-minute API setup guide and the language pages listed below.

const fixtures = {
  validMaleCitizen: "8001015009087",
  validFemaleCitizen: "8001010000008",
  invalidChecksum: "8001015009086",
  malformedDob: "8001325009081",
};

test("checksum-invalid SA ID fixtures fail structural validation", async () => {
  const response = await fetch(
    `https://api.checkid.co.za/api/v1/validate/${fixtures.invalidChecksum}`,
    { headers: { Authorization: "Bearer YOUR_API_KEY" } },
  );
  const body = await response.json();
  expect(body.isValid).toBe(false);
});

Same rules, via the CheckID API

When fixtures are green in CI, call the production API with a bearer token. API Starter includes 1,000 single calls per month from R99. Professional adds bulk validation and team access.

# Synthetic sample ID — not a live customer number
curl -s "https://api.checkid.co.za/api/v1/validate/8001015009087" \
  -H "Authorization: Bearer YOUR_API_KEY"

8001015009087 is the public sample ID used across CheckID docs — not a live customer number. Replace YOUR_API_KEY with a key from your dashboard. See the South African ID validation API and 5-minute South African ID validation API tutorial.

Honest limits

  • Structural checks only: length, encoded date of birth, gender sequence, citizenship indicator, and Luhn checksum. See how the SA ID checksum works and South African ID number structure.
  • CheckID does not query Home Affairs, verify a physical document, or confirm that the person in front of you owns the number.
  • The consumer web checker is on the free South African ID checker. This page is for developers building tests and integrations.
  • Privacy: validation on this page stays in the browser. Read the privacy policy for how CheckID handles ID numbers on the API and homepage (in memory, never stored).

Need automated validation in production? Use the CheckID API.

API Starter is R99/month for 1,000 single production validations. Professional is R299/month for bulk and teams, subject to fair usage. Create a free account for a development test key, then compare paid plans when you go live.

Developer FAQs

Are these real South African ID numbers?

No. Every example on this page is a synthetic structural fixture for software tests. They are labelled as test data and are not presented as real people or as numbers issued by Home Affairs.

Does CheckID store the number I paste into the fixture validator?

No. The workbench runs in your browser with the same structural rules as production CheckID. The digits and decoded result are not sent to our servers, logs, analytics, email, or third-party tools, and they are not written to local storage.

Can I generate unlimited valid South African ID numbers here?

No. This is a curated test-case set plus a validator, not an unrestricted ID generator. Use the listed fixtures in unit tests and CI. Fabricating identities is not a supported use.

If a number passes, does that mean Home Affairs issued it?

No. A pass means the 13-digit string satisfies CheckID structural rules: date encoding, gender sequence, citizenship indicator, and Luhn checksum. It is not a government identity check, document check, or proof of ownership.

How do I validate South African ID numbers in production?

Use the CheckID REST API. API Starter is R99 per month for 1,000 single production calls. Professional at R299 per month adds bulk validation and team access, subject to fair usage. A free development test key is available with a free account.