x402 puts payment inside the HTTP exchange itself. It takes the 402 Payment Required status code, which sat in the spec for decades without a real job, and gives it two precise ones: letting a server declare what a resource costs, and letting a client show that the cost has been covered. Coinbase published the protocol in May 2025. Governance has since moved to the x402 Foundation, part of the Linux Foundation. Google, Visa, Stripe and AWS take part, as do Mastercard, Microsoft, Shopify and Circle. More than 100 million transactions have run over the protocol so far.

Opus Protocol implements x402 natively on Robinhood Chain. Add the Provider SDK to a service and its existing endpoint becomes an x402-compatible resource server. Build an agent on the Opus Protocol Agent SDK and you have an x402-compatible client.

How an x402 exchange works

1. Client (agent) makes an unauthenticated HTTP request
   GET /v1/resource

2. Server responds with 402 Payment Required
   HTTP/1.1 402 Payment Required
   Content-Type: application/json

   {
     "version": "1",
     "accepts": [{
       "scheme": "exact",
       "network": "robinhood-mainnet",
       "token": "0x5fc5360D0400a0Fd4f2af552ADD042D716F1d168",
       "amount": "1000000",
       "payTo": "0x9Ca4...",
       "memo": "api-req-abc123"
     }]
   }

3. Client reads the payment terms, signs and submits a USDG transfer
   via the Opus Protocol Facilitator

4. Facilitator confirms the on-chain transaction, returns a proof object

5. Client retries the request with the proof attached
   GET /v1/resource
   X-PAYMENT: <base64-encoded proof object>

6. Server verifies the proof against the Facilitator or on-chain
   HTTP/1.1 200 OK
   Content-Type: application/json
   { ... resource data ... }

Opus Protocol extension fields

Under Opus Protocol, the base x402 payment object gains a small group of optional fields. They carry the plan and subscription context that the standard object has no slot for:

{
  "version": "1",
  "accepts": [{
    "scheme": "exact",
    "network": "robinhood-mainnet",
    "token": "0x5fc5360D0400a0Fd4f2af552ADD042D716F1d168",
    "amount": "1000000",
    "payTo": "0x9Ca4...",
    "memo": "api-req-abc123",
    "opusprotocol": {
      "planId": "0x7f3a...",
      "subscriptionScheme": true,
      "facilitator": "https://facilitator.opusprotocol.org"
    }
  }]
}

Nothing depends on the opusprotocol block being read. A generic x402 client can skip it and fall back cleanly to a one-time payment. A client using the Opus Protocol SDK treats subscriptionScheme: true as a hint that subscribing is the preferred route.

The Facilitator role

x402 uses the term Facilitator for the trusted party that settles payments on-chain for a resource server. In Opus Protocol, the Facilitator Network fills this role. Once you integrate, settlement is handed off to the Facilitator, and with it come:

  • Fees below one cent, settled directly on Robinhood Chain
  • Subscription and allowance models on top of pay-per-request
  • Analytics for x402 volume inside the Dashboard
  • Webhook events for each stage of the payment lifecycle

Verifying payment proofs

A client sends its proof in the X-PAYMENT header as a base64-encoded object that the Opus Protocol Facilitator has signed. Checking that proof is the job of the Provider SDK:

// inside your middleware or a route handler
const proof = opusprotocol.parsePaymentProof(req.headers["x-payment"]);
const valid = await opusprotocol.verifyPaymentProof(proof);

if (!valid) {
  return res.status(402).json(opusprotocol.buildPaymentRequired({ plan: plan.id }));
}

If you use the paymentGate middleware, this check happens for you with no extra code.

Advertising several schemes

A single payment gate can offer more than one scheme in the same 402 response: subscriptions alone, one-time payments alone, or both.

app.use("/api/v1", opusprotocol.paymentGate({
  pricing: [
    { type: "subscription", plan: monthlyPlanId },
    { type: "one-time", amount: 500_000 }, // fallback priced at 0.50 USDG/call
  ],
}));

An agent holding an active subscription gets through with no interruption. Every other agent sees the complete 402 response listing both choices.

Supported x402 versions

Opus Protocol implements x402 V1. We are following the V2 draft, which covers session tokens and routing across multiple chains. The SDK will pick up V2 capabilities once the specification settles.