m2m.foundation
Layer 5

Machine payments

When a machine consumes something another machine provides — electricity, bandwidth, data, compute — somebody has to be charged. For most of M2M’s history that was done afterwards, by people, from a log. The settlement layer moves it into the exchange itself.

What already works: Plug & Charge

ISO 15118-2, published in 2014, lets an electric car identify itself to a charging station with a contract certificate installed in the vehicle. The driver plugs in; the car authenticates over the cable, the station authorises the session against the driver’s energy contract, and billing follows without a card or an app. ISO 15118-20 (2022) extended it to bidirectional charging. It is the clearest case of machine-to-machine settlement in daily use, and it rests entirely on layer 1: a certificate hierarchy that car makers, charge-point operators and energy suppliers all agree to trust.

The dormant status code: HTTP 402

HTTP has had a status code for “Payment Required” since the 1990s. The current specification, RFC 9110, still describes 402 as reserved for future use. No payment mechanism was ever attached to it, because there was no way for a browser to pay a few cents without a card form.

L402

From Lightning Labs, earlier known as LSAT. A server answers 402 with a Lightning invoice and a macaroon; the client pays the invoice and presents the proof of payment with the macaroon as its credential. Payment and authentication become the same step.

x402

Proposed by Coinbase in 2025. A server answers 402 with its price and accepted payment details; the client retries the request with a signed stablecoin payment in a header. It is aimed at software that buys API calls and data on its own account.

What is still unsolved

Paying is the easy part. The open questions sit around it. A machine needs a spending limit that its owner sets and can prove was respected. Both sides need a meter they trust, since the thing being sold is usually measured by the seller. Disputes need a record that a person can read afterwards. And very small payments only make sense if the cost of making one is smaller still. Each of these leads back down the stack — to identity, to attestation, to device management.

A note on scope. This page describes protocols. It is not financial advice, and it does not recommend any token, network or provider.