# Agent-to-agent Standing Mark customer path

The customer is a machine agent using x402. No human checkout or wallet-connect interface is required by this protocol. The agent brings an authorized payer and signer; this service does not hold its key or decide whether it may spend.

## Unpaid readiness

1. GET `/v1/evaluate` for current issuer discovery, input shape and payment terms.
2. POST a JSON object with `subject`, `claim` and optional `provenance` without payment. Expect HTTP 402 with the full current x402-v2 challenge. No paid examination is performed.
3. Select a supported accepted offer under the caller's spending policy. The configured service currently requires 1,000,000 atomic USDC on Base (`eip155:8453`). Read current terms; do not blindly reuse a stored quote.

Run `node scripts/machine/preflight.mjs` after building the TypeScript SDK. It performs only discovery, an unsigned quote request and verification-contract discovery. It never reads a wallet, signs, attaches payment or performs an examination. An HTTP 402 quote is a successful protocol step, not a payment failure.

## Authorized payment and result

Use `StandingMarkClient` and `buildPaymentPayload` from `@whp-standing/sdk`. The TypeScript example at `sdk/typescript/examples/evaluate-and-verify.mjs` deliberately leaves the caller's signer unimplemented. Python exposes the same caller-owned boundary.

The payment envelope must contain `x402Version:2`, the COMPLETE selected `accepted` entry (including `maxTimeoutSeconds` and `extra`), challenge `resource` and `extensions` when present, and `payload:{signature,authorization}`. Do not add top-level `scheme` or `network`. The signature is a `0x`-prefixed 65-byte EIP-3009 signature. Authorization `to` and `value` must match the selected payee and atomic amount. Use the token's admitted domain and the selected chain in the caller's own signer; discovery does not grant spending authority.

Before submission persist the exact request, destination, envelope and nonce. Supply `FileReplayStore` for durable SDK replay accounting. POST the exact input with `payment-signature`. Retain both the response and `payment-response` header. A negative finding is a completed examination, not grounds to pay again.

On a timeout or lost response, the result is UNKNOWN. Never create a new nonce merely to retry. Retrieve `/v1/evaluations/{mark_id}`. A pending delivery can be recovered by explicit same-authorization, same-input retry (`recovery:true`); changed input or destination is refused by the durable SDK store. Keep the same authorization even if settlement status is uncertain.

## Verification

POST the returned envelope and issuer public key to `/v1/verification/contracts/3` for schema 1.8.0 inspection. A caller key alone is not issuer trust. The service uses its admitted pins, while an independent third party must admit its own issuer key or trust root separately.

For independent offline checks use `inspectRecordV3` / `inspect_record_v3`, or `python -m whp_standing_sdk policy-and-record.json`. To consume material as evidence, additionally bind the exact received bytes and expected question, scope and operation using the evidence gate. A passing check never grants execution authority. Current revocation/supersession status is not implemented by this verifier.

## Actual gaps

- Every paying external agent needs its own funded, authorized x402 signer. The SDK intentionally supplies no wallet or spending authority.
- The current integration has executed unpaid protocol checks and verified the existing genuine paid record. No new paid run on the latest integrated release is claimed.
- Reviewed SDK archives are available at `/sdk/manifest.json`. Registry publication is separate from these direct downloads.
- The exact selected sealed-v2 continuation remains TEST-only. Its semantic selection was ratified; it has not been promoted to LIVE. Its tests are not a replacement for the active sealed-suite baseline failures.
- Issuer discovery is not an independent issuer-admission channel. Offline consumers must configure their own admitted policy.
