@stripe/link-cli 0.4.3 → 0.5.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 +17 -3
- package/dist/cli.js +1503 -870
- package/package.json +6 -4
package/README.md
CHANGED
|
@@ -84,6 +84,14 @@ link-cli payment-methods list
|
|
|
84
84
|
|
|
85
85
|
Returns the cards and bank accounts saved to your Link account. Use the `id` field as `payment_method_id` in the next step. If you have no payment methods, [add new ones in Link](https://app.link.com/wallet).
|
|
86
86
|
|
|
87
|
+
### List shipping addresses
|
|
88
|
+
|
|
89
|
+
```bash
|
|
90
|
+
link-cli shipping-address list
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
Returns the shipping addresses saved to your Link account. The response preserves nullable `nickname`, `address`, and address fields exactly as returned by the API.
|
|
94
|
+
|
|
87
95
|
### Create a spend request
|
|
88
96
|
|
|
89
97
|
Create a spend request with a payment method, merchant details, line items, and amounts:
|
|
@@ -114,7 +122,7 @@ Easily approve requests with the [Link app](https://link.com/download).
|
|
|
114
122
|
--line-item "name:Running Shoes,unit_amount:12000,quantity:1,description:Trail runners"
|
|
115
123
|
```
|
|
116
124
|
|
|
117
|
-
**`--total` keys:** `type` (required; one of: `subtotal`, `tax`, `total`), `display_text` (required), `amount` (required)
|
|
125
|
+
**`--total` keys:** `type` (required; one of: `subtotal`, `tax`, `total`, `items_base_amount`, `items_discount`, `discount`, `fulfillment`, `shipping`, `fee`, `gift_wrap`, `tip`, `store_credit`), `display_text` (required), `amount` (required)
|
|
118
126
|
|
|
119
127
|
```bash
|
|
120
128
|
--total "type:subtotal,display_text:Subtotal,amount:12000" \
|
|
@@ -145,10 +153,10 @@ The file is created with `0600` permissions. If the file already exists, the com
|
|
|
145
153
|
For agent polling, pass `--interval` and optionally `--max-attempts`:
|
|
146
154
|
|
|
147
155
|
```bash
|
|
148
|
-
link-cli spend-request retrieve lsrq_001 --interval 2 --max-attempts
|
|
156
|
+
link-cli spend-request retrieve lsrq_001 --interval 2 --max-attempts 300
|
|
149
157
|
```
|
|
150
158
|
|
|
151
|
-
Polling exits successfully only after the request reaches a terminal status such as `approved`, `denied`, or `
|
|
159
|
+
Polling exits successfully only after the request reaches a terminal status such as `approved`, `denied`, `expired`, or `canceled`. If polling reaches `--timeout` or exhausts `--max-attempts` while the request is still non-terminal, the command exits non-zero with `code: "POLLING_TIMEOUT"` so callers do not treat a still-pending request as complete.
|
|
152
160
|
|
|
153
161
|
If the merchant supports MPP, use `link-cli mpp pay` instead:
|
|
154
162
|
|
|
@@ -186,6 +194,8 @@ When you provide `--client-name`, the Link app displays it when you approve the
|
|
|
186
194
|
|
|
187
195
|
Set `NO_UPDATE_NOTIFIER=1` to suppress update checks (for example, in CI).
|
|
188
196
|
|
|
197
|
+
All commands accept `--auth <path>` to store auth credentials in a specific file instead of the default location. `auth login` writes to this file; all other commands read from it. Useful for running multiple sessions with separate identities.
|
|
198
|
+
|
|
189
199
|
### Spend request lifecycle
|
|
190
200
|
|
|
191
201
|
A spend request moves through: **create** → **request approval** → **approved** (with credentials).
|
|
@@ -205,6 +215,9 @@ link-cli spend-request request-approval lsrq_001
|
|
|
205
215
|
|
|
206
216
|
# Retrieve at any time (includes card credentials after approval)
|
|
207
217
|
link-cli spend-request retrieve lsrq_001
|
|
218
|
+
|
|
219
|
+
# Cancel a spend request (from created, pending_approval, or approved state)
|
|
220
|
+
link-cli spend-request cancel lsrq_001
|
|
208
221
|
```
|
|
209
222
|
|
|
210
223
|
### MPP
|
|
@@ -230,6 +243,7 @@ link-cli mpp decode \
|
|
|
230
243
|
|
|
231
244
|
| Variable | Effect |
|
|
232
245
|
|----------|--------|
|
|
246
|
+
| `LINK_AUTH_FILE` | Same as `--auth` — override the auth credential file path (flag takes precedence) |
|
|
233
247
|
| `LINK_API_BASE_URL` | Override the API base URL |
|
|
234
248
|
| `LINK_AUTH_BASE_URL` | Override the auth base URL |
|
|
235
249
|
| `LINK_HTTP_PROXY` | Route all requests through an HTTP proxy (requires `undici`) |
|