Blog

Sangria Team · March 11, 2026

Hello, Sangria!

Introducing Sangria — a payment network for agents and merchants powered by the x402 protocol.


We're excited to introduce Sangria — a payment network that makes it dead simple for agents and merchants to pay each other over HTTP.

Why We Built This

The internet was supposed to have native payments. HTTP 402 "Payment Required" has been in the spec since the 90s, but nobody ever built a real protocol around it — until now.

With the x402 protocol, any HTTP endpoint can require payment, and clients can automatically pay and get access. In many deployments, this can reduce or avoid account creation, static API keys, and subscription lock-in for one-off usage, though some merchants or environments may still require app-level identity, API keys, or pre-authorization controls.

How It Works

Today, Sangria supports external clients paying merchants hosted on the platform. An external client (AI agent or raw wallet) pays USDC on-chain and Sangria credits the merchant's fiat balance.

The basic x402 request loop looks like this:

  1. Client makes a normal HTTP request
  2. Server responds with 402 Payment Required and a price
  3. A payment authorization is signed via ERC-3009 TransferWithAuthorization
  4. Client retries the request with the payment header
  5. Server verifies, settles on-chain, and returns the data

The external client signs the payment authorization using ERC-3009 TransferWithAuthorization with its own wallet.

from fastapi import FastAPI
from x402.http import FacilitatorConfig, HTTPFacilitatorClient, PaymentOption
from x402.http.middleware.fastapi import PaymentMiddlewareASGI
from x402.http.types import RouteConfig
from x402.mechanisms.evm.exact import ExactEvmServerScheme
from x402.server import x402ResourceServer

app = FastAPI()

facilitator = HTTPFacilitatorClient(FacilitatorConfig(url="https://x402.org/facilitator"))
server = x402ResourceServer(facilitator)
server.register("eip155:84532", ExactEvmServerScheme())

routes = {
    "GET /premium": RouteConfig(
        accepts=[PaymentOption(scheme="exact", pay_to="0xYourWallet...", price="$0.0001", network="eip155:84532")],
        mime_type="application/json",
    ),
}
app.add_middleware(PaymentMiddlewareASGI, routes=routes, server=server)

@app.get("/premium")
async def premium():
    return {"message": "Paid content!", "paid": True}

What's Next

We're working on:

  • Sangria for Clients — Sangria Credits for clients, settled on-chain via the treasury wallet
  • Variable pricing — pay based on actual usage, not a fixed price
  • Multi-chain support — beyond Base
  • Agent-to-agent payments — autonomous agents transacting with each other

Stay tuned for more updates.