Loading...
Loading...
Compare original and translation side by side
| Channel | Command |
|---|---|
| macOS Homebrew | |
| macOS/Linux hosted installer | |
| Windows PowerShell installer | |
| Cross-platform shell compatibility | |
| 渠道 | 命令 |
|---|---|
| macOS Homebrew | |
| macOS/Linux 托管安装程序 | |
| Windows PowerShell 安装程序 | |
| 跨平台 shell 兼容性 | |
inflowinflow --mcptools/listinflowinflow --mcptools/listinflow <command> --schemainflow --llms-fullinflow --llms--llms-fullinflow <command> --schemainflow --skillinflow --skill | pbcopytoon--format <fmt>jsonjsonl_next.command--auth <path>--api-key <key>INFLOW_API_KEY=<key>inflow <command> --schemainflow --llms-fullinflow --llms--llms-fullinflow <command> --schemainflow --skillinflow --skill | pbcopytoon--format <fmt>jsonjsonl_next.command--auth <path>--api-key <key>INFLOW_API_KEY=<key>inflow vault unlockinflow auth statusauth statusauthenticated: trueauth_methoddevice_tokenapi_keyaccess_tokencredentials_pathconnectionupdateupdateinflowVERSION_UNSUPPORTEDauthenticatedfalseinflow auth login --client-name "<your-agent-name>"<your-agent-name>"Personal Assistant""Shopping Bot"verification_urlphrase_next.commandinflow auth login --client-name "<name>" --interval 5 --timeout 300INFLOW_API_KEY=<key>--api-key <key>auth loginauth statusVAULT_LOCKEDinflow vault unlockauth statusinflow vault unlockinflow auth statusauth statusauthenticated: trueauth_methoddevice_tokenapi_keyaccess_tokencredentials_pathconnectionupdateupdateinflowauthenticatedfalseinflow auth login --client-name "<your-agent-name>"<your-agent-name>"Personal Assistant""Shopping Bot"verification_urlphrase_next.commandinflow auth login --client-name "<name>" --interval 5 --timeout 300INFLOW_API_KEY=<key>--api-key <key>auth loginauth statusVAULT_LOCKEDinflow vault unlockauth statusinflow inspect <url>inflow inspectdetecteddetectedaepmpp payx402 payaep.blockedinflow aep fetch <url> | Pay with |
|---|---|
| |
| |
| |
| Not InFlow-payable on this account. Stop and tell the user; check |
inspectoutcome: "no-payment-required"inflow inspect <url>inflow inspectdetecteddetectedaepmpp payx402 payaep.blockedinflow aep fetch <url> | 使用以下命令支付 |
|---|---|
| |
| |
| |
| 此账户无法通过InFlow支付。停止操作并告知用户;查看 |
inspectoutcome: "no-payment-required"payinspectdecodepayaep grantpayinspectdecodepayaep grant| Aspect | MPP | x402 |
|---|---|---|
| Selected when the 402 carries | | |
| Command prefix | | |
| Matching model | The seller's challenge pins the rail - the buyer does not choose scheme/network/asset | Pay where the x402 |
| Filter flags | | |
| Resource completion command | | |
| Replay header used by Fetch | | |
| Diagnostic credential file flag | | |
| Idempotency | - | |
| Cancel uses | | |
| Protocol-specific error codes | | |
<mpp|x402>inflow <command> --schema| 方面 | MPP | x402 |
|---|---|---|
| 当402头包含以下内容时选择 | | |
| 命令前缀 | | |
| 匹配模型 | 卖家的质询固定支付渠道——买家无法选择方案/网络/资产 | 在x402的 |
| 过滤器标志 | | |
| 资源完成命令 | | |
| Fetch使用的重放头 | | |
| 诊断凭证文件标志 | | |
| 幂等性 | - | |
| 取消使用 | | |
| 协议特定错误代码 | | |
<mpp|x402>inflow <command> --schemaundefinedundefineddetecteddetected
`inflow inspect` returns what the seller accepts under its `mpp` and `x402` keys - the price is each challenge's `amount` field (raw atomic units for x402; the asset is the on-chain contract address, not a symbol). `decode` parses a single raw header you already hold (and also accepts a base64url credential / receipt). `supported` returns what the account can pay with; `balances list` returns `available` per currency. Run the commands to see the exact shapes.
Decide whether you can pay (apply your protocol's matching model from the delta table):
| Condition | Meaning | Action |
| --- | --- | --- |
| No payable match between the seller and the buyer's `supported` methods | No payable rail | Stop → `NO_INFLOW_MATCH`. Tell the user the seller's rails aren't supported by their account. |
| A match exists, but `balances.available < amount` for every match | Right rail, not enough funds | Stop → run `inflow deposit-addresses list`, surface the address(es) in full, ask the user to fund a matching network. |
| A match exists **and** ≥1 match has `balances.available ≥ amount` | Payable | Proceed to Step 2. |
**Optional filters** narrow *which* offer to fulfil - optional, AND-combined, applied on `pay`, and an empty result fails with `NO_FILTERED_MATCH` (it does not fall through to a default order). One non-obvious case: MPP's `--instrument-id` picks *how* to fund (an instrument-rail / fiat challenge), not which challenge. For the exact filter flags and accepted values per protocol, run `inflow <mpp|x402> pay --schema`.
**Decimal precision.** `balances.available` and the challenge/`amount` value are decimal strings preserving BigDecimal precision. **Never parse them to a JS `Number`** - that drops precision. Compare as strings, or use a `BigInt` / `decimal.js`-style library.
`inflow inspect`在其`mpp`和`x402`键下返回卖家接受的内容——价格是每个质询的`amount`字段(x402为原始原子单位;资产是链上合约地址,而非符号)。`decode`解析你已持有的单个原始头(也接受base64url凭证/收据)。`supported`返回账户可使用的支付方式;`balances list`返回每种货币的`available`余额。运行命令查看精确格式。
根据协议差异表中的匹配模型,判断是否可以支付:
| 条件 | 含义 | 操作 |
| --- | --- | --- |
| 卖家接受的方式与买家`supported`方式之间无匹配项 | 无可用支付渠道 | 停止 → `NO_INFLOW_MATCH`。告知用户卖家的支付渠道不受其账户支持。 |
| 存在匹配项,但所有匹配项的`balances.available < amount` | 渠道正确,但资金不足 | 停止 → 运行`inflow deposit-addresses list`,完整显示地址,要求用户向匹配的网络充值。 |
| 存在匹配项**且**至少一个匹配项的`balances.available ≥ amount` | 可支付 | 继续步骤2。 |
**可选过滤器**用于缩小要执行的报价范围——可选,组合使用,在`pay`命令上应用,若结果为空则失败并返回`NO_FILTERED_MATCH`(不会回退到默认顺序)。一个不明显的情况:MPP的`--instrument-id`选择**资金来源**(工具渠道/法定货币质询),而非选择哪个质询。如需每个协议的确切过滤器标志和接受的值,请运行`inflow <mpp|x402> pay --schema`。
**小数精度**。`balances.available`和质询/`amount`值是保留BigDecimal精度的十进制字符串。**永远不要将它们解析为JS `Number`**——这会丢失精度。作为字符串比较,或使用`BigInt` / `decimal.js`类库。"I'm about to pay 0.10 USDC to api.foo.dev for /dataset.csv. Requesting approval next."
--interval Ninflow <mpp|x402> pay <url> --interval 5 --max-attempts 180outcometransaction_idresponse_statussettledoutput_saved_to--output-filecredentialencoded_payloadapproval_url--format jsonljsontoonoutcomepaypaid | Meaning | What to do |
|---|---|---|
| Settled and the seller returned 2xx | Deliver the body to the user |
| The resource wasn't paywalled, or was already paid | Tell the user nothing was charged; return the body |
| Payment was approved (funds in transit) but the seller replied non-2xx on the replay | Do NOT report success. Tell the user the seller's response failed; because the payment didn't complete, the in-transit funds are reverted to their InFlow balance. Offer to retry |
--intervaltransaction_idapproval_idapproval_url_nextinflow <mpp|x402> pay <url>"我即将向api.foo.dev支付0.10 USDC以获取/dataset.csv。接下来请求批准。"
--interval Ninflow <mpp|x402> pay <url> --interval 5 --max-attempts 180outcometransaction_idresponse_statussettled--output-fileoutput_saved_tocredentialencoded_payloadapproval_url--format jsonljsontoonoutcomepaypaid | 含义 | 操作 |
|---|---|---|
| 已结算,卖家返回2xx | 将内容交付给用户 |
| 资源没有付费墙,或已支付 | 告知用户未产生费用;返回内容 |
| 支付已批准(资金在途),但卖家在重放时返回非2xx | 不要报告成功。告知用户卖家响应失败;由于支付未完成,在途资金会退回至用户的InFlow余额。提供重试选项 |
--intervaltransaction_idapproval_idapproval_url_nextinflow <mpp|x402> pay <url>
Mind the two distinct ids: poll, replay, and resume all use `transaction_id`; **cancel uses `approval_id`** (`inflow <mpp|x402> cancel <approval_id>`). Both are returned by `pay`.
For non-GET requests, pass `--method`, `--data`, `--header` (repeatable):
```bash
inflow <mpp|x402> pay https://seller.example.com/api/widgets --method POST --data '{"sku":"widget-1"}' --header "X-Custom: value" --interval 5 --max-attempts 180--payment-id <id>--payment-idinflow x402 pay --schemainflow x402 pay <url> --payment-id "<stable-opaque-id>"credentialencoded_payload--output-file <path>bodybody_base64output_saved_to: <path>--no-show-bodyinflow <mpp|x402> pay https://api.foo.dev/dataset.csv --interval 5 --max-attempts 180 --output-file /tmp/dataset.csv --no-show-bodytransaction_idpay_next.command_next.tool_next.inputinflow <mpp|x402> fetch <transaction_id> <url> --interval 5 --max-attempts 180PAYMENT_EXPIREDAPPROVAL_TIMEOUTPOLLING_TIMEOUTinflow <mpp|x402> cancel <approval_id>PAYMENT_REPLAY_OUTCOME_UNKNOWN
注意两个不同的ID:轮询、重放和恢复都使用`transaction_id`;**取消使用`approval_id`**(`inflow <mpp|x402> cancel <approval_id>`)。两者都由`pay`返回。
对于非GET请求,传递`--method`、`--data`、`--header`(可重复):
```bash
inflow <mpp|x402> pay https://seller.example.com/api/widgets --method POST --data '{"sku":"widget-1"}' --header "X-Custom: value" --interval 5 --max-attempts 180--payment-id <id>--payment-idinflow x402 pay --schemainflow x402 pay <url> --payment-id "<stable-opaque-id>"credentialencoded_payload--output-file <path>bodybody_base64output_saved_to: <path>--no-show-bodyinflow <mpp|x402> pay https://api.foo.dev/dataset.csv --interval 5 --max-attempts 180 --output-file /tmp/dataset.csv --no-show-bodypaytransaction_id_next.command_next.input_next.toolinflow <mpp|x402> fetch <transaction_id> <url> --interval 5 --max-attempts 180PAYMENT_EXPIREDAPPROVAL_TIMEOUTPOLLING_TIMEOUTinflow <mpp|x402> cancel <approval_id>PAYMENT_REPLAY_OUTCOME_UNKNOWN| Limit | Value |
|---|---|
| Approval window | 15 minutes from |
| Polling stop condition | Polling ends at whichever fires first: |
| Credential reuse | One-time. Fetch consumes the credential on the first seller replay - not reusable; a failed seller call requires a new |
| 限制 | 值 |
|---|---|
| 批准窗口 | 从 |
| 轮询停止条件 | 以下任一情况触发时轮询结束: |
| 凭证重用 | 一次性。Fetch在第一次卖家重放时消耗凭证——不可重用;卖家调用失败需要新的 |
https://api.foo.dev/dataset.csvinflow inspect <url>detected: ["mpp"]inflow mpp supportedinflow balances listinflowinflow mpp pay https://api.foo.dev/dataset.csv --interval 5 --max-attempts 180 --output-file /tmp/dataset.csv --no-show-bodyhttps://api.foo.dev/dataset.csvinflow inspect <url>detected: ["mpp"]inflow mpp supportedinflow balances listinflowinflow mpp pay https://api.foo.dev/dataset.csv --interval 5 --max-attempts 180 --output-file /tmp/dataset.csv --no-show-body
> "Approval requested - confirm in the InFlow app: https://app.inflowpay.ai/approvals/appr_xyz
> I'll keep polling. 15-min window."
Once the result arrives:
> "Paid 0.10 USDC. Transaction txn_abc. Saved the dataset to /tmp/dataset.csv."
**Two-step variant** (host can't block): follow Step 2's two-step path; `mpp fetch` polls, attaches `Authorization: Payment`, and returns the resource body without exposing the credential.
> "已请求批准——请在InFlow应用中确认:https://app.inflowpay.ai/approvals/appr_xyz
> 我会持续轮询。15分钟窗口。"
结果返回后:
> "已支付0.10 USDC。交易ID txn_abc。数据集已保存到/tmp/dataset.csv。"
**两步变体**(主机无法阻塞):遵循步骤2的两步路径;`mpp fetch`进行轮询,附加`Authorization: Payment`头,并返回资源内容,不暴露凭证。https://api.foo.dev/article-3inflow inspect <url>detected: ["x402"]exactsolana:mainnet"I'm about to pay 0.10 USDC on Solana mainnet to api.foo.dev for /article-3. Your balance is 100.5 USDC - plenty. Requesting approval next."
inflow x402 pay https://api.foo.dev/article-3 --payment-id "<stable-opaque-id>" --interval 5 --max-attempts 180https://api.foo.dev/article-3inflow inspect <url>detected: ["x402"]exactsolana:mainnet"我即将在Solana主网向api.foo.dev支付0.10 USDC以获取/article-3。 你的余额为100.5 USDC——足够支付。接下来请求批准。"
inflow x402 pay https://api.foo.dev/article-3 --payment-id "<stable-opaque-id>" --interval 5 --max-attempts 180
> "Approval requested - confirm in the InFlow app: https://app.inflowpay.ai/approvals/appr_xyz
> I'll keep polling. 15-min window."
Once the result arrives:
> "Paid 0.10 USDC. Transaction txn_abc. Server returned: 'How to brew coffee - ...'"
**Two-step variant** (host can't block): follow Step 2's two-step path; `x402 fetch` polls, attaches `PAYMENT-SIGNATURE`, and returns the resource body without exposing the encoded payload.
> "已请求批准——请在InFlow应用中确认:https://app.inflowpay.ai/approvals/appr_xyz
> 我会持续轮询。15分钟窗口。"
结果返回后:
> "已支付0.10 USDC。交易ID txn_abc。服务器返回:'How to brew coffee - ...'"
**两步变体**(主机无法阻塞):遵循步骤2的两步路径;`x402 fetch`进行轮询,附加`PAYMENT-SIGNATURE`头,并返回资源内容,不暴露编码负载。codemessage| Error code | Recovery | What to tell the user |
|---|---|---|
| | "The payment didn't go through - it was declined, underfunded, or the transaction failed. Want me to try again, switch funding, or stop?" |
| Start a new | "The payment window expired before it was ready to settle. Want me to start a new one, or stop here?" |
| | - |
| 错误代码 | 恢复方法 | 告知用户内容 |
|---|---|---|
| 运行 | "支付未成功——被拒绝、资金不足或交易失败。要我重试、切换资金来源还是停止?" |
| 启动新的 | "支付窗口在准备结算前已过期。要我启动新的支付还是在此停止?" |
| 运行 | - |
codemessage| Error code | Recovery | What to tell the user |
|---|---|---|
| | "You didn't approve within 15 minutes, so the request expired. Want me to start a new payment, or stop here?" |
| Same recovery as | "Approval didn't go through (declined or insufficient funds in the matched asset). Want me to try a different funding source, top up, or stop?" |
| Same recovery (cancelled via | "You cancelled the approval. Stopping here unless you want to start a new payment." |
| | - |
| 错误代码 | 恢复方法 | 告知用户内容 |
|---|---|---|
| 运行 | "你未在15分钟内批准,请求已过期。要我启动新的支付还是在此停止?" |
| 与 | "批准未成功(被拒绝或匹配资产资金不足)。要我尝试其他资金来源、充值还是停止?" |
| 恢复方法相同(通过 | "你已取消批准。在此停止,除非你要启动新的支付。" |
| | - |
/agents.txt/llm.txt/agents.txt/llm.txtcodemessage<mpp|x402>| Error code | Recovery | What to tell the user |
|---|---|---|
| Stored authentication status is unavailable. Ask the user to run | "Your InFlow vault is locked. Please unlock it in your terminal, then I can check authentication again." |
| No saved device token and no | - |
| Seller's rails aren't supported by the account. Fund a matching method/chain, or use a different seller. | "The seller wants |
| A | "Your filter removed every option the seller accepts. Loosen it or re-check the seller's options with |
| Seller returned 402 but the protocol's header was missing ( | x402> decode` for the detailed parse error. |
| | x402> fetch <transaction_id> <url> --interval 5 --max-attempts 180`. |
| A credential-bearing seller request had an indeterminate transport failure. Do not automatically replay. | "The seller request may have received the payment credential, but the connection failed before we got a reliable response. I won't retry automatically because the credential may be consumed." |
| Non-2xx from the InFlow API on the plain data calls ( | - |
| Installed | - |
| Network failure - check connectivity; retry. | - |
codemessage<mpp|x402>| 错误代码 | 恢复方法 | 告知用户内容 |
|---|---|---|
| 存储的身份验证状态不可用。要求用户在终端中自行运行 | "你的InFlow密钥库已锁定。请在终端中解锁,然后我可以重新检查身份验证状态。" |
| 无已保存的设备令牌,且未配置 | - |
| 卖家的支付渠道不受账户支持。向匹配的方法/链充值,或选择其他卖家。 | "卖家要求 |
| | "你的过滤器移除了卖家接受的所有选项。请放宽过滤器或使用 |
| 卖家返回402,但协议头缺失( | x402> decode`获取详细解析错误。 |
| | x402> fetch <transaction_id> <url> --interval 5 --max-attempts 180`恢复。 |
| 携带凭证的卖家请求出现不确定的传输失败。不要自动重放。 | "卖家请求可能已收到支付凭证,但在我们获得可靠响应前连接失败。我不会自动重试,因为凭证可能已被消耗。" |
| 普通数据调用( | - |
| 安装的 | - |
| 网络故障——检查连接;重试。 | - |
balances listdeposit-addresses listpaybalances listdeposit-addresses listpay