MPP: Machine Payments Protocol

HTTP-native paid APIs on Abstract. Clients pay per-request via charge or stream micro-payments through session channels — no middleman, no subscriptions, just cryptographic payments.

What is MPP?

MPP (Machine Payments Protocol) is an HTTP-native protocol for paid APIs. When a client requests a paid resource, the server responds 402 Payment Required with a WWW-Authenticate challenge. The client signs a credential, retries with an Authorization header, and the server settles directly on-chain.

Charge

One-time ERC-3009 payment. Client signs typed data, server broadcasts the transfer.

  • -Single signature per request
  • -Server pays gas (or uses paymaster)
  • -Replay-protected by nonce + expiry

Session

Payment channel. Client opens once on-chain, then sends off-chain vouchers.

  • -One on-chain tx to open, then off-chain
  • -Cumulative vouchers (micro-payments)
  • -Server settles when ready

Protocol Flow

C
Client
S
Server
B
Blockchain
1
GET /api/charge
2
402 Payment Required
WWW-Authenticate
3
Sign ERC-3009TransferWithAuthorization
4
Retry with credential
Authorization header
5
Settle on-chain
transferWithAuthorization tx
6
200 OK + data
Payment-Receipt

Live Demo

Step 1: Connect Wallet

MPP Headers

WWW-AuthenticateServer → Client

Sent with 402 response. Contains the payment challenge with method, amount, currency, recipient, and expiry.

method:"abstract/charge"
realm:"mpp-demo.abs.xyz"
challenge:<base64url JWT>
amount:"10000"
currency:"0xbd28..."
AuthorizationClient → Server

Sent with the retry request. Contains the signed credential (ERC-3009 authorization or session voucher).

scheme:"Payment"
credential:<base64url>
payload.type:"authorization"
payload.from:"0x..."
payload.signature:"0x..."
Payment-ReceiptServer → Client

Sent with 200 response. Confirms settlement with transaction hash (charge) or accepted cumulative amount (session).

method:"abstract/charge"
transaction:"0x..."
settled:true

Configuration

Network

Abstract Testnet (11124)

Recipient

0x84ffdFA5737012752AA9bfc89C6865E22a40c446

USDC.e

0xbd28Bd5A3Ef540d1582828CE2A1a657353008C61

Charge Amount

0.01 USDC.e

Session Rate

0.001 USDC.e / request

Escrow Contract

0x29635C384f451a72ED2e2a312BCeb8b0bDC0923c