Tender: always on the best API

Tender is an API marketplace where AI agents buy API access within a budget you approve, and PayPal moves the money on both sides.

  • Buyers add credits with PayPal Checkout.
  • Ask Tender, an AI agent, finds the right market, sets your routing policy, and pays for each request. When you save a PayPal account with PayPal Vault, it tops up by itself, and never above the weekly limit you approved.
  • Provider bidding agents reprice their bids against each other to win the next request.
  • Providers receive what they earned through PayPal Payouts.

Try it: tender.heyarca.app · Source (MIT): github.com/heyarca/tender · For coding agents: npx @heyarca/tender@latest

Tender is a new project. Its first commit is from November 9, 2026. Everything runs on the PayPal sandbox, so no real money moves.

Inspiration

Every app and every AI agent depends on third-party APIs: weather, prices, translation, model inference, geocoding. Today you pick one vendor, write its SDK into your code, and hope. When that vendor gets slow, serves old data, raises its price, or goes down, your product breaks. Switching means new code.

AI agents make this more urgent. An agent can already decide which API it needs. It cannot safely pay for one. Handing an agent a card number is not acceptable, and asking a person to approve every $0.000018 request is not practical.

The name comes from procurement. In a tender, suppliers bid for a contract. We asked what happens if every API request is a small tender: providers bid, the buyer states requirements, the best qualifying offer wins, and the payment settles by itself.

That needs money to move in both directions, between many buyers and many sellers, with rules an agent cannot break. PayPal already does the first part. This hackathon asked what happens when you put AI behind the wheel. Tender is our answer: one AI agent on the buyer's side, AI agents on the sellers' side, and PayPal between them.

It maps to three ideas from the hackathon brief:

  • Agents that transact, not just recommend. Ask Tender buys API requests and tops up the balance on the user's behalf.
  • Agent-to-agent commerce. Provider agents set prices, a buyer agent chooses among them, and each request settles a payment between the two sides.
  • A marketplace that pays its sellers. Tender collects from buyers with Checkout and pays providers with Payouts.

What it does

1. One market for every API

Tender has 75 markets in 7 groups: weather and environment, market data, travel and logistics, AI models, identity and risk, web data, and sports. Each market implements one of 37 typed contracts, for example weather.current or translation.text. A contract fixes the inputs and the output fields, so switching providers never changes your code.

In each market, providers bid a price per million requests. Tender also tracks every provider's P95 latency, data age, and success rate.

2. You state requirements. Tender routes.

A routing policy has four limits and one preference:

  • Maximum price per request
  • Maximum P95 latency
  • Maximum data age
  • Minimum success rate
  • Prefer the lowest cost, the lowest latency, or the freshest data

For every request, Tender removes the providers that fail any limit, ranks the rest by your preference, and sends the request to the first one. The cheapest provider never wins if it is too slow, stale, or unreliable. The page explains each decision in plain words, for example: "Brindlewood is cheaper ($0.40 /M) but excluded: P95 310 ms exceeds 150 ms."

When the active provider stops qualifying, Tender switches to the next one immediately. When a better offer appears, Tender switches after a 10-second cooldown, so routes stay stable. If no provider qualifies, Tender says so. It never breaks your policy silently.

3. Buyers pay with PayPal

One API request can cost $0.000018. No payment network should carry a transaction that small, so Tender works like other usage-priced API platforms: you prepay credits, and each request draws from the balance.

  • Click Add funds, choose $5, $10, or $20, and approve in PayPal Checkout.
  • The balance updates when PayPal confirms the capture.
  • Each successful request deducts the winning provider's bid. A request that fails is never charged.
  • The Account page lists every top-up and charge, with filters, totals, and CSV export.

4. Ask Tender spends for you, inside a limit you set

Ask Tender is a chat agent on every page. You tell it what your app needs in plain English:

Keep my app on the cheapest San Francisco weather feed under $30 per million requests with P95 under 300 ms, and don't spend more than $5 this week.

Ask Tender then:

  1. Finds the market and checks which provider wins under your limits.
  2. Applies the routing policy. The market page you are looking at updates.
  3. Asks you to approve a weekly spending limit. This is the only approval it needs.
  4. Runs the paid requests and reports the provider, the cost, and what is left this week.

In the same approval card you can tick "Let Ask Tender top up automatically with PayPal". You approve once in a PayPal window, and PayPal Vault saves the account. From then on, when the balance runs low, Ask Tender adds credits with no popup and no further approval. The top-ups in one week can never add up to more than the limit you approved. You can remove the saved PayPal account on the Account page at any time, which also deletes the payment token at PayPal.

Ask Tender also works with your PayPal records. It can look up your top-up orders, list your transactions, and create and send a PayPal invoice for the week's usage.

5. Provider agents compete on price

On the other side of the market, each provider has a pricing agent. In a bidding round, a language model looks at the current bids, the buyer's policy, recent wins and losses, and each provider's performance. It then sets a new bid for every provider and gives a one-sentence reason, for example: "It lost the last 5 requests to Fernline at $18.00."

Routing re-ranks right away, and the Activity log shows every change with its reason. The agents have hard limits: a bid stays between 70% and 150% of the provider's listed bid, and a provider that fails a latency, freshness, or reliability check cannot buy its way back with a lower price.

6. Providers get paid with PayPal Payouts

Each request a provider serves adds the winning bid to its earnings. Settle now sends one PayPal Payouts batch that pays every provider with at least one cent of earnings. The Payouts page shows unpaid earnings per provider, each batch, each item, and its PayPal status. Amounts under a cent carry over to the next batch.

7. Any coding agent can buy through Tender

npx @heyarca/tender@latest

This one command adds Tender instructions to your project's AGENTS.md and CLAUDE.md, and adds the Tender MCP server to Claude Code, Cursor, and VS Code. Your coding agent can then list markets, compare bids, and call call_market to buy a request from the best provider. It pays from the credits you funded with PayPal, using an API key that is never written into your project. The same package is a small CLI and a JavaScript client with no dependencies. Adding --paypal also sets up PayPal's official MCP server next to Tender's.

How Tender uses PayPal

PayPal is the only way money enters and leaves Tender's credit system. These parts are live on the sandbox:

  • JavaScript SDK v6 and Orders v2 (buyer checkout). The server issues a client token for the SDK, creates the order, and captures it after approval. Every order carries the Tender account id as custom_id and a PayPal-Request-Id, so a retried call returns the first result. Checkout is branded "Tender" and asks for no shipping address.
  • Webhooks. PAYMENT.CAPTURE.COMPLETED adds the credits. Tender verifies every event with PayPal's verify-webhook-signature API and stores each event id once. The capture call and the webhook can both arrive, and the credits are still added exactly once, because the ledger accepts each capture id one time.
  • Vault v3 (saved PayPal for the agent). A setup token with usage_type: MERCHANT and usage_pattern: UNSCHEDULED_PREPAID becomes a payment token after the user approves. Agent top-ups are Orders v2 calls with payment_source.paypal.vault_id and a merchant-initiated stored_credential. PayPal captures in the same call.
  • Payouts (seller side). One batch pays all providers by email. Tender's batch id is the idempotency key. PAYMENT.PAYOUTSBATCH and PAYMENT.PAYOUTS-ITEM webhooks update each item's status.
  • PayPal Agent Toolkit. Ask Tender gets four PayPal tools from @paypal/agent-toolkit: get an order, list transactions, create an invoice, and send an invoice. They are limited to the visitor's own orders and transactions.
  • PayPal MCP server. npx @heyarca/tender@latest --paypal configures @paypal/mcp for the user's editor.

We ran each flow on the sandbox against the production site: a Checkout top-up, an agent top-up from a saved PayPal account with no popup, a refused top-up above the weekly limit, an invoice created and sent by the agent, and a Payouts batch that reached Success for three providers. That batch is on the live Payouts page.

How Tender uses AI

  • Ask Tender (buyer agent). Built with the Vercel AI SDK. The model is OpenAI GPT-5 mini through the Vercel AI Gateway, with Gemini 2.5 Flash as the fallback. Its tools are list_markets, get_market, apply_policy, request_spending_limit, get_balance, run_request, and top_up, plus the four PayPal Agent Toolkit tools.
  • Provider bidding agents (seller agents). The same model reprices every provider's bid and explains each move. The server clamps each bid to its limits. If the model fails, no bid changes.
  • AI as a product in the market. The translation and chat markets are served by models through the AI Gateway. An agent can buy AI inference through Tender the same way it buys weather data.
  • MCP for coding agents. Seven tools. Only call_market spends credits. The others are read-only.
  • Demo video narration. The voiceover in the demo video was generated with ElevenLabs text to speech (scripts/narrate.ts in the repo).

The rules that protect the user's money are in code, not in the prompt:

  • The ledger refuses any agent charge that would pass the weekly limit.
  • Before PayPal is charged for an automatic top-up, Tender records a reservation that counts against the limit. If the process stops halfway, the reserved amount still counts, so the agent can never pull more than the limit.
  • The model never sees PayPal credentials, and it cannot call PayPal actions outside the fixed set.

How Tender uses AG Grid

Every table in Tender is AG Grid Community 36, with no Enterprise modules. Markets change every few seconds, so the tables have to update in place, stay sorted, and show what changed.

  • Market directory: 75 live rows with quick filter, number filters, flashing cells, a trend column, and CSV export. Search, filters, and sort are stored in the URL, so a filtered view is a link.
  • Providers: the ranking re-orders with row animation when bids or conditions change.
  • Provider conditions: edit any provider's bid or performance like a spreadsheet, with undo and redo. Routing re-evaluates when you press Enter.
  • Bid history: each bidding round slides in at the top with the agent's reason.
  • Provider leaderboard: 29 providers across all markets, with a pinned totals row that follows the filters.
  • Transactions, earnings, and payout batches: filters, pinned totals rows, expandable batch rows, and CSV export, so PayPal top-ups can be checked against what requests and Ask Tender spent.

One wrapper maps Tender's design tokens onto AG Grid with the Theming API, so no AG Grid CSS file is imported. AG Grid loads as its own chunk when a grid comes near the viewport. That cut the landing page's first-load JavaScript from 749 KB to 514 KB (gzip).

How we built it

  • App: Next.js 16 (App Router), React 19, TypeScript, Tailwind CSS v4, deployed on Vercel.
  • Ledger: Neon Postgres. All amounts are integers in millionths of a dollar. A bid of $18 per million requests costs exactly 18 units per request. Each money change is one atomic SQL statement that debits the buyer and credits the provider together.
  • Routing engine: a pure, deterministic module that evaluates every provider against the policy, ranks the qualifiers, and runs the failover and cooldown rules. The web console, the HTTP API, Ask Tender, and the MCP server all use this one engine.
  • HTTP API: an OpenAPI 3.1 description at /api/v1/openapi.json. Every contract is one endpoint, for example /api/v1/weather/current?location=seoul.
  • Accounts: no sign-up. A browser gets its own Tender account on first use. API keys are shown once and stored only as a hash.
  • Live data: 23 markets return data from real sources: weather and air quality from Open-Meteo, crypto prices from Coinbase, currency rates from Frankfurter, geocoding from Photon and Open-Meteo, and translation and chat from models through the AI Gateway.

The code was written with AI coding agents. Prime Agent orchestrated parallel workers running Claude Opus 5.5 for the product UI and the engine, and GLM-5.3-Flash for backend audits and fixes. Each worker had its own git worktree and its own list of files. A shared contract document described the ledger, the routes, and the PayPal calls, so the lanes for checkout, payouts, the agent, bidding, and the grids could be built at the same time. In two days this produced 528 commits on main.

Challenges we ran into

  • Tiny prices and payment networks. A $0.000018 request cannot be its own PayPal transaction. Prepaid credits with an integer ledger solved the buyer side. On the seller side, PayPal's smallest payout is $0.01, so Tender pays whole cents and carries the rest forward. "Settle now" stays off until a provider has earned a full cent, and the page says why.
  • Letting an agent pay without a popup, safely. A saved payment method is powerful, so the limit had to hold even when things fail. Recording the reservation before the PayPal call, and using its id as the PayPal-Request-Id, means a crash or a retry cannot charge twice or pass the limit.
  • Never crediting twice. The browser's capture call and PayPal's webhook race each other. A unique index on the capture id made the order of arrival irrelevant.
  • Stopping other websites from spending a visitor's credits. A request paid from the browser's account must carry a custom Tender-Payment: credits header. That forces a CORS preflight, so another site cannot spend a visitor's balance.
  • The agent hesitated after approval. In testing, Ask Tender sometimes asked again after the user had approved the limit. We made the approved limit the go-ahead, so it now runs the requests in the same turn.
  • New payments take time to appear in PayPal's transaction search. Ask Tender now also lists the top-ups Tender recorded, so a payment made a minute ago is visible.
  • Bidding agents that explain themselves honestly. A faster model setting produced reasons that contradicted the bids. We kept the slower setting, about 20 seconds per round, and clamp every bid on the server.
  • Using the Agent Toolkit with the newest AI SDK. We re-wrapped each toolkit tool with its own schema and executor.

Accomplishments that we're proud of

  • PayPal carries the whole loop. Money enters through Checkout or Vault and leaves through Payouts, and an AI agent holds each side.
  • An agent that spends real (sandbox) money with a limit that holds. We tested the refusal cases, not only the success case.
  • A complete product, not a proof of concept. Landing page, market directory, market consoles, leaderboard, payouts, account, HTTP API, CLI, and MCP server. We walked the full path on the live site at desktop and phone widths.
  • It works outside our own UI. In Claude Code, a model called call_market and paid from PayPal-funded credits.
  • @heyarca/tender is published on npm.

What we learned

  • Agentic commerce is mostly about limits. The useful question is what the agent is allowed to do without asking, and that answer belongs in the payment layer.
  • PayPal's building blocks fit a two-sided market well: Orders for money in, Vault for delegated spending, Payouts for money out, and webhooks to keep one ledger in agreement with all of them.
  • Idempotency keys and a single source of truth for balances matter more than any model choice.
  • Agents need typed contracts. Once inputs and outputs are fixed, a model can compare providers and switch between them safely.

Scope today

  • All PayPal flows run on the sandbox with test accounts.
  • Provider names in the market data are fictional, except our own Arca Labs and THE ZONE BIO. Their bids and performance figures are produced by Tender's engine.
  • 23 of the 75 markets return live data from real sources. The other markets return generated values in the same contract shape.
  • Tender can also settle requests in USDC with x402 on Base Sepolia. PayPal credits are the main path.

What's next for Tender

  • Onboard real API providers, with PayPal onboarding for sellers.
  • Move from the sandbox to live PayPal accounts, with scheduled payouts.
  • Monthly PayPal invoices for teams that prefer to pay after use.
  • More live markets, and markets that agents open themselves.

Built With

  • ag-grid
  • bun
  • elevenlabs
  • gemini
  • mcp
  • neon
  • next.js
  • openai
  • paypal
  • paypal-agent-toolkit
  • paypal-checkout
  • paypal-javascript-sdk
  • paypal-orders-api
  • paypal-payouts
  • paypal-vault
  • paypal-webhooks
  • postgresql
  • react
  • tailwindcss
  • typescript
  • vercel
  • vercel-ai-gateway
  • vercel-ai-sdk
  • zod
Share this project:

Updates

Submission history