Skip to content
LogoLogo
Blog

Monday, June 8, 2026

EVM and x402 support

Use one SDK for MPP and x402 payments on any EVM blockchain

MPP now supports charge payments on any EVM network, including Ethereum, Base, and Polygon. mppx also supports x402 exact flows through the same payment-method interface.

Use evm.charge when you want one integration for MPP Challenges and compatible x402 payment requests. The server advertises both protocols, then verifies whichever Credential the client returns.

Server

Configure one EVM charge method. Add x402.facilitator when the endpoint accepts x402 exact payments.

server.ts
import { Mppx, evm } from 'mppx/server'
 
const mppx = Mppx.create({
  methods: [
    evm.charge({
      currency: evm.assets.baseSepolia.USDC,
      recipient: '0xYourAddress',
      x402: {
        facilitator: 'https://example.com/facilitator',
      },
    }),
  ],
})
 
const paid = mppx.evm.charge({
  amount: '0.01',
  description: 'Premium API access',
})

Client

The client signs MPP Challenges and compatible x402 Challenges. It selects a protocol from the payment methods available to the request.

client.ts
import { Fetch, evm } from 'mppx/client'
import { privateKeyToAccount } from 'viem/accounts'
 
const fetch = Fetch.from({
  methods: [
    evm.charge({
      account: privateKeyToAccount(
        '0x0123456789012345678901234567890123456789012345678901234567890123',
      ),
      currencies: [evm.assets.baseSepolia.USDC],
      maxAmount: '1.00',
    }),
  ],
})
 
const response = await fetch('https://mpp.dev/api/ping/paid')
console.log(response.status)
200

Learn more