@clawcard/cli 0.1.2 → 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 +19 -10
  2. package/package.json +1 -1
package/bin/setup.mjs CHANGED
@@ -53,36 +53,45 @@ curl -X POST -H "Authorization: Bearer $CLAWCARD_API_KEY" -H "Content-Type: appl
53
53
  -d '{"to":"recipient@example.com","subject":"Hello","body":"Message text"}' \\
54
54
  $CLAWCARD_BASE_URL/api/agents/KEY_ID/emails/send
55
55
 
56
- ### SMS
56
+ ### SMS (inbound only)
57
57
 
58
- **Read messages:**
58
+ Each key gets a dedicated phone number for receiving SMS (e.g. verification codes). Outbound SMS is not currently supported.
59
+
60
+ **Read received messages:**
59
61
 
60
62
  curl -H "Authorization: Bearer $CLAWCARD_API_KEY" "$CLAWCARD_BASE_URL/api/agents/KEY_ID/sms?limit=20"
61
63
 
62
- **Send SMS:**
64
+ ### Virtual Cards
63
65
 
64
- curl -X POST -H "Authorization: Bearer $CLAWCARD_API_KEY" -H "Content-Type: application/json" \\
65
- -d '{"to":"+15551234567","body":"Message text"}' \\
66
- $CLAWCARD_BASE_URL/api/agents/KEY_ID/sms/send
66
+ **IMPORTANT: Before creating a card, always ask the user which card type they want.** Explain the two options:
67
67
 
68
- ### Virtual Cards
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).
69
70
 
70
- **List cards:**
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):**
71
74
 
72
75
  curl -H "Authorization: Bearer $CLAWCARD_API_KEY" $CLAWCARD_BASE_URL/api/agents/KEY_ID/cards
73
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
+
74
81
  **Create a card (returns PAN, CVV, expiry):**
75
82
 
76
83
  curl -X POST -H "Authorization: Bearer $CLAWCARD_API_KEY" -H "Content-Type: application/json" \\
77
84
  -d '{"amountCents":1000,"memo":"Hosting payment","type":"single_use"}' \\
78
85
  $CLAWCARD_BASE_URL/api/agents/KEY_ID/cards
79
86
 
80
- Card types: single_use (closes after one txn), merchant_locked (locks to first merchant).
87
+ The "type" field is required. Must be "single_use" or "merchant_locked".
81
88
 
82
- **Get card details (PAN, CVV):**
89
+ **Get card details (PAN, CVV, expiry — use this for existing open cards too):**
83
90
 
84
91
  curl -H "Authorization: Bearer $CLAWCARD_API_KEY" $CLAWCARD_BASE_URL/api/agents/KEY_ID/cards/CARD_ID
85
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
+
86
95
  **Close a card:**
87
96
 
88
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.2",
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"