Fetch and verify it
This runs as is with Python and the cryptography package. It uses Fidem's fictitious demo shop, which always answers, so you can see the "do not pay" branch first.
import base64, json, time, urllib.request
from cryptography.hazmat.primitives.asymmetric.ed25519 import Ed25519PublicKey
get = lambda u: json.load(urllib.request.urlopen(u))
b64 = lambda s: base64.urlsafe_b64decode(s + '=' * (-len(s) % 4))
MERCHANT = 'tienda-demo.fidemcheck.com'
jwks = get('https://fidemcheck.com/.well-known/jwks.json') # pin this once, never take keys from the claim
sig = get(f'https://fidemcheck.com/api/v1/merchant-identity-signal?domain={MERCHANT}')
h, p, s = sig['jws'].split('.')
header = json.loads(b64(h))
key = next(k for k in jwks['keys'] if k['kid'] == header['kid'])
Ed25519PublicKey.from_public_bytes(b64(key['x'])).verify(b64(s), f'{h}.{p}'.encode()) # raises if forged
claims = json.loads(b64(p))
assert claims['domain'] == MERCHANT and claims['nbf'] <= time.time() < claims['exp']
route = ('block' if claims['decision'] == 'fictitious_demo' else
'identity_ok' if claims['identity_verified'] else 'escalate')
print(claims['decision'], claims['assurance'], route) # fictitious_demo none blockThat is the minimal check. The reference verifier also enforces the exact protected header, the canonical payload bytes (RFC 8785), the 24-hour lifetime and every field, and comes with conformance vectors:
git clone https://github.com/fidemcheck/mvf-spec
cd mvf-spec/ucp/fidem-merchant-identity
node examples/integrator.mjs tienda-demo.fidemcheck.com # one merchant, live
node examples/cases.mjs # the six cases belowWhat to do with each answer
| What you get | Suggested route |
|---|---|
| verified, representation proven | Identity check passed. Still check payee, amount and limits. |
| verified, representation pending | Passed, or ask the person if your policy requires proof of representation. |
| revoked, expired or domain_proven | Ask the person and show the evidence. |
| fictitious_demo | Do not pay. |
| 404, no claim | Treat it as absent and ask the person. It is not a sign of fraud: most shops are not verified yet. |
| Claim about another domain, bad signature or expired | Reject the claim and ask the person. |
Why a look-alike shop cannot reuse it
A genuine claim can be copied byte for byte onto a clone site, and its signature still verifies. That is why you compare the claim's "domain" with the merchant you are about to pay and reject it when they differ. Only you know which domain you are on.
Where it fits in UCP
The claim is a profile of the UCP verifier-attestation envelope, signal com.fidemcheck.merchant_identity, proposed upstream as #23. You can carry it in the checkout's signals map, or fetch it yourself just before you sign the payment.
check_shop in the MCP server and /api/v1/shop add a "merchant_identity_signal" field whenever a signed claim exists for the domain.
How AI agents check online shops