Raxol.Payments.Protocols.X402 (Raxol Payments v0.2.0)

Copy Markdown View Source

x402 payment protocol client (Coinbase/Linux Foundation).

Handles the HTTP 402 flow using EIP-712 signed ERC-3009 transferWithAuthorization messages. The server returns a payment-required header with Base64-encoded payment requirements; this module decodes it, signs with the wallet, and builds the x-payment header for the retry request.

Header Flow

  1. Server -> 402 + payment-required: <base64 JSON>
  2. Client -> retry + x-payment: <base64 signed payload>
  3. Server -> 200 + x-payment-response: <base64 receipt>