@xodn348/clawpay 0.2.1 → 0.3.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 +98 -12
- package/dist/installer.d.ts +6 -0
- package/dist/installer.d.ts.map +1 -1
- package/dist/installer.js +144 -0
- package/dist/installer.js.map +1 -1
- package/dist/setup.d.ts.map +1 -1
- package/dist/setup.js +0 -1
- package/dist/setup.js.map +1 -1
- package/package.json +2 -2
- package/skill/SKILL.md +64 -0
- package/Formula/clawpay.rb +0 -17
package/README.md
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
|
|
8
8
|
# ClawPay
|
|
9
9
|
|
|
10
|
-
Open-source
|
|
10
|
+
Open-source payment MCP server for AI agents. Works with Claude Code, OpenClaw, OpenCode, Claude Desktop, Cursor, and any MCP client.
|
|
11
11
|
|
|
12
12
|
> [!WARNING]
|
|
13
13
|
> ClawPay enables AI agents to make real financial transactions. Real money is involved.
|
|
@@ -29,9 +29,8 @@ clawpay install
|
|
|
29
29
|
`clawpay install` handles the full setup automatically:
|
|
30
30
|
|
|
31
31
|
1. Prompts for your Stripe secret key
|
|
32
|
-
2. Detects OpenCode, Claude Desktop, and Cursor on your machine
|
|
33
|
-
3.
|
|
34
|
-
4. Confirms the connection
|
|
32
|
+
2. Detects **Claude Code, OpenClaw**, OpenCode, Claude Desktop, and Cursor on your machine
|
|
33
|
+
3. Configures them automatically
|
|
35
34
|
|
|
36
35
|
Once installed, open your AI assistant and say: **"set up payment method"** to register a card through Stripe Checkout. Then (optional) say **"set up PayPal"** to link your PayPal account for P2P sending.
|
|
37
36
|
|
|
@@ -40,15 +39,7 @@ Once installed, open your AI assistant and say: **"set up payment method"** to r
|
|
|
40
39
|
## Installation
|
|
41
40
|
|
|
42
41
|
```bash
|
|
43
|
-
# npm
|
|
44
42
|
npm install -g @xodn348/clawpay
|
|
45
|
-
|
|
46
|
-
# bun
|
|
47
|
-
bun add -g @xodn348/clawpay
|
|
48
|
-
|
|
49
|
-
# brew (coming soon)
|
|
50
|
-
brew tap xodn348/clawpay
|
|
51
|
-
brew install clawpay
|
|
52
43
|
```
|
|
53
44
|
|
|
54
45
|
Node.js 18 or higher is required.
|
|
@@ -99,12 +90,91 @@ If auto-detection doesn't find your client, add ClawPay manually.
|
|
|
99
90
|
|
|
100
91
|
Same format as Claude Desktop above.
|
|
101
92
|
|
|
93
|
+
### Claude Code
|
|
94
|
+
|
|
95
|
+
Run in your terminal:
|
|
96
|
+
|
|
97
|
+
```bash
|
|
98
|
+
claude mcp add -s user clawpay \
|
|
99
|
+
-e STRIPE_SECRET_KEY=sk_test_... \
|
|
100
|
+
-e PAYPAL_CLIENT_ID=your-paypal-client-id \
|
|
101
|
+
-e PAYPAL_CLIENT_SECRET=your-paypal-client-secret \
|
|
102
|
+
-- clawpay
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
This registers ClawPay globally across all Claude Code projects. PayPal credentials are optional.
|
|
106
|
+
|
|
107
|
+
### OpenClaw
|
|
108
|
+
|
|
109
|
+
Install ClawPay and mcporter (the MCP bridge):
|
|
110
|
+
|
|
111
|
+
```bash
|
|
112
|
+
npm install -g @xodn348/clawpay mcporter
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
Or install the skill via ClawdHub:
|
|
116
|
+
|
|
117
|
+
```bash
|
|
118
|
+
clawdhub install clawpay
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
OpenClaw uses ClawPay through the mcporter bridge. Set your credentials as environment variables:
|
|
122
|
+
|
|
123
|
+
```bash
|
|
124
|
+
export STRIPE_SECRET_KEY=sk_test_...
|
|
125
|
+
export PAYPAL_CLIENT_ID=your-paypal-client-id # optional
|
|
126
|
+
export PAYPAL_CLIENT_SECRET=your-paypal-client-secret # optional
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
Then ask OpenClaw: **"set up my payment method"** to get started.
|
|
130
|
+
|
|
102
131
|
Replace `sk_test_...` with your actual Stripe secret key. Use a test key (`sk_test_`) during development and a live key (`sk_live_`) only in production.
|
|
103
132
|
|
|
104
133
|
PayPal credentials are optional. Required only to use the `send_paypal` tool.
|
|
105
134
|
|
|
106
135
|
---
|
|
107
136
|
|
|
137
|
+
## Usage Examples
|
|
138
|
+
|
|
139
|
+
Ask your AI agent naturally — ClawPay handles the rest.
|
|
140
|
+
|
|
141
|
+
**Register a card**
|
|
142
|
+
> "Set up my payment method"
|
|
143
|
+
|
|
144
|
+
Opens Stripe Checkout in your browser. Supports card, Google Pay, Apple Pay, Alipay, and more. Credentials are stored locally in `~/.clawpay/config.json`.
|
|
145
|
+
|
|
146
|
+
**Make a payment**
|
|
147
|
+
> "Pay $25 for the monthly subscription"
|
|
148
|
+
|
|
149
|
+
Charges the registered payment method. Amount, currency, and description are passed to Stripe automatically.
|
|
150
|
+
|
|
151
|
+
**Check balance**
|
|
152
|
+
> "What's my current Stripe balance?"
|
|
153
|
+
|
|
154
|
+
Returns available and pending balance from your Stripe account.
|
|
155
|
+
|
|
156
|
+
**View transactions**
|
|
157
|
+
> "Show my last 10 transactions"
|
|
158
|
+
|
|
159
|
+
Lists recent payment intents with status, amount, and description.
|
|
160
|
+
|
|
161
|
+
**Issue a refund**
|
|
162
|
+
> "Refund the last payment"
|
|
163
|
+
|
|
164
|
+
Issues a full refund for the specified payment intent ID.
|
|
165
|
+
|
|
166
|
+
**Connect PayPal**
|
|
167
|
+
> "Set up my PayPal account"
|
|
168
|
+
|
|
169
|
+
Links your PayPal credentials for P2P sending.
|
|
170
|
+
|
|
171
|
+
**Send money via PayPal**
|
|
172
|
+
> "Send $30 to friend@email.com for dinner"
|
|
173
|
+
|
|
174
|
+
Sends money via PayPal Payouts to an email address or phone number.
|
|
175
|
+
|
|
176
|
+
---
|
|
177
|
+
|
|
108
178
|
## MCP Tools Reference
|
|
109
179
|
|
|
110
180
|
ClawPay exposes seven tools over the MCP stdio protocol.
|
|
@@ -197,6 +267,22 @@ Any `pay` call that exceeds these limits is rejected before it reaches Stripe.
|
|
|
197
267
|
|
|
198
268
|
---
|
|
199
269
|
|
|
270
|
+
## Supported Payment Methods
|
|
271
|
+
|
|
272
|
+
ClawPay uses Stripe's [Dynamic Payment Methods](https://dashboard.stripe.com/settings/payment_methods), which automatically shows the best payment options for each customer.
|
|
273
|
+
|
|
274
|
+
| Method | Status | Notes |
|
|
275
|
+
|--------|--------|-------|
|
|
276
|
+
| Credit / Debit Card | ✅ Always available | All major cards |
|
|
277
|
+
| Apple Pay | ✅ Default on | Safari on Apple devices |
|
|
278
|
+
| Google Pay | ⚙️ Enable in Dashboard | Chrome with Google Wallet |
|
|
279
|
+
| Alipay | ⚙️ Enable in Dashboard | For Alipay users |
|
|
280
|
+
| Link | ⚙️ Enable in Dashboard | Stripe's one-click checkout |
|
|
281
|
+
|
|
282
|
+
To enable Google Pay, Alipay, or other methods, go to [Stripe Dashboard → Payment Methods](https://dashboard.stripe.com/settings/payment_methods) and toggle them on. No code changes required.
|
|
283
|
+
|
|
284
|
+
---
|
|
285
|
+
|
|
200
286
|
## Audit Log
|
|
201
287
|
|
|
202
288
|
Every action ClawPay takes is recorded to `~/.clawpay/audit.log` as JSON Lines (one JSON object per line).
|
package/dist/installer.d.ts
CHANGED
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
import { spawnSync } from "node:child_process";
|
|
2
|
+
export declare const _spawnSync: {
|
|
3
|
+
fn: typeof spawnSync;
|
|
4
|
+
};
|
|
5
|
+
export declare function installClaudeCode(stripeKey: string, paypalClientId?: string, paypalClientSecret?: string): Promise<boolean>;
|
|
6
|
+
export declare function installOpenClaw(): Promise<boolean>;
|
|
1
7
|
export declare function runInstall(): Promise<void>;
|
|
2
8
|
export declare function runUninstall(): Promise<void>;
|
|
3
9
|
//# sourceMappingURL=installer.d.ts.map
|
package/dist/installer.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"installer.d.ts","sourceRoot":"","sources":["../src/installer.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"installer.d.ts","sourceRoot":"","sources":["../src/installer.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAE/C,eAAO,MAAM,UAAU,EAAE;IAAE,EAAE,EAAE,OAAO,SAAS,CAAA;CAAsB,CAAC;AA2LtE,wBAAsB,iBAAiB,CACrC,SAAS,EAAE,MAAM,EACjB,cAAc,CAAC,EAAE,MAAM,EACvB,kBAAkB,CAAC,EAAE,MAAM,GAC1B,OAAO,CAAC,OAAO,CAAC,CAgClB;AAED,wBAAsB,eAAe,IAAI,OAAO,CAAC,OAAO,CAAC,CAoBxD;AAGD,wBAAsB,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC,CAsIhD;AAID,wBAAsB,YAAY,IAAI,OAAO,CAAC,IAAI,CAAC,CAiClD"}
|
package/dist/installer.js
CHANGED
|
@@ -2,6 +2,8 @@ import { createInterface } from "node:readline";
|
|
|
2
2
|
import { promises as fs } from "node:fs";
|
|
3
3
|
import { homedir } from "node:os";
|
|
4
4
|
import { join, dirname } from "node:path";
|
|
5
|
+
import { spawnSync } from "node:child_process";
|
|
6
|
+
export const _spawnSync = { fn: spawnSync };
|
|
5
7
|
async function pathExists(filePath) {
|
|
6
8
|
try {
|
|
7
9
|
await fs.stat(filePath);
|
|
@@ -20,6 +22,7 @@ async function isDirectory(dirPath) {
|
|
|
20
22
|
return false;
|
|
21
23
|
}
|
|
22
24
|
}
|
|
25
|
+
/* c8 ignore start */
|
|
23
26
|
async function readJsonSafe(filePath) {
|
|
24
27
|
try {
|
|
25
28
|
const content = await fs.readFile(filePath, "utf-8");
|
|
@@ -29,6 +32,8 @@ async function readJsonSafe(filePath) {
|
|
|
29
32
|
return {};
|
|
30
33
|
}
|
|
31
34
|
}
|
|
35
|
+
/* c8 ignore end */
|
|
36
|
+
/* c8 ignore start */
|
|
32
37
|
function askQuestion(question) {
|
|
33
38
|
return new Promise((resolve) => {
|
|
34
39
|
const rl = createInterface({
|
|
@@ -41,6 +46,8 @@ function askQuestion(question) {
|
|
|
41
46
|
});
|
|
42
47
|
});
|
|
43
48
|
}
|
|
49
|
+
/* c8 ignore end */
|
|
50
|
+
/* c8 ignore start */
|
|
44
51
|
function getMcpClients() {
|
|
45
52
|
const home = homedir();
|
|
46
53
|
return [
|
|
@@ -66,6 +73,8 @@ function getMcpClients() {
|
|
|
66
73
|
},
|
|
67
74
|
];
|
|
68
75
|
}
|
|
76
|
+
/* c8 ignore end */
|
|
77
|
+
/* c8 ignore start */
|
|
69
78
|
function buildClawPayEntry(stripeKey, mcpKey, paypalClientId, paypalClientSecret) {
|
|
70
79
|
if (mcpKey === "mcp") {
|
|
71
80
|
const environment = {
|
|
@@ -98,6 +107,121 @@ function buildClawPayEntry(stripeKey, mcpKey, paypalClientId, paypalClientSecret
|
|
|
98
107
|
},
|
|
99
108
|
};
|
|
100
109
|
}
|
|
110
|
+
/* c8 ignore end */
|
|
111
|
+
const SKILL_MD_CONTENT = `---
|
|
112
|
+
name: clawpay
|
|
113
|
+
description: Make payments with ClawPay via Stripe and PayPal. Use when user wants to pay, send money, charge, refund, check balance, view transactions, set up payment method, or configure PayPal. Triggers: pay, send money, charge, refund, balance, transactions, set up payment, set up paypal, google pay, apple pay, alipay.
|
|
114
|
+
homepage: https://github.com/xodn348/clawpay
|
|
115
|
+
metadata: {"openclaw":{"emoji":"💳","requires":{"bins":["mcporter","clawpay"]},"install":[{"id":"node","kind":"node","package":"@xodn348/clawpay","bins":["clawpay"],"label":"Install ClawPay (npm)"}]}}
|
|
116
|
+
---
|
|
117
|
+
|
|
118
|
+
# ClawPay — Stripe + PayPal Payments
|
|
119
|
+
|
|
120
|
+
Make real payments via Stripe and PayPal using mcporter bridge.
|
|
121
|
+
|
|
122
|
+
## Safety Rules
|
|
123
|
+
|
|
124
|
+
- **Never auto-confirm payments without explicit user approval.** Always preview first; ask for confirmation.
|
|
125
|
+
- **Guardrails enforced:** $100 max per transaction, $500 max per day, USD only.
|
|
126
|
+
- **Audit trail:** Every action logged to \`~/.clawpay/audit.log\`.
|
|
127
|
+
|
|
128
|
+
## Setup (once)
|
|
129
|
+
|
|
130
|
+
\`\`\`bash
|
|
131
|
+
mcporter call --stdio "clawpay" setup_payment
|
|
132
|
+
mcporter call --stdio "clawpay" setup_paypal
|
|
133
|
+
\`\`\`
|
|
134
|
+
|
|
135
|
+
## Stripe Payments
|
|
136
|
+
|
|
137
|
+
**Create payment:**
|
|
138
|
+
\`\`\`bash
|
|
139
|
+
mcporter call --stdio "clawpay" pay amount=1000 currency=usd description="Coffee"
|
|
140
|
+
\`\`\`
|
|
141
|
+
|
|
142
|
+
**Check balance:**
|
|
143
|
+
\`\`\`bash
|
|
144
|
+
mcporter call --stdio "clawpay" get_balance
|
|
145
|
+
\`\`\`
|
|
146
|
+
|
|
147
|
+
**List transactions:**
|
|
148
|
+
\`\`\`bash
|
|
149
|
+
mcporter call --stdio "clawpay" list_transactions limit=5
|
|
150
|
+
\`\`\`
|
|
151
|
+
|
|
152
|
+
**Refund payment:**
|
|
153
|
+
\`\`\`bash
|
|
154
|
+
mcporter call --stdio "clawpay" refund payment_intent_id=pi_xxx
|
|
155
|
+
\`\`\`
|
|
156
|
+
|
|
157
|
+
## PayPal Payouts
|
|
158
|
+
|
|
159
|
+
**Send money via PayPal:**
|
|
160
|
+
\`\`\`bash
|
|
161
|
+
mcporter call --stdio "clawpay" send_paypal recipientEmail=friend@example.com amount=2000 note="Lunch"
|
|
162
|
+
\`\`\`
|
|
163
|
+
|
|
164
|
+
Or by phone:
|
|
165
|
+
\`\`\`bash
|
|
166
|
+
mcporter call --stdio "clawpay" send_paypal recipientPhone=+12025551234 amount=2000
|
|
167
|
+
\`\`\`
|
|
168
|
+
|
|
169
|
+
## Notes
|
|
170
|
+
|
|
171
|
+
- Amounts in cents: \`1000\` = $10.00
|
|
172
|
+
- Currency default: \`usd\`
|
|
173
|
+
- PayPal requires either \`recipientEmail\` or \`recipientPhone\`
|
|
174
|
+
- All transactions logged with timestamps and status`;
|
|
175
|
+
export async function installClaudeCode(stripeKey, paypalClientId, paypalClientSecret) {
|
|
176
|
+
const whichResult = _spawnSync.fn("which", ["claude"], { encoding: "utf-8" });
|
|
177
|
+
if (whichResult.status !== 0) {
|
|
178
|
+
return false;
|
|
179
|
+
}
|
|
180
|
+
const args = [
|
|
181
|
+
"mcp", "add", "-s", "user",
|
|
182
|
+
"clawpay",
|
|
183
|
+
"-e", `STRIPE_SECRET_KEY=${stripeKey}`,
|
|
184
|
+
];
|
|
185
|
+
if (paypalClientId) {
|
|
186
|
+
args.push("-e", `PAYPAL_CLIENT_ID=${paypalClientId}`);
|
|
187
|
+
}
|
|
188
|
+
if (paypalClientSecret) {
|
|
189
|
+
args.push("-e", `PAYPAL_CLIENT_SECRET=${paypalClientSecret}`);
|
|
190
|
+
}
|
|
191
|
+
args.push("--", "clawpay");
|
|
192
|
+
try {
|
|
193
|
+
const result = _spawnSync.fn("claude", args, { encoding: "utf-8" });
|
|
194
|
+
if (result.status !== 0) {
|
|
195
|
+
const errMsg = result.stderr || "Unknown error";
|
|
196
|
+
console.log(` Warning: Claude Code configuration failed: ${errMsg.trim()}`);
|
|
197
|
+
return false;
|
|
198
|
+
}
|
|
199
|
+
console.log(" ✓ Claude Code configured");
|
|
200
|
+
return true;
|
|
201
|
+
} /* c8 ignore start */
|
|
202
|
+
catch (error) {
|
|
203
|
+
console.log(` Warning: Claude Code configuration failed: ${String(error)}`);
|
|
204
|
+
return false;
|
|
205
|
+
} /* c8 ignore end */
|
|
206
|
+
}
|
|
207
|
+
export async function installOpenClaw() {
|
|
208
|
+
const home = homedir();
|
|
209
|
+
const openClawDir = join(home, ".openclaw");
|
|
210
|
+
if (!(await isDirectory(openClawDir))) {
|
|
211
|
+
return false;
|
|
212
|
+
}
|
|
213
|
+
const skillDir = join(openClawDir, "workspace", "skills", "clawpay");
|
|
214
|
+
const skillFile = join(skillDir, "SKILL.md");
|
|
215
|
+
if (await pathExists(skillFile)) {
|
|
216
|
+
console.log(" clawpay skill already installed in OpenClaw — skipping");
|
|
217
|
+
return true;
|
|
218
|
+
}
|
|
219
|
+
await fs.mkdir(skillDir, { recursive: true });
|
|
220
|
+
await fs.writeFile(skillFile, SKILL_MD_CONTENT, "utf-8");
|
|
221
|
+
console.log(" ✓ OpenClaw skill installed");
|
|
222
|
+
return true;
|
|
223
|
+
}
|
|
224
|
+
/* c8 ignore start */
|
|
101
225
|
export async function runInstall() {
|
|
102
226
|
const stripeKey = await askQuestion("Enter your Stripe Secret Key (sk_test_... or sk_live_...): ");
|
|
103
227
|
if (!stripeKey.startsWith("sk_test_") && !stripeKey.startsWith("sk_live_")) {
|
|
@@ -138,6 +262,12 @@ export async function runInstall() {
|
|
|
138
262
|
console.log(` ✓ ${client.name} configured`);
|
|
139
263
|
configuredCount++;
|
|
140
264
|
}
|
|
265
|
+
const claudeCodeInstalled = await installClaudeCode(stripeKey, paypalClientId, paypalClientSecret);
|
|
266
|
+
if (claudeCodeInstalled)
|
|
267
|
+
configuredCount++;
|
|
268
|
+
const openClawInstalled = await installOpenClaw();
|
|
269
|
+
if (openClawInstalled)
|
|
270
|
+
configuredCount++;
|
|
141
271
|
if (configuredCount === 0) {
|
|
142
272
|
console.log("\nNo MCP client config files found. Add clawpay manually:");
|
|
143
273
|
const openCodeEnv = { STRIPE_SECRET_KEY: maskedKey };
|
|
@@ -170,9 +300,22 @@ export async function runInstall() {
|
|
|
170
300
|
},
|
|
171
301
|
},
|
|
172
302
|
}, null, 2));
|
|
303
|
+
let claudeCodeCmd = `claude mcp add -s user clawpay -e STRIPE_SECRET_KEY=${maskedKey}`;
|
|
304
|
+
if (paypalClientId)
|
|
305
|
+
claudeCodeCmd += ` -e PAYPAL_CLIENT_ID=${paypalClientId}`;
|
|
306
|
+
if (paypalClientSecret)
|
|
307
|
+
claudeCodeCmd += ` -e PAYPAL_CLIENT_SECRET=${paypalClientSecret}`;
|
|
308
|
+
claudeCodeCmd += " -- clawpay";
|
|
309
|
+
console.log("\nClaude Code (run in terminal):");
|
|
310
|
+
console.log(` ${claudeCodeCmd}`);
|
|
311
|
+
console.log("\nOpenClaw:");
|
|
312
|
+
console.log(" Create ~/.openclaw/workspace/skills/clawpay/SKILL.md");
|
|
313
|
+
console.log(" (run: clawpay install after creating ~/.openclaw/ directory)");
|
|
173
314
|
}
|
|
174
315
|
console.log('\nInstallation complete! Ask your AI: "set up payment method"');
|
|
175
316
|
}
|
|
317
|
+
/* c8 ignore end */
|
|
318
|
+
/* c8 ignore start */
|
|
176
319
|
export async function runUninstall() {
|
|
177
320
|
const clients = getMcpClients();
|
|
178
321
|
for (const client of clients) {
|
|
@@ -194,4 +337,5 @@ export async function runUninstall() {
|
|
|
194
337
|
}
|
|
195
338
|
console.log("\nUninstallation complete.");
|
|
196
339
|
}
|
|
340
|
+
/* c8 ignore end */
|
|
197
341
|
//# sourceMappingURL=installer.js.map
|
package/dist/installer.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"installer.js","sourceRoot":"","sources":["../src/installer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,EAAE,QAAQ,IAAI,EAAE,EAAE,MAAM,SAAS,CAAC;AACzC,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAClC,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"installer.js","sourceRoot":"","sources":["../src/installer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,EAAE,QAAQ,IAAI,EAAE,EAAE,MAAM,SAAS,CAAC;AACzC,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAClC,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAA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C,SAAS,CAChB,MAAM,CAAC,UAAU,EACjB,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,EAC/B,OAAO,CACR,CAAC;QACF,OAAO,CAAC,GAAG,CAAC,OAAO,MAAM,CAAC,IAAI,oBAAoB,CAAC,CAAC;IACtD,CAAC;IAED,OAAO,CAAC,GAAG,CAAC,4BAA4B,CAAC,CAAC;AAC5C,CAAC;AACD,mBAAmB"}
|
package/dist/setup.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"setup.d.ts","sourceRoot":"","sources":["../src/setup.ts"],"names":[],"mappings":"AA4BA,wBAAsB,QAAQ,IAAI,OAAO,CAAC;IAAE,OAAO,EAAE,OAAO,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAAC,
|
|
1
|
+
{"version":3,"file":"setup.d.ts","sourceRoot":"","sources":["../src/setup.ts"],"names":[],"mappings":"AA4BA,wBAAsB,QAAQ,IAAI,OAAO,CAAC;IAAE,OAAO,EAAE,OAAO,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAAC,CA6J/E"}
|
package/dist/setup.js
CHANGED
|
@@ -44,7 +44,6 @@ export async function runSetup() {
|
|
|
44
44
|
const session = await stripe.checkout.sessions.create({
|
|
45
45
|
mode: "setup",
|
|
46
46
|
customer: customerId,
|
|
47
|
-
payment_method_types: ["card"],
|
|
48
47
|
success_url: `http://${SETUP_HOST}:${SETUP_PORT}/success?session_id={CHECKOUT_SESSION_ID}`,
|
|
49
48
|
cancel_url: `http://${SETUP_HOST}:${SETUP_PORT}/cancel`,
|
|
50
49
|
});
|
package/dist/setup.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"setup.js","sourceRoot":"","sources":["../src/setup.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAA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ED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xodn348/clawpay",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"description": "Open-source Stripe and PayPal MCP Server for AI agents",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"LICENSE",
|
|
13
13
|
"README.md",
|
|
14
14
|
"DISCLAIMER.md",
|
|
15
|
-
"
|
|
15
|
+
"skill"
|
|
16
16
|
],
|
|
17
17
|
"scripts": {
|
|
18
18
|
"build": "tsc",
|
package/skill/SKILL.md
ADDED
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: clawpay
|
|
3
|
+
description: Make payments with ClawPay via Stripe and PayPal. Use when user wants to pay, send money, charge, refund, check balance, view transactions, set up payment method, or configure PayPal. Triggers: pay, send money, charge, refund, balance, transactions, set up payment, set up paypal, google pay, apple pay, alipay.
|
|
4
|
+
homepage: https://github.com/xodn348/clawpay
|
|
5
|
+
metadata: {"openclaw":{"emoji":"💳","requires":{"bins":["mcporter","clawpay"]},"install":[{"id":"node","kind":"node","package":"@xodn348/clawpay","bins":["clawpay"],"label":"Install ClawPay (npm)"}]}}
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# ClawPay — Stripe + PayPal Payments
|
|
9
|
+
|
|
10
|
+
Make real payments via Stripe and PayPal using mcporter bridge.
|
|
11
|
+
|
|
12
|
+
## Safety Rules
|
|
13
|
+
|
|
14
|
+
- **Never auto-confirm payments without explicit user approval.** Always preview first; ask for confirmation.
|
|
15
|
+
- **Guardrails enforced:** $100 max per transaction, $500 max per day, USD only.
|
|
16
|
+
- **Audit trail:** Every action logged to `~/.clawpay/audit.log`.
|
|
17
|
+
|
|
18
|
+
## Setup (once)
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
mcporter call --stdio "clawpay" setup_payment
|
|
22
|
+
mcporter call --stdio "clawpay" setup_paypal
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## Stripe Payments
|
|
26
|
+
|
|
27
|
+
**Create payment:**
|
|
28
|
+
```bash
|
|
29
|
+
mcporter call --stdio "clawpay" pay amount=1000 currency=usd description="Coffee"
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
**Check balance:**
|
|
33
|
+
```bash
|
|
34
|
+
mcporter call --stdio "clawpay" get_balance
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
**List transactions:**
|
|
38
|
+
```bash
|
|
39
|
+
mcporter call --stdio "clawpay" list_transactions limit=5
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
**Refund payment:**
|
|
43
|
+
```bash
|
|
44
|
+
mcporter call --stdio "clawpay" refund payment_intent_id=pi_xxx
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
## PayPal Payouts
|
|
48
|
+
|
|
49
|
+
**Send money via PayPal:**
|
|
50
|
+
```bash
|
|
51
|
+
mcporter call --stdio "clawpay" send_paypal recipientEmail=friend@example.com amount=2000 note="Lunch"
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
Or by phone:
|
|
55
|
+
```bash
|
|
56
|
+
mcporter call --stdio "clawpay" send_paypal recipientPhone=+12025551234 amount=2000
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
## Notes
|
|
60
|
+
|
|
61
|
+
- Amounts in cents: `1000` = $10.00
|
|
62
|
+
- Currency default: `usd`
|
|
63
|
+
- PayPal requires either `recipientEmail` or `recipientPhone`
|
|
64
|
+
- All transactions logged with timestamps and status
|
package/Formula/clawpay.rb
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
class Clawpay < Formula
|
|
2
|
-
desc "Open-source Stripe MCP Server for AI Agents"
|
|
3
|
-
homepage "https://github.com/xodn348/clawpay"
|
|
4
|
-
url "https://registry.npmjs.org/clawpay/-/clawpay-0.1.0.tgz"
|
|
5
|
-
sha256 "placeholder_sha256"
|
|
6
|
-
license "Apache-2.0"
|
|
7
|
-
depends_on "node"
|
|
8
|
-
|
|
9
|
-
def install
|
|
10
|
-
system "npm", "install", *Language::Node.std_npm_install_args(libexec)
|
|
11
|
-
bin.install_symlink Dir["#{libexec}/bin/*"]
|
|
12
|
-
end
|
|
13
|
-
|
|
14
|
-
test do
|
|
15
|
-
assert_match "clawpay", shell_output("#{bin}/clawpay --help 2>&1", 1)
|
|
16
|
-
end
|
|
17
|
-
end
|