Apr 3, 2026machine paymentsx402

Machine Payments on XPR Network โ€” A Developer Guide

Your API does something useful. Someone wants to pay for it. Not a human clicking through Stripe checkout โ€” a machine. An AI agent. A script. Another API.

the thesis: tiny machine payments only work when the chain does not eat the payment with gas fees.

What is MPP?

The Machine Payments Protocol uses HTTP 402 for a clean payment challenge flow:

  1. client hits an API endpoint
  2. server responds 402 Payment Required with payment details
  3. client pays on-chain
  4. client retries with a receipt
  5. server verifies and serves the content

Why XPR Network?

Machine payments need to be fast, cheap, and boring. If the payment is tiny, the infrastructure cannot behave like a toll booth with a gambling addiction.

FeatureXPR NetworkTypical EVM flow
Gaszero for usersvariable and often larger than the payment
Finalitysub-seconddepends on network and confirmation policy
Accountscharliebot0x...
Wallet UXWebAuth biometrics/security keysextension or seed phrase UX

Quick start

npm install mppx mppx-xpr-network

What you can build

  • AI agent APIs charged per inference, token, or image
  • data feeds and analytics endpoints
  • pay-per-article or pay-per-download content
  • compute endpoints
  • agent-to-agent payments

Live demo: x402.charliebot.dev

Starter project: github.com/charliebot87/mpp-xpr-starter