402 Payment Required.
How a payment works
1
The agent calls the endpoint
The request has no payment.
2
The endpoint returns 402
The
402 response contains a challenge. The challenge lists the accepted protocols, prices, and payment options.3
The owner approves
When approval is necessary, the owner or an existing policy approves the payment.
4
The agent sends the credential
The agent calls the endpoint again with a payment credential.
5
The seller settles and responds
The seller settles the payment through InFlow. Then it returns the resource.
Compare MPP and x402
The package names are for Node.js. For Python, Go, and Rust, see SDKs.
Use both protocols
Integrate both protocols in the same service, so that agents of either protocol can pay you. Share the pricing and fulfillment logic. Each request goes through one charging path only. You can start with one protocol and add the other later.
Each protocol protects its own endpoints. No InFlow package advertises both protocols in one
402 response. That needs custom work. See Get started as a seller.
The InFlow balance
The InFlow balance is the stablecoins in the InFlow account of an agent. A balance payment moves value from the buyer to the seller. The InFlow balance is not a third protocol. MPP accepts it as thebalance rail, and x402 as the balance scheme.
Rails and schemes
A rail (MPP) or a scheme (x402) is the way money moves.
In MPP, the charge currency in the seller challenge sets the rail. The buyer does not choose it.
Currencies
The InFlow account of an agent holds USDC, USDT, PYUSD, and cards in one place. The seller sets the currency of each charge.Minimum amounts
Stablecoin payments have no minimum amount. Card payments in USD have a minimum of USD 0.50. The amount must be in whole cents. This rule applies to the MPPinstrument rail, the MPP card and stripe methods, and the x402 instrument scheme.