Loading...
Loading...
Compare original and translation side by side
link-cli balances listlink-clilink-cli balances listlink-clilink-cli user-info retrieve --format jsoneligible_for_balanceeligible_for_balancetruefalseeligible_for_balancelink-cli user-info retrieve --format jsonapproval-policy retrieve--use-approval-policylink-cli user-info retrieve --format jsoneligible_for_balanceeligible_for_balancetruefalselink-cli user-info retrieve --format jsoneligible_for_balanceapproval-policy retrieve--use-approval-policy--recurring-intervalcreate-payment-credentialcreate-payment-credential--recurring-intervalcreate-payment-credentialcreate-payment-credential"Link balance is money you can hold in your Link account. I can use it to make purchases for you. When you use Link balance, you can also set an approval threshold, which gives me permission to make purchases below a set amount without your approval. I'll still ask for approval on purchases that cost more than your set threshold."
“Link 余额是您可以存放在 Link 账户中的资金。我可以用它为您购买商品。当您使用 Link 余额时,还可以设置审批阈值,这会允许我在单笔金额低于设定阈值时无需征得您的批准进行购买。对于费用高于您所设阈值的购买,我仍会请求批准。”
create-payment-credentiallink-cli payment-methods list --format jsonBALANCE{
"id": "csmrpd_<ID>",
"type": "BALANCE",
"is_default": false,
"name": "Balance",
"balance_details": {
"available_balance": { "amount": 300, "currency": "usd" }
}
}balance_details.available_balanceamountapproval-policy retrieveBALANCEeligible_for_balanceuser-info retrievelink-cli approval-policy retrieve --format json{
"rules": [
{
"action": "spend_request_create",
"limits": {
"per_purchase": { "amount": 1000, "currency": "usd" }
},
"allowed_payment_methods": ["csmrpd_<ID>"]
}
]
}allowed_payment_methodsper_purchaselink-cli user-info retrieve --format jsonagent_wallet_verification_requirement.action_urlcreate-payment-credentiallink-cli payment-methods list --format jsonBALANCE{
"id": "csmrpd_<ID>",
"type": "BALANCE",
"is_default": false,
"name": "Balance",
"balance_details": {
"available_balance": { "amount": 300, "currency": "usd" }
}
}balance_details.available_balanceamountapproval-policy retrieveBALANCEuser-info retrieveeligible_for_balancelink-cli approval-policy retrieve --format json{
"rules": [
{
"action": "spend_request_create",
"limits": {
"per_purchase": { "amount": 1000, "currency": "usd" }
},
"allowed_payment_methods": ["csmrpd_<ID>"]
}
]
}allowed_payment_methodsper_purchaselink-cli user-info retrieve --format jsonagent_wallet_verification_requirement.action_urllink-cli user-info retrieve --format jsoneligible_for_balancetruefalsekeyclient_idlwlpk_...pk_...client_idsk_...lwlsk_...https://app.link.com/balance/setup?key=<publishable_key>&client_id=<client_id>&desired_balance_amount=1000¤cy=usd&desired_transaction_limit=500| Parameter | Value | Notes |
|---|---|---|
| Your OAuth public key | |
| Your client ID | |
| The total amount (in cents) that you'd like the user to have in their balance | In the "add money" step, if the user's balance is below your desired amount, the Link UI will prefill the number required to reach the desired amount. The user can still change the amount they choose to add. Must be a whole number of dollars |
| | If your URL includes the |
| The approval threshold (in cents) you'd like: purchases below it don't need human approval | In the approval policy setup, the UI will be prefilled with this value. The user can change the amount to be any value during this step. Must be a whole number of dollars |
| Your callback URL | Used to direct the user back to your application once the flow is complete. Must be registered with your agent's account. Balance setup doesn't need its own callback URL; use the one already registered for your client ID |
| Your nonce | Optional. If provided along with |
desired_balance_amountdesired_transaction_limitdesired_*desired_balance_amountcurrencydesired_transaction_limitdesired_balance_amountdesired_transaction_limit50000desired_balance_amount=5000desired_transaction_limit=2500fromEmailapproval-policy retrievepayment-methods listlink-cli user-info retrieve --format jsoneligible_for_balancetruefalsekeyclient_idlwlpk_...pk_...client_idsk_...lwlsk_...https://app.link.com/balance/setup?key=<publishable_key>&client_id=<client_id>&desired_balance_amount=1000¤cy=usd&desired_transaction_limit=500| 参数 | 值 | 说明 |
|---|---|---|
| 你的 OAuth public key | |
| 你的 client ID | |
| 希望用户余额中拥有的总金额(以美分计) | 在“充值”步骤中,如果用户余额低于期望金额,Link UI 会预填需要增加的金额,以达到期望余额。用户仍可修改自己选择充值的金额。必须是整数美元 |
| | 如果 URL 包含 |
| 期望的审批阈值(以美分计):低于该金额的购买无需人工审批 | 在 approval policy 设置中,UI 会使用此值进行预填。用户可以在此步骤中将其改为任意值。必须是整数美元 |
| 你的 callback URL | 用于在流程完成后将用户引导回你的应用。必须已注册到你的 Agent 账户。余额设置不需要单独的 callback URL;请使用已经为你的 client ID 注册的 URL |
| 你的 nonce | 可选。如果与 |
desired_balance_amountdesired_transaction_limitdesired_*desired_balance_amountcurrencydesired_transaction_limitdesired_balance_amountdesired_transaction_limit50000desired_balance_amount=5000desired_transaction_limit=2500fromEmailapproval-policy retrievepayment-methods listcreate-payment-credentialdesired_balance_amount=4000create-payment-credentialdesired_balance_amount=4000create-payment-credential--payment-method-id--use-approval-policy--approve--approval-detail--use-approval-policylink-cli spend-request create \
--use-approval-policy \
--payment-method-id csmrpd_<ID> \
--amount 4500 \
--currency usd \
--merchant-name "Example Shoes" \
--merchant-url "https://shoes.example" \
--context "Buying Trail Runner size 10 from Example Shoes, which the user asked the agent to purchase as soon as it came back in stock." \
--line-item "name:Trail Runner size 10,unit_amount:4500,quantity:1" \
--total "type:total,display_text:Total,amount:4500" \
--idempotency-key "<new key for this purchase>" \
--format jsonlink-cli spend-request retrieve <id> --format jsonapproved--include cardcreate-payment-credentialcreatedpending_approvalrequires_actioncreate-payment-credentiallink-cliauth statusupdateupdate_command--use-approval-policycreate-payment-credential--payment-method-id--use-approval-policy--approve--approval-detail--use-approval-policylink-cli spend-request create \\
--use-approval-policy \\
--payment-method-id csmrpd_<ID> \\
--amount 4500 \\
--currency usd \\
--merchant-name "Example Shoes" \\
--merchant-url "https://shoes.example" \\
--context "Buying Trail Runner size 10 from Example Shoes, which the user asked the agent to purchase as soon as it came back in stock." \\
--line-item "name:Trail Runner size 10,unit_amount:4500,quantity:1" \\
--total "type:total,display_text:Total,amount:4500" \\
--idempotency-key "<new key for this purchase>" \\
--format jsonlink-cli spend-request retrieve <id> --format jsonapproved--include cardcreate-payment-credentialcreatedpending_approvalrequires_actioncreate-payment-credentiallink-cliauth statusupdateupdate_command--use-approval-policypayment-methods listapproval-policy retrievepayment-methods listapproval-policy retrievecreate-payment-credentialcreate-payment-credential