stipend

eip155:84532 sql.js ledger USDC

Policy desk + live x402 facilitator

Humans write the policy.
Agents spend inside it.

A stipend, not a card. Fund a daily cap, a per-payment max, and a merchant allowlist. Issue one-time grants. Payments above the threshold wait on your desk. The ledger never overspends. Live settles go through x402.org on Base Sepolia testnet.

Policy

Spend only happens inside a rule you wrote.

01

Daily cap

A Cloudflare-style ceiling. Pending payments reserve balance so two calls cannot race the same units.

02

Per-payment max

No single signature can empty the wallet. Anything above the max is rejected before it reaches the desk.

03

Merchant allowlist

Only hostnames you named. The weather demo settles to demo.stipend and nowhere else.

04

Approval queue

At or below the threshold, auto-settle. Set the threshold to 0, or go above it, and a human must approve or deny.

05

One-time grants

Amount, merchant, expiry. Consumed once, like a virtual card that dies after use. Expired grants never debit.

06

Reserved ledger

A pending payment holds funds. Approve converts the hold. Deny releases it. The available balance cannot go negative.

Protocol

An HTTP conversation, not a checkout form.

The paid demo is GET /demo/weather?city=. A bare request is challenged. The buyer in the platform — or stipend pay — signs with a demo HMAC and retries.

  1. GET

    Ask for the resource

    /demo/weather?city=Melbourne with no payment header.

  2. 402

    Challenge

    Base64 PAYMENT-REQUIRED: scheme, network, amount, asset, payTo, expiresAt, nonce, paymentId.

  3. SIG

    Sign and retry

    HMAC-SHA256 over paymentId:amount:agentId, sent as PAYMENT-SIGNATURE.

  4. 200

    Settle or wait

    Under threshold: 200 and weather. Above it: 202 pending until the desk acts. PAYMENT-RESPONSE on the way back.

Limits

What this is not.

Not a card issuer

There is no PAN, no Stripe charge, no live one-time card. Grants are ledger rows with an expiry.

Not x402 mainnet

Live path uses the x402.org facilitator on Base Sepolia (eip155:84532, USDC). Mainnet would switch FACILITATOR_URL and network eip155:8453.

Policy still gates settle

HMAC desk flow writes the sql.js ledger. Live v2 payloads verify onchain, then the stipend policy must settle before facilitator.settle.

Platform

Sit the desk. Provision a bot. Pay for weather.

Create an agent, set policy, credit the ledger, and run the 402 flow in the browser. Approvals land in a queue you can stamp.

Open platform