53 comments

[ 2.6 ms ] story [ 72.4 ms ] thread
For those who are interested in origins, a Coinbase sponsored protocol.

With Stripe moving into the space heavily and looking to lock things up in "Stripe-land", I think having an open protocol is great.

Given that this protocol is Coinbase sponsored, you can be sure that the whole KYC/AML bullshit is going to be applied to every transaction.

Want to read a paid message? Please upload your recent utility bill and confirm your identity with a video call. Sorry, you are not a US citizen with possession of the only subset of ID documents we support, reject.

Corporate capture of payment rails, masquerading as open payments.
How are Hashed Timelock Agreements (HTA) like in the Interledger Protocol (ILP) and WebMonetization Protocol more secure than x402?

Does x402 prevent the double-spending problem?

Isn't it regressive to return to dependence on DNS for financial transactions?

>Does x402 prevent the double-spending problem?

This depends on the implementation on the underlying network, but basically the spending signs an authorization for transfer, and the merchant either settles that onchain themselves or delegates to what is called a facilitator that settles on their behalf. On EVM chains for the exact payment scheme this leverages EIP-3009 signatures

basically a copy of l402.org
This whole thing seems very strange to me, but maybe I’m missing the point.

> API services paid per request

Given that this runs atop Payment Required, doesn’t this mean that each API request would involve an extra one or two data transfers?

> AI agents that autonomously pay for API access

Is there a reason why you wouldn’t pay ahead of time? I just understand why you couldn’t buy a few dozen/hundred/thousand dollars worth of credits, and wait until it runs low.

> Paywalls for digital content

Isn’t this crypto only? The overlap of people paying for digital content and dealing with crypto must be relatively small. Is it meant to funnel people to a payment portal, going through fiat, à la Coinbase?

> Microservices and tooling monetized via microtransactions

How is this different than the API point?

> Proxy services that aggregate and resell API capabilities

I’m not a huge backend person, but what would be the purpose of this?

Nothing, it's just a stupid thing for making some headlines, and will be forgotten tomorrow.

Basically, this fancy "protocol", is just a HTTP middleware that throws a payment required error and returns a crypto address lol.

>Given that this runs atop Payment Required, doesn’t this mean that each API request would involve an extra one or two data transfers?

Yes, assuming its the first time you've interacted with an API endpoint and don't have cached payment requirements.

>Is there a reason why you wouldn’t pay ahead of time? I just understand why you couldn’t buy a few dozen/hundred/thousand dollars worth of credits, and wait until it runs low.

This would require manually integrating each vendor, which is totally valid if your agent performs a lot of a single type of task, but we suspect over time there will be huge value in agents being able to dynamically select tools / apis they want to use to accomplish their tasks, and dynamically pay for what they use

Has anyone tried this out and can say how long it takes?

The flowchart on the back-end looks pretty involved, needing to publish transactions on the chain and get confirmations. For Bitcoin, that takes upwards of like 15 minutes depending on what block depth the receiving party cares about and stuff. Even foregoing that and just listening for conflicting transactions being broadcast for a few seconds, that's an annoying delay to open a page. Not to mention dealing with the UI to authorize a specific payment for every damn page on paywalled news websites

I am excited to see how people will use this. Are there any sites actively allowing to use it rn?
Oh no, apparently this crypto shit is not dead yet.. :(
No mention of Lightning or Bitcoin in the entire whitepaper. Just Base - a L2 rollup on Etherum developed by Coinbase which is behind the x402 standard. Hope this goes nowhere, clearly Coinbase has too much interest in pushing its own stack. Free and open payments should be bitcoin based to be truely decentralized, on Layers-2 such as Lightning or Liquid.
You seem like a knowledgeable crypto user. Can you help integrate lightning payments with x402? Then we'll be rid of this Base/corporate-tech nonsense.
If he was, he wouldn't be shilling blockstream solutions.
> Free and open payments should be bitcoin based to be truely decentralized

Agreed. Which is why 5 years ago, I developed L402 (formerly known as LSAT) to fill this very gap:

  * https://github.com/lightninglabs/L402 (https://lightning-labs-2.gitbook.io/lsat)

  * https://lightning.engineering/posts/2020-03-30-lsat/
The x402 protocol as defined uses purely out of band payment verification. This trait makes the "one line of code" to add integration not entirely accurate, as there's still a substantial amount of code needed at both the client and server to verify payment receipt.

L402 is more opinionated as utilizes the Lightning Network (LN) directly within the protocol. The server presents the client with a SHA 256 payment hash embedded within an LN invoice. The server requires the client to present the pre-image for said payment hash. The only way the client can obtain said pre-image is by paying the invoice on the Lightning Network (all payments are conditional payments where a pre-image needs to be revealed to complete a payment).

L402 also adds a layer of macaroons, enabling the protocol handle both payment and fine-grained authentication.

The advantages of LN over something like Coinbase's Base chain include:

  * Privacy: Coinbase and the entire world sees all your transactions. 

  * Decentralization & Reliability: Base is a singleton instance, if it goes down, you can't make any transactions. LN is decentralized, just like the internet, you can always route around failures. 
 
  * Settlement Speed: Base blocks happen every 2 seconds, until that period your transaction isn't finalized. However that's only committing to Base, and not the underlying ETH chain, which has 12 second block time. Latency on LN is primarily a function of e2e network delay, so it can be as little as 100 ms.
bitcoin is decentralized in name only.
The protocol boast "no fee" but that's deceptive: if it's based upon a blockchain, there will be transaction fees.

Now if the problem they want to solve is the case of low amount payments (they claim "no high minimum") then a percentage fee is not an issue, but a per-transaction fee can be absolutely massive. Also depending on the blockchain, you're exposed to fee volatility, which might be another issue.

Am I missing something here?

x402 as a protocol has no fees, but the underlying network transactions are conducted on my have costs. Merchants can choose the underlying network transactions are conducted on that best fit their usecase. x402 also has the concept of a facilitator, which exists to abstract away the underlying payment networks. Many facilitators (including Coinbase's) subsidize the gas used for transactions.
There is some Blockchains where the fees are super low, like Solana
The protocol has no fees. If you use it with a blockchain, then there might possibly be a fee. If you use it with VISA, there will be a fee, etc.
Coinbase's blockchain (Base) generally has sub-cent send fees for USDC. Solana's fees are also in that ballpark.
Nano has 0 transaction fees in the sense that you have to do some work function instead to prevent spam

Obligatory self promotion https://www.youtube.com/watch?v=8hHG8gOkZBE & https://github.com/SerJaimeLannister/randomnano & just because I am lazy and I had never written what this software is except in one comment on HN which I am also going to link lol which is going to be best that I can sum it up with https://news.ycombinator.com/item?id=44700680

Which loops through a lot of transactions with a custom nano vanity id generator to embed data into blockchain which would have 0 gas fees.

Want to do something with it one day but not sure how to, or even if its worth it given the decentralized nature and Like, I want to really play with it once I can secure myself a college and then a job & maybe I will do it in my side project.

all these are solvable problems

we can get decentralized systems to sub 0.0000000000001 cent fees. Fee volatility Wille xist but thats a prerequisite for openness.

> if it's based upon a blockchain, there will be transaction fees

Not necessarily. Crypto wallet can authorize expense just by signing something and sending that signature. No blockchain transaction takes place. Then these signatures are batched.

More crypto and more microtransactions - look what a place the web has become... I don't see why we can't just happily hobble along our free cute little information highway and why capitalism has nowadays infused the internet with a rage for money-making.
The free web hasn't gone anywhere. You're using it now aren't you, on HN?
Working with banks and payment processors during a 15-year period, I can with 1.000% certainty say - no sane Bank will touch this with a 10-foot pole.

Not now, not in 20 years.

Coinbase, Kraken, etc... would. And they connect to your bank, so it doesn't seem like a problem if banks don't want to get involved.
Thankfully it doesn't matter because this happens on a blockchain so banks can go pound sand with their restriction and KYC/AML horseshit.

Given that this is Coinbase sponsored I'm not sure this will be even available to the people of the world despite being on blockchain.

18 years ago: https://www.reddit.com/r/WTF/comments/6hc3w/comment/c03udg0/

> "This code is reserved for future use."

> For when AT&T, Comcast, TimeWarner, et. al. have succeeded in their plan to make the interweb a toll-road. "Oh, you want your packets to go to reddit.com? That will be $0.00015/per."

Redditor had the right idea, just wrong names.

Interesting, how does that work?

10 secs into it, Blockchain

Close tab

Looks like a competitor to the A2P that google released....
No, they're working together on it

> AP2 is designed as a universal protocol, providing security and trust for a variety of payments like stablecoins and cryptocurrencies. To accelerate support for the web3 ecosystem, in collaboration with Coinbase, Ethereum Foundation, MetaMask and other leading organizations, we have extended the core constructs of AP2 and launched the A2A x402 extension, a production-ready solution for agent-based crypto payments. Extensions like these will help shape the evolution of cryptocurrency integrations within the core AP2 protocol.

[0] https://cloud.google.com/blog/products/ai-machine-learning/a...

> dormant 402 HTTP status code

Just use 403 until payments are made. This seems like an unnecessary marketing focus on an error instead of the actual technology.

API payments don't need to happen on the fly, and it will probably be detrimental to their latency to do so.

I don’t know who at Coinbase discerned that HTTP 402 is unused. There are sites that return 402 and a relevant “pay your bill to continue” page out there. Not all of them will suddenly support this blockchain payment method.
> Instant settlement

> Accept payments at the speed of the blockchain. Money in your wallet in 2 seconds, not T+2.

Are crypto payments instant now ?

I don't follow this space at all but my understanding was that the "speed of the blockchain" was pretty slow.

Or maybe they mean this compared to payment processors or bank transfers that can take days ?

Yeah, it's mostly bitcoin that's slow. SOL is sub-second, AVAX has a new architecture that has gone from a few seconds to sub-second, and while I have never used SUI I believe that one too is sub-second. ETH is still relatively slow, but not bitcoin slow.
The choice of name comes off as shady to me; seems like a marketing hack to make it sound like it's some kind of internationally-accepted standard, like oh, X.500.

Oh, and if you were wondering, yes, there is already an X.402[1] out there.

[1] https://www.itu.int/rec/T-REC-X.402/en