bare.

Developer docs.

Autonomous HTTP 402 payment rails, bounded agent sub-wallets, and instant USDC settlement on Base L2. Operators control spend deterministically while agents buy compute, data, and goods without human forms.

Machine-Readable Specification (/llms.txt)

Direct markdown documentation optimized for Claude, Cursor, Devin, and autonomous agents.

View /llms.txt

1. How It Works

Choose your perspective to view the integration lifecycle.

01

Deposit Vault Liquidity

Deposit native USDC on Base L2 using your mobile wallet QR code. Individual agents spend against this balance but never access master private keys.

02

Set SpendGuard Policy

Issue scoped API keys with hard rules: rolling daily cap (e.g. $25.00/day), per-transaction ceiling (e.g. $5.00/tx), and master kill switch protection.

03

Connect via REST API

Give your agent its Bearer API key and wrap its HTTP calls in bareFetch. It never holds a wallet or private key.

04

Autonomous 402 Settlement

When a merchant answers HTTP 402, bare. checks the agent's limits, the vault signs a USDC authorization, and the merchant settles it on Base. Every payment has a real tx hash.

2. Implementation Snippets

Copy-paste configurations for agent runners, middleware gates, and store bridges.

agent api
// Pay any x402 (HTTP 402) merchant with real USDC, inside your SpendGuard limits
// curl -O https://bare.money/sdk/bare.js   (one file, no dependencies)
import { bareFetch } from './bare.js';

const res = await bareFetch('https://merchant.example/api/report', {
  agentKey: process.env.BARE_AGENT_KEY, // bm_sk_live_...
  onPayment: ({ amountUsdc, payTo, transaction }) =>
    console.log(`Paid ${amountUsdc} USDC to ${payTo} in tx ${transaction}`)
});

if (res.ok) {
  console.log(await res.json());
} else {
  // SpendGuard rejections carry machine-readable remediation
  const body = await res.json();
  console.error(body.code, body.spendguard?.remediation?.suggested_action);
}

3. Order Tracking and Asset Access

How autonomous agents query fulfillment updates and retrieve digital assets.

Query Order Status

Call GET /api/v1/orders/:orderId with Bearer authorization. The endpoint returns live status (paid, fulfilled, or processing), Base L2 tx hash, receipt ID, and shipping details.

GET /api/v1/orders/order_gfc5vh1m

Digital Asset Delivery Stream

For digital goods, call GET /api/v1/orders/:orderId/download to retrieve the license token, API credentials, or file attachment with an authenticated download token.

GET /api/v1/orders/order_gfc5vh1m/download

4. Merchant HTTP 402 Middleware

Protect APIs, compute resources, and services with 3-line drop-in HTTP 402 middleware.

01

Challenge Unpaid Traffic

Unpaid requests get HTTP 402 with a base64 PAYMENT-REQUIRED header: price in USDC atomic units, token contract, network and your receiving address (x402 v2).

02

Settlement Verification

The retry carries PAYMENT-SIGNATURE, a signed EIP-3009 authorization. The facilitator checks the signature and balance, settles it on-chain, and only then does your handler run. The response carries PAYMENT-RESPONSE with the tx hash.

5. E-Commerce Store Bridges

Enable autonomous AI agent shopping on Shopify, WooCommerce, and BigCommerce stores.

Shopify Bridge

App Proxy

Standalone micro-bridge querying Shopify Admin GraphQL API. Maps products to /.well-known/bare-products.json and creates paid orders on Base L2 USDC settlement.

plugins/shopify/bare-shopify-bridge.js

Download paused: this plugin is being rebuilt on the x402 flow and is not available yet.

WooCommerce

WordPress

Native WordPress plugin. Exports machine-readable catalog, exposes ?wc-api=bare_checkout for HTTP 402 purchases, and marks orders processing upon on-chain verification.

plugins/woocommerce/bare-money-gateway.php

Download paused: this plugin is being rebuilt on the x402 flow and is not available yet.

BigCommerce

REST V2/V3

Micro-bridge integrating V3 Catalog and V2 Orders APIs. Responds with HTTP 402 to agents and writes Awaiting Fulfillment orders with tx notes upon USDC receipt.

plugins/bigcommerce/bare-bigcommerce-bridge.js

Download paused: this plugin is being rebuilt on the x402 flow and is not available yet.

6. Agent Pairing

New agents request access; a human operator approves them and sets their limits.

01

Request Pairing

POST /api/v1/agents/pair with the vault id, agent name, role and requested limits. The request appears in Bare Cloud for that vault's owner.

02

Poll for Approval

Poll GET /api/v1/agents/pair/status?token=<pairingToken>. Once approved, the response contains the API key. Anonymous self-registration is off by default, since anyone could otherwise spend from the vault.

7. SpendGuard Invariants

Deterministic safety constraints enforced before every on-chain settlement.

Master Kill Switch

Hard Block

When armed, all incoming checkout requests across all agents immediately return HTTP 403 Forbidden. No funds can move under any circumstances.

Per-Agent Daily Limits

24h Rolling Budget

Each agent is allocated a dedicated daily ceiling. Once cumulative spending reaches this threshold, subsequent checkouts fail with HTTP 403 until the budget resets at 00:00 UTC.

Single Transaction Cap

Per-Request Ceiling

Protects against rogue high-cost requests. Even if an agent has a $100 daily limit, a single transaction cap of $5.00 guarantees no individual purchase can exceed $5.00.

Physical Shipping Protection

Physical Orders

Items flagged as physical in the merchant catalog require full shipping recipient, street, city, postal code, and country payload during checkout. Requests missing shipping details are rejected with HTTP 400.

8. Network Specifications

Live configuration of this deployment.

Network: Base Sepolia (testnet) (eip155:84532)
Chain ID: 84532
Currency: Native USDC (Circle)
USDC Contract: 0x036CbD53842c5426634e7929541eC2318f3dCF7e
Gas Profile: Paid by the facilitator (https://x402.org/facilitator)
Block Time: ~2 seconds