12iD documentation

The 12iD credential model

For: the product owners and developers of organisations that issue or verify credentials with 12iD. Describes: what a 12iD credential is, how long it is valid, how you revoke or suspend it, what happens when a user loses their phone, and how to design schemas whose values work in proofs. Read it before you design your first schema: some of these choices cannot be changed later.

Related: the API guide (api.md), data protection (data-protection.md) and the Android SDK guide (the Android SDK guide).

What a credential is

A credential is a set of named values that your organisation signs and gives to one person. For example: name, employee number, department, valid until. The person keeps it in the wallet inside your app, on their phone. Later, a verifier (you or another organisation) asks the wallet for a proof, and the wallet shows only what that request asks for:

What lives where:

  Where Notes
The credential Only on the user’s phone 12iD keeps no copy and cannot read the wallet
The schema (the list of value names) and your credential definition (your signing key’s public part) The public Indy ledger Never any value or personal data
Revocation registries (which slots are revoked) The public Indy ledger Slot numbers only; never who holds a slot
The exchange record (who was offered what, and when) 12iD’s platform, for you Values are erased after your retention period (data-protection.md)

Validity: every credential expires

A credential stops being accepted when its expiresOn date passes, or earlier when you revoke or suspend it (next section). Expiry is always there, also for verifiers that never read the ledger.

Choose the validity period for each credential type. Revocation lets you end a credential early, so the period is about how often the facts should be confirmed again. As a guide: months for access and membership, a year or two for qualifications, with re-issue on renewal.

Revoking and suspending

Every credential definition published since platform 0.12 is revocable. For each issued credential you can:

  What it does Undo
Suspend Proof requests stop accepting it, for example while you look into a fraud alert Reinstate
Revoke Proof requests stop accepting it for good, for example when the account is closed None: issue a new credential instead

What the ledger shows. Revocation works through registries: groups of up to 9,999 credentials of one definition. The ledger records which slots of a registry are revoked, never who holds a slot. A proof shows which registry the credential is in, not which credential it is. The first time a user’s phone proves a credential from a registry, it downloads that registry’s file once: about 2.4 MB.

Credentials issued before revocation existed. A credential definition published before platform 0.12 is not revocable, and cannot become revocable: the ledger does not allow it. To move:

  1. Publish a revocable definition next to the old one. The console offers “Publish a revocable credential definition” on the schema’s row; it uses the tag revocable.
  2. Point your backend’s offers at the new definition, and issue your users their credentials again.
  3. Proof templates that name the schema accept both definitions. The old credentials stay valid until their expiresOn date; from then on, only revocable ones remain.

The console shows each definition as “Not revocable”, or with how many credentials its registries have issued.

Erasure does not revoke. Erasing a person’s data and ending their credential are separate requests (data-protection.md, “What erasure does not do”). A credential stays revocable after its data is erased.

Wallet recovery: accept the loss, issue again

A wallet’s keys live in the phone’s secure hardware and never leave it. There is no backup or export in this version. These all mean a new, empty wallet:

What happens and what you do:

  1. The app gets a new wallet. Your backend creates it with POST /v1/wallets (a new installation id gives a new wallet; a person may have several).
  2. You issue the person’s credentials again. Make this one step for the user: keep the facts you issued from in your own systems, and offer the credentials again when the new wallet connects to you.
  3. The old credentials stay on the old phone. A proof needs the wallet’s key, and that key never left the device. If the phone was lost or stolen rather than replaced, revoke its credentials: the wallet key is not tied to the phone’s screen lock, so whoever can open your app on it could still prove with them.
  4. Revoke the old installation’s wallet token with DELETE /v1/wallets/{id}, and optionally erase the old connection (POST /v1/connections/{id}/erase). 12iD removes a revoked wallet’s mediator connection after 30 days.

The SDK guide shows the app side (reset(), WalletKeyLost, and excluding the wallet from Android backups, so it is never restored where its key is missing).

Attribute values: how to encode them

Credentials are built on AnonCreds, which signs strings. Getting the encoding right at schema design time is the most common source of mistakes.

Rules

Recipes

You want Store as Example Predicate example
A date someone may need to compare (birth date, start date) Days or a compact integer: YYYYMMDD "19851103" Over 18 on 2026-10-05: dateOfBirth <= 20081005
A date only to display ISO 8601 text "1985-11-03" none (text)
An amount Integer in the smallest unit "125000" (cents) salary >= 5000000
Yes/no "1" / "0" "1" isAdult >= 1
A choice from a list Short text code "ENGINEERING" none; disclose it
A document Its hash or a reference "sha256:9f86…" none
A time to compare, to the minute Minutes since 1970-01-01 UTC (fits until the year 6053) "29979360" (2027-01-01 00:00 UTC) validFromMinute <= <now in minutes>

YYYYMMDD compares correctly as a number (20081005 > 19851103) and stays readable. Use it for every date a verifier may test with a predicate.

Limits on an offer: at most 125 attributes, names up to 100 characters, values up to 4 KB, and 64 KB for all names and values together. Credentials carry claims, not documents.

Schemas cannot change

Checklist before your first schema

  1. List the values; for each, decide “disclose” or “compare”. Every “compare” value must be a whole number in range.
  2. Pick the validity period, and how you will re-issue (renewal, changed facts, a new phone).
  3. Decide when your backend revokes or suspends (an account closed, a fraud alert, a lost phone), and who may do it in the console.
  4. Decide how a user gets their credentials again on a new phone, and make it one step.
  5. Keep personal data out of externalId and out of attribute names.
  6. Publish in the staging environment first, issue to a test wallet, and run your proof templates against it.