Ask402

How does an MPP payment work, step by step?

Short answer

An MPP payment is four HTTP messages. The client asks for something. The server replies 402 with a challenge in the WWW-Authenticate header. The client pays and asks again with a credential in the Authorization header. The server checks it and returns the result with a receipt. The same exchange works whether the money is a stablecoin, a card or Lightning.

The four messages

  1. Request. The client asks for a resource, with no payment.
  2. Challenge. The server replies 402 Payment Required. A WWW-Authenticate: Payment header lists what it will accept: which payment methods, how much, and to whom.
  3. Credential. The client pays using one of those methods, then repeats the request with an Authorization: Payment header carrying proof.
  4. Receipt. The server checks the proof and returns the resource, with a Payment-Receipt header.

MPP's documentation names the three parts this way:

PartHeaderIn the protocol's words
ChallengeWWW-Authenticate"Server-issued payment requirements"
CredentialAuthorization"Client-submitted payment proofs"
ReceiptPayment-Receipt"Server acknowledgment of successful payment"

Why those headers

WWW-Authenticate and Authorization are the headers the web has always used to ask for and supply a login. MPP adds a new scheme to them, called Payment, next to the familiar Basic and Bearer.

That is the main design difference from x402, which defines three headers of its own. MPP's core has been submitted to the IETF as an Internet-Draft. It is a draft, not a finished standard.

Methods and intents

Two words do most of the work in a challenge.

The method is how the money moves. tempo is a stablecoin transfer on the Tempo network. stripe and card go through card rails. lightning is bitcoin over Lightning. A server can list several, and the client picks one it can use. See MPP payment methods.

The intent is what kind of payment it is.

IntentMeaning, in the protocol's words
charge"One-time payment that settles immediately"
session"Streaming payment over a payment channel"
subscription"Recurring fixed payment for paid access across billing periods"

A charge is one payment for one request. A session suits many small charges in a row, such as a long model conversation. A subscription buys access for a period.

Not every method supports every intent. Cards, for instance, are listed for charge only.

Other headers the protocol uses

HeaderWhat it is for
Cache-Control: no-storeRequired on 402 replies, so a challenge is never served from a cache
Retry-AfterTells a client when it may try again after a failed payment
Idempotency-KeyLets a client safely repeat a request that changes something

A challenge can also be bound to the body of the request with a digest, so a payment made for one request cannot be attached to a different one.

What stays the same across payment methods

The four messages do not change. Paying with a stablecoin and paying with a card differ only in what the credential contains. That is what lets one endpoint take both, and lets a client written for MPP work with payment methods added later.

Next to x402

The shape is the same as an x402 payment: ask, get a 402 with a price, pay, get the result. A server can send both protocols' headers in one 402 reply, and each client reads the one it understands. The differences are set out in x402 vs MPP.

See a real one

Paste an endpoint into the 402 checker. For an MPP endpoint it decodes the challenge and lists each payment option: the method, the amount and the recipient.

Sources

Facts checked against these sources on . Protocols change, so the official specification wins if it disagrees with this page. Read this page as Markdown.

Who writes this. Ask402 is published by Havok Holdings LLC, which also runs Agent402, one of the x402 services covered here. Agent402 is labelled wherever it appears. Everything else is described from each project’s own documentation, and nobody pays to be listed.