Skip to content(if available)orjump to list(if available)

x402 — An open protocol for internet-native payments

aeon_ai

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.

kreetx

It's not the shape of the API payload that is the problem, is it? Few banks have a REST API for payments is the issue IMO.

aeon_ai

The nature of the transaction itself is fundamentally different in a paygated/trustless API request.

This is different from an API schema of a /payments/ endpoint being segregated from the actual resource that is being paid for.

In this model, the payment is the cost of entry for the resource request itself. It's not as directly applicable to all payment scenarios, but enables a new class of transaction that is effectively pay-per-request.

It's worth noting that this protocol is primarily supported by Coinbase today -- You'd be using USDC on the Base network (Layer 2 on top of Ethereum). However, the protocol itself is opening meaning anyone can self-host the same mechanics on any network, with any token/crypto asset.

subscribed

There are modern banks-connected (including PBs) finance firms that offer modern protocols and can facilitate payments quickly and nicely (offering both custodial And non-custodial services).

I support one of the similar projects in my organisation and I can't wait for golive.

straumat

I am developping an open source x402 Java stack and I love this protocol ! You can see my projet ar https://mogami.tech

quinndupont

Corporate capture of payment rails, masquerading as open payments.

dewey

How would non corporate payment rails look like?

hackernudes

The Lightning Network (an open payment layer built on top of Bitcoin) or some other cryptocurrency.

philipwhiuk

This is built on top of crypto currency.

kingo55

That would be nice... Good luck to you if you can use it.

I would consider myself tech savvy but I struggled immensely to run lightning without custodial risk back.

lucb1e

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

jmarbach

Anchor Browser has documentation here showing how to combine x402 with an agentic browser session.

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.

warkdarrior

As long as the agentic browser can automate my PirateBay tasks, I don't intend to overcomplicate it with payments and such.

westurner

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?

olivia-banks

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?

astroflection

> 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.

Maybe you want to buy the service that is priced the lowest at the moment. Example: providers of inference services could drop their prices if they are underutilized. You could then have your system check for the best price and purchase only what is needed at the best price.

tleyden5iwx

I think the purpose is so that your agent can do things like buy airline tickets for you. Using x402 it doesn't have to go through a typical credit card checkout process, which might have a lot of safeguards that make sure there's an actual human on the other end (captchas, etc)

hvb2

Why not look at sepa? There's a whole continent that already solved this? Ticks all the boxes:

- No fee

- Instant

- Blockchain agnostic

I mean for the actual settlement obviously.

https://en.m.wikipedia.org/wiki/Single_Euro_Payments_Area

lucb1e

Is there also no fee for merchants? I thought business accounts are usually not as cheap as (or free like) consumer ones, some (all?) iirc pay per transaction or have tiers

It's also really hard to interface with. Afaik, I can't simply get an API token from my bank and send 2-cent transactions to pages I read if they'd publish the IBAN as part of an HTTP header or meta tag for example. Nor do I know that my bank would be happy about a thousand tiny transactions each month

flessner

As much as I like SEPA it is primarily for bank transfers.

The way that payments work through SEPA is that the merchant pulls the money from your account. Legally they require a "mandate" - this can be as little as a handwritten signature on a document.

Security is essentially provided by easy reversal and strong penalties for abuse.

kingo55

As opposed to blockchain where reversal depends on the grace of the merchant.

I've often wondered whether payments providers entering the blockchain space (like Visa/Mastercard) would act as trusted intermediaries for dispute resolution. Kind of a 2-of-3 multisig to disperse the funds in escrow.

nl

One of the most common examples of smart contacts is a reversible transaction with dispute resolution by a third-party.

Infact you could implement exactly what you suggest in a similar way.

edoceo

USA has started a FedNow program to make, basically, ACH faster.

Will take ages for that to become a browser extension, or embed. Too many parties make money off the current way. Similar to the health "care" ("insurance") in USA

btczeus

[dead]