@pincerpay/merchant 0.5.0 → 0.5.1
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,28 +5,29 @@
|
|
|
5
5
|
[](https://github.com/ds1/pincerpay/blob/master/LICENSE)
|
|
6
6
|
[](https://www.typescriptlang.org/)
|
|
7
7
|
|
|
8
|
-
Merchant SDK for accepting on-chain USDC payments from AI agents via the [x402 protocol](https://x402.org).
|
|
8
|
+
Merchant SDK for accepting on-chain USDC payments from AI agents via the [x402 protocol](https://x402.org). Ships a Hono middleware that runs natively in Hono apps and inside Next.js App Router via `hono/vercel`.
|
|
9
9
|
|
|
10
10
|
> **ESM Required:** Your project must have `"type": "module"` in package.json. This package is ESM-only.
|
|
11
11
|
|
|
12
12
|
## Install
|
|
13
13
|
|
|
14
14
|
```bash
|
|
15
|
-
npm install @pincerpay/merchant
|
|
15
|
+
npm install @pincerpay/merchant hono
|
|
16
16
|
```
|
|
17
17
|
|
|
18
18
|
## Quick Start
|
|
19
19
|
|
|
20
|
-
###
|
|
20
|
+
### Hono
|
|
21
21
|
|
|
22
22
|
```typescript
|
|
23
|
-
import
|
|
24
|
-
import {
|
|
23
|
+
import { Hono } from "hono";
|
|
24
|
+
import { createPincerPayMiddleware } from "@pincerpay/merchant/nextjs";
|
|
25
25
|
|
|
26
|
-
const app =
|
|
26
|
+
const app = new Hono();
|
|
27
27
|
|
|
28
28
|
app.use(
|
|
29
|
-
|
|
29
|
+
"*",
|
|
30
|
+
createPincerPayMiddleware({
|
|
30
31
|
apiKey: process.env.PINCERPAY_API_KEY!,
|
|
31
32
|
merchantAddress: "YOUR_SOLANA_ADDRESS",
|
|
32
33
|
routes: {
|
|
@@ -44,26 +45,29 @@ app.use(
|
|
|
44
45
|
})
|
|
45
46
|
);
|
|
46
47
|
|
|
47
|
-
app.get("/api/weather", (
|
|
48
|
-
res.json({ temp: 72, unit: "F" });
|
|
49
|
-
});
|
|
48
|
+
app.get("/api/weather", (c) => c.json({ temp: 72, unit: "F" }));
|
|
50
49
|
|
|
51
|
-
app
|
|
50
|
+
export default app;
|
|
52
51
|
```
|
|
53
52
|
|
|
54
|
-
###
|
|
53
|
+
### Next.js (App Router)
|
|
54
|
+
|
|
55
|
+
Next.js doesn't have native x402 middleware support. Use Hono as a lightweight handler inside a catch-all App Router route:
|
|
55
56
|
|
|
56
57
|
```typescript
|
|
58
|
+
// app/api/[...route]/route.ts
|
|
57
59
|
import { Hono } from "hono";
|
|
58
|
-
import {
|
|
60
|
+
import { handle } from "hono/vercel";
|
|
61
|
+
import { createPincerPayMiddleware } from "@pincerpay/merchant/nextjs";
|
|
59
62
|
|
|
60
|
-
const app = new Hono();
|
|
63
|
+
const app = new Hono().basePath("/api");
|
|
61
64
|
|
|
62
65
|
app.use(
|
|
63
66
|
"*",
|
|
64
|
-
|
|
67
|
+
createPincerPayMiddleware({
|
|
65
68
|
apiKey: process.env.PINCERPAY_API_KEY!,
|
|
66
69
|
merchantAddress: "YOUR_SOLANA_ADDRESS",
|
|
70
|
+
syncFacilitatorOnStart: false, // Avoids build-time network call during prerendering
|
|
67
71
|
routes: {
|
|
68
72
|
"GET /api/weather": {
|
|
69
73
|
price: "0.01",
|
|
@@ -74,58 +78,64 @@ app.use(
|
|
|
74
78
|
})
|
|
75
79
|
);
|
|
76
80
|
|
|
77
|
-
app.get("/
|
|
81
|
+
app.get("/weather", (c) => c.json({ temp: 72 }));
|
|
78
82
|
|
|
79
|
-
export
|
|
83
|
+
export const GET = handle(app);
|
|
84
|
+
export const POST = handle(app);
|
|
80
85
|
```
|
|
81
86
|
|
|
82
|
-
|
|
87
|
+
> **Note:** `basePath("/api")` must match the catch-all route location. Route handlers use paths relative to basePath (`/weather` serves `/api/weather`).
|
|
83
88
|
|
|
84
|
-
|
|
89
|
+
### Express
|
|
90
|
+
|
|
91
|
+
Express adapter is on the roadmap. Use Hono today — it runs anywhere Express does and is a drop-in for most paywall workloads. Track [the Express adapter issue](https://github.com/ds1/pincerpay/issues) for the upcoming release.
|
|
92
|
+
|
|
93
|
+
## Reading the Verified Payer
|
|
94
|
+
|
|
95
|
+
After successful settlement, the middleware surfaces the verified payer (and the rest of the settlement metadata) on the Hono request context under the `pincerpay` key. Your route handlers can attribute the action to the paying agent without re-decoding the `X-PAYMENT` request header.
|
|
85
96
|
|
|
86
97
|
```typescript
|
|
87
|
-
// app/api/[...route]/route.ts
|
|
88
98
|
import { Hono } from "hono";
|
|
89
|
-
import {
|
|
90
|
-
|
|
99
|
+
import {
|
|
100
|
+
createPincerPayMiddleware,
|
|
101
|
+
type PincerPayContextVariables,
|
|
102
|
+
} from "@pincerpay/merchant/nextjs";
|
|
91
103
|
|
|
92
|
-
const app = new Hono()
|
|
104
|
+
const app = new Hono<{ Variables: PincerPayContextVariables }>();
|
|
93
105
|
|
|
94
106
|
app.use(
|
|
95
107
|
"*",
|
|
96
|
-
|
|
108
|
+
createPincerPayMiddleware({
|
|
97
109
|
apiKey: process.env.PINCERPAY_API_KEY!,
|
|
98
110
|
merchantAddress: "YOUR_SOLANA_ADDRESS",
|
|
99
|
-
syncFacilitatorOnStart: false, // Avoids build-time network call during prerendering
|
|
100
111
|
routes: {
|
|
101
|
-
"
|
|
102
|
-
price: "0.01",
|
|
103
|
-
chain: "solana",
|
|
104
|
-
description: "Current weather data",
|
|
105
|
-
},
|
|
112
|
+
"POST /api/trade": { price: "0.05", chain: "solana", description: "Place trade" },
|
|
106
113
|
},
|
|
107
114
|
})
|
|
108
115
|
);
|
|
109
116
|
|
|
110
|
-
app.
|
|
117
|
+
app.post("/api/trade", async (c) => {
|
|
118
|
+
const { payer, transaction, network } = c.get("pincerpay");
|
|
119
|
+
// payer -> verified agent wallet (Solana base58 or EVM 0x-hex)
|
|
120
|
+
// transaction -> settlement tx hash
|
|
121
|
+
// network -> CAIP-2 network id (e.g., "solana:5eykt4...", "eip155:8453")
|
|
111
122
|
|
|
112
|
-
|
|
113
|
-
|
|
123
|
+
await recordTrade({ agentWallet: payer, txHash: transaction });
|
|
124
|
+
return c.json({ ok: true });
|
|
125
|
+
});
|
|
114
126
|
```
|
|
115
127
|
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
> **Note:** `basePath("/api")` must match the catch-all route location. Route handlers use paths relative to basePath (`/weather` serves `/api/weather`).
|
|
128
|
+
`payer` comes from the facilitator's verified settle response — not the unverified `X-PAYMENT` request header. It is canonical across schemes (EVM `authorization.from`, Solana signer, etc. are all normalized to a single string).
|
|
119
129
|
|
|
120
|
-
|
|
130
|
+
> **Don't re-decode `X-PAYMENT` to extract the payer.** The request header carries an unverified, scheme-specific payload. The middleware already verifies, settles, and surfaces the canonical payer on `c.get("pincerpay")`. If you find yourself probing `payload.authorization.from` / `payload.from` / `payload.signer`, stop — read `c.get("pincerpay").payer` instead.
|
|
121
131
|
|
|
122
|
-
|
|
132
|
+
The same `payer` field is also included in the base64-encoded `payment-response` response header for clients that bypass the middleware and post directly to `/v1/settle`.
|
|
123
133
|
|
|
124
|
-
|
|
134
|
+
## API Reference
|
|
125
135
|
|
|
126
|
-
### `
|
|
136
|
+
### `createPincerPayMiddleware(config): Hono.MiddlewareHandler`
|
|
127
137
|
|
|
128
|
-
Hono middleware with
|
|
138
|
+
Hono middleware that intercepts requests matching configured routes and returns HTTP 402 with x402 payment requirements. On a successful payment, settles via the PincerPay facilitator and sets `c.set("pincerpay", { payer, transaction, network })` before passing to the next handler. Used directly in Hono apps and inside Next.js App Router via `hono/vercel`.
|
|
129
139
|
|
|
130
140
|
### `PincerPayClient`
|
|
131
141
|
|
|
@@ -163,6 +173,16 @@ interface RoutePaywallConfig {
|
|
|
163
173
|
chains?: string[]; // Multiple chains
|
|
164
174
|
description?: string; // Human-readable description
|
|
165
175
|
}
|
|
176
|
+
|
|
177
|
+
interface PincerPayPaymentInfo {
|
|
178
|
+
payer: string; // Verified agent wallet (Solana base58 or EVM 0x-hex)
|
|
179
|
+
transaction: string; // Settlement transaction hash
|
|
180
|
+
network: string; // CAIP-2 network id
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
type PincerPayContextVariables = {
|
|
184
|
+
pincerpay: PincerPayPaymentInfo;
|
|
185
|
+
};
|
|
166
186
|
```
|
|
167
187
|
|
|
168
188
|
### Utility Functions
|
|
@@ -184,7 +204,7 @@ getUsdcAsset("base"); // USDC contract address for Base
|
|
|
184
204
|
### Multi-chain pricing
|
|
185
205
|
|
|
186
206
|
```typescript
|
|
187
|
-
|
|
207
|
+
createPincerPayMiddleware({
|
|
188
208
|
apiKey: process.env.PINCERPAY_API_KEY!,
|
|
189
209
|
merchantAddress: "YOUR_ADDRESS",
|
|
190
210
|
routes: {
|
|
@@ -202,7 +222,7 @@ pincerpay({
|
|
|
202
222
|
Routes not listed in `routes` pass through without payment. Only matching `METHOD /path` patterns trigger the 402 paywall.
|
|
203
223
|
|
|
204
224
|
```typescript
|
|
205
|
-
|
|
225
|
+
createPincerPayMiddleware({
|
|
206
226
|
apiKey: process.env.PINCERPAY_API_KEY!,
|
|
207
227
|
merchantAddress: "YOUR_ADDRESS",
|
|
208
228
|
routes: {
|
|
@@ -244,10 +264,10 @@ Your webhook secret is in the [dashboard settings](https://www.pincerpay.com/das
|
|
|
244
264
|
|
|
245
265
|
```typescript
|
|
246
266
|
// Bad
|
|
247
|
-
|
|
267
|
+
createPincerPayMiddleware({ apiKey: "pp_live_abc123...", ... });
|
|
248
268
|
|
|
249
269
|
// Good
|
|
250
|
-
|
|
270
|
+
createPincerPayMiddleware({ apiKey: process.env.PINCERPAY_API_KEY!, ... });
|
|
251
271
|
```
|
|
252
272
|
|
|
253
273
|
### Don't use the merchant SDK on the agent side
|
|
@@ -257,3 +277,7 @@ The merchant SDK is for servers accepting payments. Agents should use `@pincerpa
|
|
|
257
277
|
### Don't set price to "0"
|
|
258
278
|
|
|
259
279
|
A price of "0" will still trigger the 402 flow. If a route should be free, omit it from the `routes` config.
|
|
280
|
+
|
|
281
|
+
### Don't re-decode `X-PAYMENT` to find the payer
|
|
282
|
+
|
|
283
|
+
The verified payer is on `c.get("pincerpay").payer` after the middleware settles. Reading it from the request header bypasses verification and forces scheme-specific shape probing — see "Reading the Verified Payer" above.
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import type { PincerPayConfig } from "@pincerpay/core";
|
|
1
|
+
import type { PincerPayConfig, PincerPayPaymentInfo, PincerPayContextVariables } from "@pincerpay/core";
|
|
2
|
+
export type { PincerPayPaymentInfo, PincerPayContextVariables };
|
|
2
3
|
/**
|
|
3
4
|
* Lightweight Next.js / Hono middleware for PincerPay x402 paywalls.
|
|
4
5
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nextjs.d.ts","sourceRoot":"","sources":["../../src/middleware/nextjs.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"nextjs.d.ts","sourceRoot":"","sources":["../../src/middleware/nextjs.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,eAAe,EACf,oBAAoB,EACpB,yBAAyB,EAC1B,MAAM,iBAAiB,CAAC;AASzB,YAAY,EAAE,oBAAoB,EAAE,yBAAyB,EAAE,CAAC;AAahE;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,wBAAgB,yBAAyB,CAAC,MAAM,EAAE,eAAe,GA+MzD,GAAG,CACV"}
|
|
@@ -162,12 +162,22 @@ export function createPincerPayMiddleware(config) {
|
|
|
162
162
|
message: settle.errorMessage,
|
|
163
163
|
}, 402);
|
|
164
164
|
}
|
|
165
|
-
// Payment succeeded —
|
|
165
|
+
// Payment succeeded — surface verified payer on the request context
|
|
166
|
+
// so route handlers can attribute the action without re-decoding X-PAYMENT.
|
|
167
|
+
const paymentInfo = {
|
|
168
|
+
payer: settle.payer ?? "",
|
|
169
|
+
transaction: settle.transaction ?? "",
|
|
170
|
+
network: settle.network ?? "",
|
|
171
|
+
};
|
|
172
|
+
c.set("pincerpay", paymentInfo);
|
|
173
|
+
// Attach settlement response header (clients that bypass middleware
|
|
174
|
+
// can read the canonical verified payer here too).
|
|
166
175
|
const settleResponse = {
|
|
167
176
|
x402Version: 2,
|
|
168
177
|
success: true,
|
|
169
|
-
transaction:
|
|
170
|
-
network:
|
|
178
|
+
transaction: paymentInfo.transaction,
|
|
179
|
+
network: paymentInfo.network,
|
|
180
|
+
payer: paymentInfo.payer,
|
|
171
181
|
};
|
|
172
182
|
c.header("payment-response", Buffer.from(JSON.stringify(settleResponse)).toString("base64"));
|
|
173
183
|
return next();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nextjs.js","sourceRoot":"","sources":["../../src/middleware/nextjs.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"nextjs.js","sourceRoot":"","sources":["../../src/middleware/nextjs.ts"],"names":[],"mappings":"AAKA,OAAO,EACL,YAAY,EACZ,uBAAuB,EACvB,cAAc,EACd,kBAAkB,GACnB,MAAM,iBAAiB,CAAC;AAKzB;;GAEG;AACH,SAAS,WAAW,CAAC,MAAc;IACjC,MAAM,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IAChC,MAAM,KAAK,GAAG,KAAK,CAAC,CAAC,CAAC,IAAI,GAAG,CAAC;IAC9B,MAAM,IAAI,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;IACzD,MAAM,MAAM,GAAG,MAAM,CAAC,KAAK,CAAC,GAAG,MAAM,CAAC,SAAS,CAAC,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC;IAChE,OAAO,MAAM,CAAC,QAAQ,EAAE,CAAC;AAC3B,CAAC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,MAAM,UAAU,yBAAyB,CAAC,MAAuB;IAC/D,mGAAmG;IACnG,MAAM,MAAM,GAAG,MA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M,WAAW,GAAyB;gBACxC,KAAK,EAAE,MAAM,CAAC,KAAK,IAAI,EAAE;gBACzB,WAAW,EAAE,MAAM,CAAC,WAAW,IAAI,EAAE;gBACrC,OAAO,EAAE,MAAM,CAAC,OAAO,IAAI,EAAE;aAC9B,CAAC;YACF,CAAC,CAAC,GAAG,CAAC,WAAW,EAAE,WAAW,CAAC,CAAC;YAEhC,oEAAoE;YACpE,mDAAmD;YACnD,MAAM,cAAc,GAAG;gBACrB,WAAW,EAAE,CAAC;gBACd,OAAO,EAAE,IAAI;gBACb,WAAW,EAAE,WAAW,CAAC,WAAW;gBACpC,OAAO,EAAE,WAAW,CAAC,OAAO;gBAC5B,KAAK,EAAE,WAAW,CAAC,KAAK;aACzB,CAAC;YACF,CAAC,CAAC,MAAM,CAAC,kBAAkB,EAAE,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,cAAc,CAAC,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC,CAAC;YAE7F,OAAO,IAAI,EAAE,CAAC;QAChB,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACb,OAAO,CAAC,KAAK,CAAC,+BAA+B,EAAE,GAAG,CAAC,CAAC;YACpD,OAAO,CAAC,CAAC,IAAI,CACX,EAAE,KAAK,EAAE,2BAA2B,EAAE,MAAM,EAAE,MAAM,CAAC,GAAG,CAAC,EAAE,EAC3D,GAAG,CACJ,CAAC;QACJ,CAAC;QACD,8DAA8D;IAChE,CAAC,CAAQ,CAAC;AACZ,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pincerpay/merchant",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Merchant SDK for PincerPay. Lightweight Next.js middleware for accepting USDC payments from AI agents via x402.",
|
|
6
6
|
"license": "MIT",
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
},
|
|
56
56
|
"dependencies": {
|
|
57
57
|
"zod": "^3.24",
|
|
58
|
-
"@pincerpay/core": "0.5.
|
|
58
|
+
"@pincerpay/core": "0.5.1"
|
|
59
59
|
},
|
|
60
60
|
"peerDependencies": {
|
|
61
61
|
"hono": "^4"
|