@clawcard/cli 0.1.3 → 0.2.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.
Files changed (2) hide show
  1. package/bin/setup.mjs +16 -5
  2. package/package.json +1 -1
package/bin/setup.mjs CHANGED
@@ -63,24 +63,35 @@ curl -H "Authorization: Bearer $CLAWCARD_API_KEY" "$CLAWCARD_BASE_URL/api/agents
63
63
 
64
64
  ### Virtual Cards
65
65
 
66
- **List cards:**
66
+ **IMPORTANT: Before creating a card, always ask the user which card type they want.** Explain the two options:
67
+
68
+ 1. **single_use** — Closes automatically after one successful transaction. Use for one-time purchases (buying a domain, paying an invoice, a single checkout).
69
+ 2. **merchant_locked** — Locks to the first merchant that charges it and allows multiple charges from that merchant. Use for subscriptions or recurring payments (hosting, SaaS tools, any service paid monthly).
70
+
71
+ **Tip:** Merchant-locked cards are more efficient for recurring services since they only use one card from the monthly limit. Single-use cards are safer for one-off purchases since they can't be charged again.
72
+
73
+ **List cards (check for existing open cards before creating new ones):**
67
74
 
68
75
  curl -H "Authorization: Bearer $CLAWCARD_API_KEY" $CLAWCARD_BASE_URL/api/agents/KEY_ID/cards
69
76
 
77
+ Response includes all cards with their type, status, and spend limit. Look for cards with status "open" — especially merchant_locked cards which can be reused for the same merchant.
78
+
79
+ **IMPORTANT:** Before creating a new card, always check if there's an existing open merchant_locked card for the same merchant. Reusing a merchant-locked card doesn't count against the monthly card limit.
80
+
70
81
  **Create a card (returns PAN, CVV, expiry):**
71
82
 
72
83
  curl -X POST -H "Authorization: Bearer $CLAWCARD_API_KEY" -H "Content-Type: application/json" \\
73
84
  -d '{"amountCents":1000,"memo":"Hosting payment","type":"single_use"}' \\
74
85
  $CLAWCARD_BASE_URL/api/agents/KEY_ID/cards
75
86
 
76
- Card types:
77
- - single_use — card closes automatically after one successful transaction. Best for one-time purchases.
78
- - merchant_locked — card locks to the first merchant that charges it. Best for subscriptions or repeated payments to the same service (e.g. hosting, SaaS).
87
+ The "type" field is required. Must be "single_use" or "merchant_locked".
79
88
 
80
- **Get card details (PAN, CVV):**
89
+ **Get card details (PAN, CVV, expiry — use this for existing open cards too):**
81
90
 
82
91
  curl -H "Authorization: Bearer $CLAWCARD_API_KEY" $CLAWCARD_BASE_URL/api/agents/KEY_ID/cards/CARD_ID
83
92
 
93
+ Use this to retrieve the full card number, CVV, and expiry of any open card. This is how you reuse a merchant_locked card for repeat purchases at the same merchant.
94
+
84
95
  **Close a card:**
85
96
 
86
97
  curl -X PATCH -H "Authorization: Bearer $CLAWCARD_API_KEY" -H "Content-Type: application/json" \\
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@clawcard/cli",
3
- "version": "0.1.3",
3
+ "version": "0.2.0",
4
4
  "description": "Set up ClawCard for your OpenClaw agent in one command",
5
5
  "bin": {
6
6
  "clawcard": "./bin/setup.mjs"