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.
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
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?
>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
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.
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.
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.
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.
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.
> 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.
> 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."
> 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.
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.
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.
glad some people trying to make this. I've had the same idea in 2015 back when bitcoin was the only widely used cryptocurrency: https://www.jcfrei.com/the-ai-economy-bitcoin/ now with stablecoins and much faster chains it makes even more sense
53 comments
[ 2.6 ms ] story [ 72.4 ms ] threadWith Stripe moving into the space heavily and looking to lock things up in "Stripe-land", I think having an open protocol is great.
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.
- No fee
- Instant
- Blockchain agnostic
I mean for the actual settlement obviously.
https://en.m.wikipedia.org/wiki/Single_Euro_Payments_Area
https://github.com/bacen/pix-api
Does x402 prevent the double-spending problem?
Isn't it regressive to return to dependence on DNS for financial transactions?
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
https://anchorbrowser.io/blog/pay-to-win-coinbase-x402-ancho...
We are not far off from humans giving a monthly allowance to their agentic counterparts.
> 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?
Basically, this fancy "protocol", is just a HTTP middleware that throws a payment required error and returns a crypto address lol.
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
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
Agreed. Which is why 5 years ago, I developed L402 (formerly known as LSAT) to fill this very gap:
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:
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?
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.
we can get decentralized systems to sub 0.0000000000001 cent fees. Fee volatility Wille xist but thats a prerequisite for openness.
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.
Not now, not in 20 years.
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.
> "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.
10 secs into it, Blockchain
Close tab
> 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...
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.
> 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 ?
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