@lynq/stripe 0.1.0 → 0.1.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.
Files changed (2) hide show
  1. package/README.md +66 -0
  2. package/package.json +2 -2
package/README.md ADDED
@@ -0,0 +1,66 @@
1
+ # @lynq/stripe
2
+
3
+ Stripe Checkout payment provider for [lynq](https://www.npmjs.com/package/@lynq/lynq) MCP framework.
4
+
5
+ ## Install
6
+
7
+ ```sh
8
+ npm install @lynq/stripe @lynq/lynq stripe
9
+ ```
10
+
11
+ ## Usage
12
+
13
+ ```ts
14
+ import { createMCPServer } from "@lynq/lynq";
15
+ import { stripe } from "@lynq/stripe";
16
+
17
+ const server = createMCPServer({ name: "my-server", version: "1.0.0" });
18
+
19
+ server.tool("premium-feature", stripe({
20
+ secretKey: process.env.STRIPE_SECRET_KEY!,
21
+ baseUrl: "http://localhost:3000",
22
+ amount: 500, // $5.00
23
+ description: "Premium feature access",
24
+ }), {
25
+ description: "A paid feature",
26
+ }, async (args, c) => {
27
+ return c.text("Premium content here");
28
+ });
29
+ ```
30
+
31
+ ### With Hono adapter
32
+
33
+ ```ts
34
+ import { mountLynq } from "@lynq/hono";
35
+
36
+ mountLynq(app, server, {
37
+ pages: {
38
+ stripe: { secretKey: process.env.STRIPE_SECRET_KEY! },
39
+ },
40
+ });
41
+ ```
42
+
43
+ ## Options
44
+
45
+ | Option | Type | Default | Description |
46
+ |---|---|---|---|
47
+ | `secretKey` | `string` | required | Stripe secret key |
48
+ | `baseUrl` | `string` | required | Base URL for callback |
49
+ | `amount` | `number` | required | Amount in cents (e.g. 500 = $5.00) |
50
+ | `currency` | `string` | `"usd"` | Currency code |
51
+ | `description` | `string` | — | Product description |
52
+ | `callbackPath` | `string` | `"/payment/stripe/callback"` | Callback route path |
53
+ | `sessionKey` | `string` | `"payment"` | Session key for payment state |
54
+ | `once` | `boolean` | `false` | Only charge once per session |
55
+ | `message` | `string` | — | Elicitation message |
56
+ | `timeout` | `number` | `300000` | Elicitation timeout (ms) |
57
+ | `skipIf` | `(c) => boolean` | — | Skip middleware conditionally |
58
+ | `onComplete` | `(c) => void` | — | Run after successful payment |
59
+
60
+ ## Documentation
61
+
62
+ [https://hogekai.github.io/lynq/](https://hogekai.github.io/lynq/)
63
+
64
+ ## License
65
+
66
+ MIT
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lynq/stripe",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "Stripe Checkout payment provider for lynq MCP framework.",
5
5
  "type": "module",
6
6
  "sideEffects": false,
@@ -14,7 +14,7 @@
14
14
  "dist"
15
15
  ],
16
16
  "dependencies": {
17
- "@lynq/lynq": "^0.8.0"
17
+ "@lynq/lynq": "^0.8.4"
18
18
  },
19
19
  "peerDependencies": {
20
20
  "stripe": "^17.0.0 || ^18.0.0 || ^19.0.0 || ^20.0.0"