Verify Credential
This page documents the Verifier's direct credential verification endpoint. It takes a single credential in its compact serialized form, checks the signature, and returns the decoded payload. This is a stateless, one-shot check of one credential — it is not a full presentation flow. If you need a wallet to choose and present credentials interactively (with selective disclosure, holder binding, and session tracking), use the authorization-request and verification-session endpoints described in Defining What Credentials to Request and Verifier Client Configuration instead.
Use this endpoint when you already hold a compact credential string — for example one you received out of band, exported from a wallet, or signed yourself with the Issuer's signing endpoint — and you want to confirm it is authentic and read its claims.
Overview
The endpoint verifies a single credential supplied as a compact string. No verification session is created and nothing is persisted.
Two credential formats are supported: SD-JWT VC and JWT-VC-JSON. The format is detected automatically from the string itself — there is no
formatfield in the request.On success you get back the decoded
payload, and for SD-JWT credentials a resolvedprettyClaimsobject with all disclosed claims merged in.On failure you get a
falseresult and anerrormessage rather than an HTTP error, so your code can branch on the result instead of catching exceptions. (A malformed request body — for example a missing or emptycredential— still returns400 Bad Request.)
Endpoint
This endpoint lives under the /credentials path. It requires a valid OIDC JWT Bearer token (Authorization: Bearer <token>); it carries no specific role requirement (see Authentication).
Verify a Credential
POST /credentials/verify
Verifies a credential's signature and returns the decoded payload.
Request Body
credential(string, required) The credential to verify, in compact serialized form. This is either a compact SD-JWT (the issuer-signed JWT followed by~-separated disclosures, ending in~) or a compact JWT-VC-JSON (a three-partheader.payload.signatureJWT). The string must be non-empty.
The format is inferred from the value: a string containing a ~ is treated as an SD-JWT; a string of exactly three non-empty dot-separated segments with no ~ is treated as a JWT-VC. Anything else is rejected (see Error Responses).
Response Body
A 200 OK response always carries an isValid boolean. The remaining fields depend on the outcome.
When the credential is valid:
isValid(boolean) —true.format(string) — the detected credential format.dc+sd-jwtfor SD-JWT VC, orjwt_vcfor JWT-VC-JSON.payload(object) — the decoded credential payload (the claims carried in the signed JWT body).prettyClaims(object, SD-JWT only) — the credential's claims with all disclosures resolved and merged. This field is present only for SD-JWT credentials; JWT-VC responses omit it.
When the credential is invalid:
isValid(boolean) —false.error(string) — a human-readable reason the credential could not be verified.
A failure response contains only isValid: false and error. It never includes format (or payload/prettyClaims), even when the credential was parseable as an SD-JWT or JWT-VC — the controller discards the detected format on invalid results.
Example success response (SD-JWT VC)
For an EmployeeBadge@1:sd-jwt credential, the response merges the disclosed claims into prettyClaims while payload reflects the raw signed body:
Example success response (JWT-VC-JSON)
Example failure response
Example Request
The example below verifies a credential from a backend using TypeScript and fetch. The same call works from any HTTP client.
Error Responses
Unsupported format — if the
credentialstring is neither a compact SD-JWT nor a three-part JWT, the response is200 OKwithisValid: falseand the messageUnsupported credential format. Expected compact JWT (x.y.z) or SD-JWT.Verification failure — if the signature is invalid, the credential is expired, or the issuer's verification material cannot be resolved, the response is
200 OKwithisValid: falseand anerrordescribing the cause.Validation failure — if the request body is missing the
credentialfield or it is empty, the request fails with400 Bad Requestfrom the global error filter ({ statusCode, message, path, timestamp }).
Notes
This endpoint verifies one credential at a time. It does not evaluate a Verifiable Presentation, check holder binding against a presentation, or apply a DCQL / Presentation Exchange query. For those, create an authorization request and observe the verification session.
This endpoint requires a valid OIDC JWT Bearer token but no specific role (see Authentication).
For SD-JWT credentials, read disclosed values from
prettyClaims. Thepayloadfield contains the raw signed body, in which selectively disclosable claims are represented as hashed digests rather than their plaintext values.
Last updated