@nevermined-io/payments
    Preparing search index...

    Type Alias X402TokenVersion

    X402TokenVersion: 2 | 3

    EIP-712 struct version the backend signs the access token under.

    • 2 — today's default: reusable bearer token, signature covers [from, sessionKeysProvider, sessionKeys, planId].
    • 3 — appends agentId, resourceUrl, httpVerb and a one-time nonce to the signed struct, making the token seller/resource-bound and single-use: it is consumed on the first POST /x402/settle.

    Opt-in. Never assume the token you got back is the version you asked for — a backend that predates the v3 struct silently drops the field (its ValidationPipe whitelists without forbidNonWhitelisted) and mints v2. Read the version off the token with detectAccessTokenVersion.