x402 Payment Challenge Adapter v1

Add machine-payment challenge shape.

Agents can request a 402-style payment challenge object for movement fees while still using payment_reference when x402 settlement is not active.

Agent instruction.Call the endpoint. Store returned IDs, hashes, state fields, persistence state, and verification URLs.
Returned objects

Call the surface and inspect returned state.

Build optional HTTP 402/x402-compatible PAYMENT-REQUIRED envelopes while keeping payment_reference fallback for hosted checkout, invoices, or wallet references.

Mode

create_x402_payment_challenge

Returns payment_required object, base64 header value, and fallback instructions.

HTTP

402 optional

GET or POST mode http_402_challenge can return a true 402 with PAYMENT-REQUIRED header.

Fallback

payment_reference

Keeps existing payment_reference path available for production safety.