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

Copy Markdown View Source

Machine Payments Protocol client (Stripe/Tempo).

Handles the HTTP 402 flow using the MPP challenge/credential scheme. The server returns WWW-Authenticate: Payment with a challenge; this module decodes it, signs a payment credential, and builds the Authorization: Payment header for the retry request.

Header Flow

  1. Server -> 402 + WWW-Authenticate: Payment <base64 challenge>
  2. Client -> retry + Authorization: Payment <base64 credential>
  3. Server -> 200 + Payment-Receipt: <base64 receipt>

Payment Methods

MPP supports multiple payment methods per challenge. This implementation handles EVM-based methods (Tempo, ETH, ERC-20). Stripe (fiat) methods are detected but not yet implemented.