x402 embeds payments in HTTP itself. The protocol revives the 402 Payment Required status code (reserved but idle for decades) and defines two things precisely: how a server states its price, and how a client presents proof that the price was paid. It originated at Coinbase in May 2025 and is now stewarded by the x402 Foundation under the Linux Foundation, with participation from Google, Visa, Stripe, AWS, Mastercard, Microsoft, Shopify, and Circle. The protocol has carried over 100 million transactions.

On Robinhood Chain, Scribe Finance is a native x402 implementation. A service that integrates the Provider SDK becomes an x402-compatible resource server at its existing endpoint; an agent built on the Scribe Finance Agent SDK is an x402-compatible client.

The x402 flow

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 Scribe Finance 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 ... }

Scribe Finance-specific fields

Scribe Finance extends the base x402 payment object with a small set of optional fields that carry plan and subscription context:

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

The scribefinance extension is strictly optional. A generic x402 client that ignores it degrades cleanly to the one-time payment path. A client built on the Scribe Finance SDK reads subscriptionScheme: true as a signal to prefer subscribing.

Acting as a Facilitator

In x402 terminology, the Facilitator is the trusted processor that settles payments on-chain on a resource server’s behalf. Scribe Finance’s Facilitator Network plays that role. Integrate Scribe Finance and settlement is delegated to the Facilitator, which brings:

  • Sub-cent fees, settled natively on Robinhood Chain
  • Subscriptions and allowances layered over per-request payments
  • x402 volume analytics in the Dashboard
  • Webhook events across the payment lifecycle

Payment proof verification

The X-PAYMENT header carries a base64-encoded proof object signed by the Scribe Finance Facilitator. Verification belongs to the Provider SDK:

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

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

With the paymentGate middleware in place, this verification runs automatically.

Multi-scheme support

One payment gate can advertise several schemes at once: subscriptions, one-time payments, or both together.

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

A request from an agent with an active subscription passes without interruption. Any other agent receives the full 402 response with both options laid out.

x402 version support

Scribe Finance supports x402 V1 today. We are tracking the V2 draft (multi-chain routing and session tokens), and the SDK will adopt V2 features when the specification stabilizes.