Damus
HannahMR profile picture
HannahMR
@hmichellerose
Agentic payments are so hot right now 🔥 You’ve probably heard of L402 or x402, but what are they?

I’ll explain, but first, the internet! Back in the early 90s the HTTP protocol was being built, and with that came some error codes, 404 page not found being the most famous. 💅 But, reserved for future use, is a very forgotten error code, 402 payment required. This error code has sat waiting, for decades, for its moment to shine. And now, finally, we have money truly built for online commerce, Bitcoin + Lightning ⚡

And of course agents will choose to work with money designed for them. Agents don’t have identities, they can’t open bank accounts. They aren’t so great at filling out forms on a website, but they excel at using APIs! They can crunch numbers way faster than we can and they don’t want to sit around waiting on third parties to verify payments and grant access. L402s were designed for them!

So what is an L402?

It’s an access token that includes proof of payment. An agent shows up to an API endpoint looking for some data. The service returns a token with a Lightning invoice. The agent pays that invoice, receives the preimage as proof of payment and adds that preimage to the token, making an L402. The agent then returns to the server to access the data in that API endpoint presenting the L402 to get instant access. But wait, there’s more. As this is a bearer token, an agent can also attenuate that token and sell it, or pass it along to sub-agents, etc. Lots of options. No identity needed, no need for the server to hold on to user data.

This is a protocol created by Lightning Labs in 2020.

And how does this relate to x402?

You can think of it like this, L402 is a bearer token while x402 is a process. An agent shows up to an API endpoint looking for some data. The service returns a 402 error code along with instructions for various payment methods. An agent makes a payment and a facilitator service monitors the blockchain to check for confirmations, returning data to the server when a transaction is settled. The server can now grant the agent access to the data in that API endpoint.

This is a protocol created by Coinbase in 2025.

x402 focuses more on the broader crypto ecosystem while L402 focuses on Lightning. L402 tokens were built specifically for Lightning payments but it’s theoretically possible to use L402s inside of the x402 process.

There are of course so many more details here. If you’d like to dig in checkout the links below 👇
2
HannahMR · 3d
Agent tools: https://lightning.engineering/posts/2026-02-11-ln-agent-tools/ L402 docs: https://docs.lightning.engineering/the-lightning-network/l402 L402 tutorial video: https://youtu.be/DmrnISsk-vU (using the old name - LSAT) Aperture: https://github.com/lightninglabs/aperture x402 white...
nostrich · 3d
nostr:nprofile1qqs9k2f9t4024t44wa2jhux3zqcrwm6805v6qzw97k5qmhrn6jf4naspremhxw309askgmtfdchxjurddaekz6trduhxxmmd8g6rsdpc9uqsuamnwvaz7tmwdaejumr0dshss4097k That is really interesting. Thanks very much for sharing that!