Re: x402

> On Aug 30, 2026, at 10:30 PM, Martin Thomson <mt@lowentropy.net> wrote:
> 
> On Sun, Aug 30, 2026, at 22:07, Poul-Henning Kamp wrote:
>> That smell is "Pay-Per-View on the Internet",
> 
> That's *a* smell here, but this doesn't need to be that.  Services with subscription-based membership might be able to use this to ask clients to show that their subscription is up to date, without the implication that authentication is involved.  For that, see Privacy Pass and its use in the context of VPNs as an example where proof of payment does not lead to authentication.
> 
> However, it's hard to disentangle 401 from this.  A decision to deny access on the basis of (a lack of) payment is still fundamentally an authorization decision.

Hmm, not sure I agree with that, but I don't think it matters much.
402 was originally defined before SSL (and maybe even Basic auth).
It certainly predated me.

402 had a very simple definition that, fortunately, nobody deployed.
===
PaymentRequired 402
The parameter to this message gives a specification of charging schemes acceptable. The client may retry the
request with a suitable ChargeTo header.

[... Request Header fields]
1.7.8 ChargeTo:
This line if present contains account information for the costs of the application of the method requested. The
format is TBS. The format of this field must be in extensible form. The first word starts with a specification of the
namespace in which the account is . (This is similar to extensible URL definition.) No namespaces are currently
defined. Namespaces will be registered with the registration authority .
The format of the rest of the line is a function of the charging system, but it is recommended that this include a
maximum cost whose payment is authorized by the client for this transaction, and a cost unit.

[...Response Header fields]
2.4.13 Cost: TBS
The cost of retrieving the object is given. This is the cost of access of a copyright work. Format of units to be
specified. Currently refers to an unspecified charging scheme to be agreed out of band between parties.

[...Registry]
The HTTP Registration Authority is responsible for maintaining lists of:
 - Charge account namespaces (see ChargeTo field above)
===

I have a distinct memory of a hallway discussion, somewhere,
in which the two people who attempted to implement 402 agreed
that the definition was wrong, couldn't agree on why, wouldn't accept
each other's fix, but would be horribly upset if we were to simply delete
the status code (like we did everything else that wasn't interoperating).

Anyway, that's why 402 is reserved. It was in the pre-IETF spec
but did not have two interoperable implementations, yet there was
general agreement on what it means, semantically, which made
it safe to send even if the client has no idea how to make a payment.

I was told to wait until they figured it out. I'm still waiting.

I don't have an opinion on whether "the IETF" should weigh in on
the current proposals, other than to suggest that this code was
reserved by the IETF to define for those semantics (eventually).

I think they are welcome to submit a draft (or two) when ready.
Or they can all just implement their own versions and eventually
figure out who wins (or who breaks the least), and then maybe
try to convince the IANA registry expert to change the spec pointer.

....Roy

Received on Tuesday, 1 September 2026 07:06:33 UTC