You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/pages/payment-methods/stripe/charge.mdx
+4Lines changed: 4 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -170,6 +170,10 @@ See the [payment links guide](/guides/payment-links) for a full walkthrough and
170
170
171
171
## Client
172
172
173
+
::::tip[For agents]
174
+
The [Link CLI](/tools/wallet#link-cli) handles `stripe.charge` end-to-end—`link-cli mpp pay` parses the 402 Challenge, creates an SPT from the user's Link wallet, and retries the request with the Credential. No code required.
175
+
::::
176
+
173
177
Use `stripe` with `Mppx.create` to automatically handle `402` responses. The client parses the Challenge, creates an SPT through the `createToken` callback, and retries with the Credential.
174
178
175
179
SPT creation requires a Stripe secret key, so the client accepts a `createToken` callback that proxies through a server endpoint. You can optionally pass a `client` (a Stripe.js instance from `@stripe/stripe-js`) which is forwarded to the `createToken` callback for use with Elements.
Copy file name to clipboardExpand all lines: src/pages/payment-methods/stripe/index.mdx
+4Lines changed: 4 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -20,6 +20,10 @@ Machine payments must be enabled on your Stripe account before you can accept MP
20
20
21
21
To learn more, read the [Stripe documentation](https://docs.stripe.com/payments/machine/mpp) on accepting MPP.
22
22
23
+
::::tip[For agents]
24
+
Use the [Link CLI](/tools/wallet#link-cli) to pay for `stripe.charge` services from a Link wallet without writing integration code. `link-cli mpp pay` handles the full 402 → SPT → retry flow automatically.
|[AgentCash](#agentcash)| Discover and use 300+ premium APIs via MPP |`tempo`|`npx agentcash onboard`|
17
+
|[Link CLI](#link-cli)| Stripe payments via Link wallet |`stripe`|`link-cli auth login`|
17
18
|[`mppx` CLI](#mppx)| Development and debugging | All |`mppx account create`|
18
19
19
20
## Tempo Wallet
@@ -199,6 +200,66 @@ $ claude mcp add agentcash --scope user -- npx -y agentcash@latest
199
200
-**API and tool discovery** - any service that implements MPP is automatically discoverable and usable
200
201
-**MPPScan integration** — easily discover and use services via [mppscan.com](https://www.mppscan.com/)
201
202
203
+
## Link CLI
204
+
205
+
[Link CLI](https://github.com/stripe/link-cli) lets agents pay for MPP services using a [Link](https://link.co) wallet. The agent authenticates with Link, then `link-cli mpp pay` handles the full `402` → SPT → retry flow automatically—no Stripe integration code required.
206
+
207
+
The user approves each purchase via the Link app, and credentials are one-time-use tokens scoped to a specific merchant and amount.
208
+
209
+
<Tabs>
210
+
<Tabtitle="Agent">
211
+
212
+
Paste this into your agent:
213
+
214
+
```
215
+
Read https://github.com/stripe/link-cli/blob/main/SKILL.md and set up link-cli
216
+
```
217
+
218
+
</Tab>
219
+
<Tabtitle="Human">
220
+
::::steps
221
+
222
+
### Install
223
+
224
+
```bash [terminal]
225
+
$ npm install -g @stripe/link-cli
226
+
```
227
+
228
+
### Log in
229
+
230
+
```bash [terminal]
231
+
$ link-cli auth login --client-name "My Agent"
232
+
```
233
+
234
+
This displays a verification URL and phrase. Approve in the Link app to complete authentication.
-**End-to-end 402 handling**—`link-cli mpp pay` parses the Challenge, creates an SPT, and retries with the Credential
259
+
-**User approval**—each purchase requires explicit approval in the Link app
260
+
-**One-time-use credentials**—SPTs are scoped to a specific merchant, amount, and context
261
+
-**MCP server mode**—run as `link-cli --mcp` for integration with Claude Code and other MCP-compatible agents
262
+
202
263
## `mppx`
203
264
204
265
The [`mppx`](/sdk/typescript/cli) CLI is a lightweight MPP client bundled with the `mppx` package. It handles `402` responses automatically using a local keychain account—ideal for development, testing, and debugging.
0 commit comments