@agentpickup/server

中文文档
0.8.0发布于 2026/11/05FSL-1.1-ALv2TypeScriptES Module近 30 天下载 1718

The pickup layer for agent payments: x402, MPP, UCP (+AP2), ACP and card checkout in; a signed QR pickup pass out; scan to hand over and settle.

原始使用文档

@agentpickup/server

The pickup layer for agent payments. A person or an AI agent buys online and pays by card (Stripe), USDC (x402), or a Stripe Shared Payment Token through MPP, UCP (with AP2 mandates) or ACP. The shop emails a signed QR, staff scan it at the counter, and the order is handed over. A card hold is captured at that moment; no-shows are released or refunded.

Shoppers and staff only ever see the shop's name, colours and email address.

import { createCollect, SqliteStore, resendMailer } from "@agentpickup/server";
import { generateSigningKeyPem } from "@agentpickup/core";

const pickup = createCollect({
  baseUrl: "https://orders.yourshop.com",
  merchant: { name: "Corner Café", brandColor: "#9a3412", fromEmail: "Corner Café <[email protected]>" },
  catalog: [{ id: "flat-white", name: "Flat white", priceCents: 450 }],
  payments: {
    card: { secretKey: process.env.STRIPE_KEY!, captureMode: "hold" },
    x402: { payTo: process.env.WALLET!, network: "eip155:8453" },
  },
  store: new SqliteStore("./data/pickup.db"),
  mailer: resendMailer({ apiKey: process.env.RESEND_KEY! }),
  signingKeyPem: process.env.PASS_SIGNING_KEY!, // generateSigningKeyPem()
  staffKey: process.env.STAFF_KEY,
});

// pickup.app is a Hono app: mount it, or call pickup.app.fetch from any runtime with Request/Response.

createVenueHost runs many venues on one install, each at /v/<slug> with its own menu, payments, staff key and Square connector, managed through an admin API with secrets sealed at rest. It also publishes a public directory at /directory/v1/shops, where agents find shops near someone that sell what they want, including shops on other sites that register their listing (POST /directory/v1/listings; every agentPickup shop serves its own at /.well-known/agentpickup.json). With signup, Square sellers sign themselves up at /connect (Sign in with Square) and manage their venue at /seller; fxToUsdCents() lets venues pricing in AUD and other currencies take USDC.

Connectors put orders on the screens staff already use: squareConnector for Square POS (menu and the venue's logo, address, hours and map position in; paid pickup orders out; ready and collected both ways), and a connector API at /connect/v1 any other platform can integrate against.

The first email is a receipt. With qrEmail: "when-ready" the pickup QR follows when the order is marked ready; by default it's in the receipt. Email goes through cloudflareMailer (Cloudflare Email Sending) or resendMailer, with a plain-text part, reply-to the shop, and cappedMailer for public demos.

Storage is SqliteStore (one file) or PostgresStore (any pg-style client: pg, Neon, Supabase), or your own Store. Shops priced in other currencies take x402 through payments.x402.toUsdCents, and payments.x402.refunds pays USDC no-shows back through the facilitator. Agents can also order and pay in one call at <shop>/api/x402/order, an address that never changes, so x402 catalogues such as PayAI's can list the shop.

Node 22.13 or later (uses node:sqlite). Full configuration, routes and protocol notes: github.com/dav3trad3r/agentpickup.

Licence: FSL-1.1-ALv2. Free to use, run and self-host for your own shop or platform; not for offering a competing product. Each release becomes Apache-2.0 two years after it ships.

版本与发布记录

@agentpickup/server 共发布 10 个版本,首次发布于 2026/11/03;过去 12 个月发布了 10 个版本。

版本发布日期距今
0.8.0latest2026/11/054 天前
0.7.02026/11/036 天前
0.6.12026/11/036 天前
0.6.02026/11/036 天前
0.4.02026/11/036 天前
0.3.02026/11/036 天前

关于 @agentpickup/server 的常见问题

@agentpickup/server 是什么?

The pickup layer for agent payments: x402, MPP, UCP (+AP2), ACP and card checkout in; a signed QR pickup pass out; scan to hand over and settle.

如何安装 @agentpickup/server?

在项目目录运行 npm install @agentpickup/server,或使用 pnpm add / yarn add / bun add。

@agentpickup/server 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@agentpickup/server 支持 ESM 还是 CommonJS?

以 ES Module 形式发布,推荐使用 import 引入。在 CommonJS 项目中,Node.js 20.19+ / 22.12+ 可以直接 require() 不含顶层 await 的 ES Module,更早的版本需要改用动态 import()。

@agentpickup/server 需要什么版本的 Node.js?

package.json 的 engines 字段要求 Node.js >=22.13。版本不符时 npm 默认只给出警告,开启 engine-strict 后会拒绝安装。

@agentpickup/server 可以商用吗?

@agentpickup/server 使用 FSL-1.1-ALv2 许可。声明的许可为 FSL-1.1-ALv2,请阅读许可原文确认使用条件。以上为概括,不构成法律意见,请以许可原文为准。

@agentpickup/server 的下载量有多少?

根据 npm 官方下载统计,@agentpickup/server 在 2026/10/07 – 2026/11/05 这 30 天内被下载 1,718 次,日均约 57 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@agentpickup/server 还在维护吗?

最新版本 0.8.0 发布于 2026/11/05(4 天前);至今共发布 10 个版本,其中过去 12 个月发布了 10 个;首次发布于 2026/11/03。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。