@curless/agentbank-merchant-sdk 0.6.0 → 0.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -5,19 +5,23 @@ Drop into a merchant's backend (Shopify storefront, ClubMed booking flow,
5
5
  TikTok Shop seller service, anything that wants to **accept agent payments**)
6
6
  and you get:
7
7
 
8
- - **`checkout.open`** — the fast path. **You** price an order from your own catalog and open a checkout; an agent pays it; the money lands in your account. agentbank never stores your catalog — the price you pass is authoritative. You accept every agent-payment protocol (ACP, x402, A2A, UCP, AP2, …) with zero protocol code.
8
+ - **`checkout.openACP`** — merchant-quoted **card** checkout. **You** price an order from your own catalog and open a checkout; an agent pays it with a card credential; the money lands in your account.
9
+ - **`checkout.openUCP`** — merchant-quoted **card** checkout over the **UCP** wire ([ucp.dev](https://ucp.dev)) — the UCP twin of `openACP` (same card settlement; reaches agents in the UCP ecosystem).
10
+ - **`checkout.openX402`** — merchant-quoted **USDC (x402)** checkout. You set the authoritative USDC amount; the gateway freezes it and returns the x402 challenge; a buyer agent signs an EIP-3009 authorization and pays `{ sessionId }` on-chain. Settlement is on Base (mainnet or Sepolia, decided by your account/key) — your USDC lands at your address. The stablecoin twin of `openACP`.
11
+ - **`orders`** — read your settled orders: `orders.list({ status, protocol, currency, from, to, limit, offset })` (filtered + paginated, with a total), `orders.get(id)` (one order in full + the card it was paid with), `orders.summary({…})` (count + gross by currency + breakdowns by protocol/status — a dashboard in one call).
9
12
  - **`AgentbankMerchant`** — typed client; also exposes `PaymentIntents` (create/get/capture/list/ledger-entries across ACP / x402 / AP2 / UCP / A2A), `PaymentLinks`, `Customers`, `BalanceTransactions`, and `WebhookEndpoints`. No refund method — refunds are Curless-originated (see below).
10
13
  - **`verifyWebhook` / `parseVerifiedWebhook`** — HMAC-SHA256 signature verification (Stripe-style `t=…,v1=…`), constant-time, **edge-safe** (Web Crypto, runs on Vercel Edge / Cloudflare Workers). Async — `await` them.
11
- - **`x402`** — `buildChallenge()` to emit your own canonical 402 from your route, `decodeXPaymentHeader()` to parse what the agent paid with.
14
+ - **`x402`** — emit/parse payments yourself (`buildChallenge()`, `decodeXPaymentHeader()`) **plus zero-crypto-knowledge helpers**: `usdc(network)` (contract + EIP-712 domain + decimals — no hardcoded hex), `isMainnet/isTestnet(network)`, `explorerTxUrl(network, txHash)` (a basescan / sepolia.basescan receipt link), `formatUsdc(baseUnits)` (exact 6-dp string, no float drift).
12
15
 
13
- One runtime dependency (`@curless/agentbank-core`, for portable crypto + the HTTP layer). **Edge-safe** — Web Crypto only, no `node:` builtins. Node 18+.
16
+ agentbank never stores your catalog — the price you pass is authoritative, and you accept every agent-payment protocol with zero protocol code. One runtime dependency (`@curless/agentbank-core`). **Edge-safe** — Web Crypto only, no `node:` builtins. Node 18+.
14
17
 
15
18
  > **Refunds**: agentbank exposes no refund-initiation endpoint. The merchant
16
- > refunds in Curless (it holds the money); Curless executes the card refund and
17
- > forwards the event, which advances the PI to `refunded` / `partially_refunded`.
18
- > Read the resulting state via `paymentIntents.get()` / `.list()`.
19
+ > refunds in Curless (it holds the money); Curless executes the refund and
20
+ > forwards the event, which advances the order/PI to `refunded` /
21
+ > `partially_refunded`. Read the resulting state via `orders.list({ status:
22
+ > 'refunded' })` or `paymentIntents.get()`.
19
23
 
20
- ### Fast path — open a merchant-quoted checkout
24
+ ## Fast path — open a merchant-quoted checkout
21
25
 
22
26
  ```ts
23
27
  import { AgentbankMerchant } from '@curless/agentbank-merchant-sdk';
@@ -28,30 +32,58 @@ const agentbank = new AgentbankMerchant({
28
32
  merchantId: process.env.AGENTBANK_MERCHANT_ID!,
29
33
  });
30
34
 
31
- // In your "an agent wants to buy" handler: YOU set the price.
32
- const checkout = await agentbank.checkout.open({
35
+ // CARD (ACP) — YOU set the price; an agent pays it; money lands in your account.
36
+ const checkout = await agentbank.checkout.openACP({
33
37
  currency: 'EUR',
34
- items: [
35
- { sku: 'resort-bali', name: 'Club Med Bali — 7 nights', quantity: 1, unitPrice: 192000 },
36
- ],
38
+ items: [{ sku: 'resort-bali', name: 'Club Med Bali — 7 nights', quantity: 1, unitPrice: 192000 }],
37
39
  });
38
-
39
- // Hand checkout.id back to the buyer agent; it pays, money lands in your account.
40
40
  return { checkoutId: checkout.id, amount: checkout.amount, currency: checkout.currency };
41
+
42
+ // USDC (x402) — YOU set the USDC amount (base units, 6 dp). Hand the challenge
43
+ // to the buyer agent; it signs + pays `{ sessionId }` on-chain. The network
44
+ // (base / base-sepolia) is decided by your account — same code on testnet/mainnet.
45
+ const x402co = await agentbank.checkout.openX402({
46
+ amount: 1_050_000, // 1.05 USDC
47
+ items: [{ sku: 'resort-bali', name: 'Club Med Bali — 7 nights', quantity: 1, unitPrice: 1_050_000 }],
48
+ });
49
+ return { sessionId: x402co.sessionId, accepts: x402co.accepts, network: x402co.network };
50
+ ```
51
+
52
+ That's the whole integration: install, set three env vars, call one method. You
53
+ stay the source of truth for your catalog and prices — nothing to sync.
54
+
55
+ ## Read your orders
56
+
57
+ ```ts
58
+ // Filtered + paginated (status / protocol / currency / date range):
59
+ const { data, pagination } = await agentbank.orders.list({ status: 'paid', protocol: 'x402', limit: 50 });
60
+
61
+ // One order in full (line items + the card it was paid with):
62
+ const { order, payment } = await agentbank.orders.get(data[0]!.id);
63
+
64
+ // A dashboard in one call: count + gross by currency + by protocol/status.
65
+ const summary = await agentbank.orders.summary({ from: '2026-06-01' });
66
+ // summary.count · summary.byCurrency[{ currency, count, totalAmount }] · summary.byProtocol · summary.byStatus
41
67
  ```
42
68
 
43
- That's the whole integration: install, set three env vars, call `checkout.open`.
44
- You stay the source of truth for your catalog and prices — nothing to sync.
69
+ ## x402 helpers display a settled payment, zero crypto knowledge
70
+
71
+ ```ts
72
+ import { x402 } from '@curless/agentbank-merchant-sdk';
73
+
74
+ x402.explorerTxUrl('base', '0xa596…'); // → https://basescan.org/tx/0xa596… (sepolia.basescan on testnet)
75
+ x402.formatUsdc(1_050_000); // → "1.050000" (exact string math, no float drift)
76
+ x402.formatUsdc(1_050_000, { symbol: true }); // → "1.050000 USDC"
77
+ x402.isMainnet('base'); // → true (isTestnet('base-sepolia') → true)
78
+ x402.usdc('base')!.contract; // → "0x833589…02913" (no hardcoded hex)
79
+ ```
45
80
 
46
- ### Lower-level — PaymentIntents, webhooks, x402
81
+ ## Lower-level — PaymentIntents, webhooks, self-emitted 402
47
82
 
48
83
  ```ts
49
84
  import { AgentbankMerchant, parseVerifiedWebhook, x402 } from '@curless/agentbank-merchant-sdk';
50
85
 
51
- const client = new AgentbankMerchant({
52
- baseUrl: 'https://api.agentbank.dev',
53
- apiKey: process.env.AGENTBANK_KEY!, // merchant:write
54
- });
86
+ const client = new AgentbankMerchant({ baseUrl: 'https://mcp.curless.ai', apiKey: process.env.AGENTBANK_KEY! });
55
87
 
56
88
  // Create a PaymentIntent the agent will pay against
57
89
  const pi = await client.paymentIntents.create({
@@ -71,14 +103,22 @@ const event = await parseVerifiedWebhook(
71
103
  req.headers['x-agentbank-signature'],
72
104
  );
73
105
 
74
- // Or emit your own 402 challenge from your route
75
- return new Response(JSON.stringify(x402.buildChallenge({
76
- asset: '0x036CbD…F7e', // base-sepolia USDC
77
- network: 'base-sepolia',
78
- payTo: '0xMerchantAddr',
79
- amount: '6200000', // 6.20 USDC
80
- resource: 'https://shop.example/api/checkout',
81
- })), { status: 402, headers: { 'content-type': 'application/json' } });
106
+ // Or emit your own 402 challenge from your route. buildChallenge auto-fills the
107
+ // right EIP-712 domain per network ("USD Coin" on base, "USDC" on base-sepolia)
108
+ // — a wrong name reverts on-chain, so let the helper get it right.
109
+ const usdc = x402.usdc('base')!;
110
+ return new Response(
111
+ JSON.stringify(
112
+ x402.buildChallenge({
113
+ asset: usdc.contract, // no hardcoded hex
114
+ network: 'base',
115
+ payTo: '0xYourUsdcAddress',
116
+ amount: '1050000', // 1.05 USDC (6 dp)
117
+ resource: 'https://shop.example/api/checkout',
118
+ }),
119
+ ),
120
+ { status: 402, headers: { 'content-type': 'application/json' } },
121
+ );
82
122
  ```
83
123
 
84
124
  ## Timeouts & errors
@@ -28,6 +28,7 @@ export declare class CheckoutResource {
28
28
  constructor(client: AgentbankMerchant);
29
29
  openACP(input: OpenCheckoutInput): Promise<Checkout>;
30
30
  openX402(input: OpenX402CheckoutInput): Promise<X402Checkout>;
31
+ openUCP(input: OpenCheckoutInput): Promise<Checkout>;
31
32
  }
32
33
  export type OpenX402CheckoutInput = {
33
34
  items: CheckoutLineItem[];
@@ -1 +1 @@
1
- {"version":3,"file":"checkout.d.ts","sourceRoot":"","sources":["../../src/resources/checkout.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AACtD,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,aAAa,CAAC;AAE3D,MAAM,MAAM,gBAAgB,GAAG;IAC7B,6BAA6B;IAC7B,GAAG,EAAE,MAAM,CAAC;IACZ,QAAQ,EAAE,MAAM,CAAC;IACjB,oEAAoE;IACpE,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG;IAC9B,KAAK,EAAE,gBAAgB,EAAE,CAAC;IAC1B,uEAAuE;IACvE,QAAQ,EAAE,MAAM,CAAC;IACjB,oEAAoE;IACpE,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF,MAAM,MAAM,QAAQ,GAAG;IACrB,wDAAwD;IACxD,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,MAAM,CAAC;IACf,4BAA4B;IAC5B,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC;AAKF,qBAAa,gBAAgB;IACf,OAAO,CAAC,QAAQ,CAAC,MAAM;gBAAN,MAAM,EAAE,iBAAiB;IAKhD,OAAO,CAAC,KAAK,EAAE,iBAAiB,GAAG,OAAO,CAAC,QAAQ,CAAC;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,4BAA4B;IAC5B,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC;AAKF,qBAAa,gBAAgB;IACf,OAAO,CAAC,QAAQ,CAAC,MAAM;gBAAN,MAAM,EAAE,iBAAiB;IAKhD,OAAO,CAAC,KAAK,EAAE,iBAAiB,GAAG,OAAO,CAAC,QAAQ,CAAC;IAiCpD,QAAQ,CAAC,KAAK,EAAE,qBAAqB,GAAG,OAAO,CAAC,YAAY,CAAC;IA4B7D,OAAO,CAAC,KAAK,EAAE,iBAAiB,GAAG,OAAO,CAAC,QAAQ,CAAC;CAuB3D;AAED,MAAM,MAAM,qBAAqB,GAAG;IAClC,KAAK,EAAE,gBAAgB,EAAE,CAAC;IAC1B,mEAAmE;IACnE,MAAM,EAAE,MAAM,CAAC;IACf,oEAAoE;IACpE,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF,MAAM,MAAM,YAAY,GAAG;IACzB,0DAA0D;IAC1D,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;IACpB,8EAA8E;IAC9E,OAAO,EAAE,uBAAuB,EAAE,CAAC;IACnC,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC"}
@@ -50,5 +50,26 @@ export class CheckoutResource {
50
50
  },
51
51
  });
52
52
  }
53
+ // Merchant-quoted UCP (card) checkout — the UCP twin of `openACP`. YOU price
54
+ // the order; the gateway opens a UCP checkout session (it holds no catalog)
55
+ // and returns it. A buyer agent completes it by POSTing a delegated card
56
+ // credential to /ucp/:merchantId/checkout-sessions/:id/complete — settled via
57
+ // the card rail, exactly like ACP, just over the UCP wire (ucp.dev).
58
+ async openUCP(input) {
59
+ const merchantId = input.merchantId ?? this.client.merchantId;
60
+ if (!merchantId) {
61
+ throw new Error('merchantId is required — set it on AgentbankMerchant({ merchantId }) or pass it to openUCP()');
62
+ }
63
+ const session = await this.client.request('POST', `/ucp/${encodeURIComponent(merchantId)}/checkout-sessions`, {
64
+ body: {
65
+ currency: input.currency,
66
+ line_items: input.items.map((it) => ({
67
+ item: { id: it.sku, quantity: it.quantity, unit_price: it.unitPrice, name: it.name },
68
+ })),
69
+ },
70
+ });
71
+ const amount = session.totals?.find((t) => t.type === 'total')?.amount ?? 0;
72
+ return { id: session.id, status: session.status, amount, currency: session.currency };
73
+ }
53
74
  }
54
75
  //# sourceMappingURL=checkout.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"checkout.js","sourceRoot":"","sources":["../../src/resources/checkout.ts"],"names":[],"mappings":"AA6BA,+EAA+E;AAC/E,2EAA2E;AAC3E,wEAAwE;AACxE,MAAM,OAAO,gBAAgB;IACE;IAA7B,YAA6B,MAAyB;QAAzB,WAAM,GAAN,MAAM,CAAmB;IAAG,CAAC;IAE1D,+EAA+E;IAC/E,8EAA8E;IAC9E,WAAW;IACX,KAAK,CAAC,OAAO,CAAC,KAAwB;QACpC,MAAM,UAAU,GAAG,KAAK,CAAC,UAAU,IAAI,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC;QAC9D,IAAI,CAAC,UAAU,EAAE,CAAC;YAChB,MAAM,IAAI,KAAK,CACb,8FAA8F,CAC/F,CAAC;QACJ,CAAC;QACD,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,OAAO,CAKtC,MAAM,EAAE,QAAQ,kBAAkB,CAAC,UAAU,CAAC,oBAAoB,EAAE;YACrE,IAAI,EAAE;gBACJ,QAAQ,EAAE,KAAK,CAAC,QAAQ;gBACxB,KAAK,EAAE,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC;oBAC9B,EAAE,EAAE,EAAE,CAAC,GAAG;oBACV,QAAQ,EAAE,EAAE,CAAC,QAAQ;oBACrB,SAAS,EAAE,EAAE,CAAC,SAAS;oB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C,IAAI,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,GAAG,EAAE,QAAQ,EAAE,EAAE,CAAC,QAAQ,EAAE,UAAU,EAAE,EAAE,CAAC,SAAS,EAAE,IAAI,EAAE,EAAE,CAAC,IAAI,EAAE;iBACrF,CAAC,CAAC;aACJ;SACF,CAAC,CAAC;QACH,MAAM,MAAM,GAAG,OAAO,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC,CAAC;QAC5E,OAAO,EAAE,EAAE,EAAE,OAAO,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,CAAC,QAAQ,EAAE,CAAC;IACxF,CAAC;CACF"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@curless/agentbank-merchant-sdk",
3
- "version": "0.6.0",
4
- "description": "Merchant-side SDK for agentbank — accept agent payments: open a merchant-quoted checkout (you price it, an agent pays it), PaymentIntents, edge-safe webhook verification, x402 challenge helpers.",
3
+ "version": "0.7.0",
4
+ "description": "Merchant-side SDK for agentbank — accept agent payments: open a merchant-quoted card (ACP / UCP) or USDC (x402) checkout you price, list/summarize orders, PaymentIntents, edge-safe webhook verification, and x402 helpers.",
5
5
  "license": "MIT",
6
6
  "type": "module",
7
7
  "main": "dist/index.js",