> ## Documentation Index
> Fetch the complete documentation index at: https://docs.y.uno/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Test in the sandbox first: base URL https://api-sandbox.y.uno (Test Mode in the Dashboard). Production is https://api.y.uno (Live Mode).
> Every API request needs the public-api-key and private-secret-key headers. Get them in the Dashboard at https://dashboard.y.uno/developers (Developers > Credentials); sandbox and production keys are different.
> Send an X-Idempotency-Key (a UUID) when creating payments, refunds and cancels, so retries do not create duplicates.
> Start with the Quickstart (https://docs.y.uno/docs/quickstart.md) and the agent guide (https://docs.y.uno/agents.md). To search these docs from a coding agent, connect the docs MCP server at https://docs.y.uno/mcp.

# Automation

> 将 Yuno 为您运行的运营规则（从基于批准率的故障转移和重试，到暂扣、延迟捕获和争议事件）对应到配置每项规则的功能

Yuno 会运行大多数支付团队原本需要手动编写脚本的运营规则。本页将您需要完成的工作对应到完成该工作的功能，让您无需阅读每个页面即可找到正确的开关。其中一些在 Dashboard 中配置，另一些在 API 请求本身中配置；最后一列会告诉您是哪一种。

## 自动运行的内容

| 当您需要 | Yuno 通过以下方式完成 | 配置位置 |
| :- | :- | :- |
| 在服务提供商的批准率下降时进行故障转移 | [Monitors](https://docs.y.uno/zh-hans/docs/using-yuno/dashboard-overview/monitors.md)：通过 email 或 Opsgenie 发出警报，将流量重定向到您的备用服务提供商，在原服务提供商上保留一小部分流量以检测恢复情况，并在批准率恢复时恢复流量 | Routing，在每个路由的条件集中 |
| 在合适的时机重试已拒绝的订阅续订 | [Smart Retries](https://docs.y.uno/zh-hans/docs/payment-features/subscriptions/retries.md)：最多 6 次尝试，可使用默认、智能或自定义计划，遇到硬拒绝时停止，并可选择在重试次数用尽时取消 | 订阅上的 `retries` 对象 |
| 按需重试续订 | [重试订阅](https://docs.y.uno/reference/subscriptions/retry-subscription.md) endpoint | API |
| 重试服务提供商处理失败的捕获或退款 | [交易重试](https://docs.y.uno/zh-hans/docs/payment-features/transaction-retries.md)：按固定计划最多尝试 7 次，并提供可供您跟踪的子状态 | 捕获或退款请求中的 `simplified_mode: true` |
| 在设定时间后捕获或释放授权 | [延迟捕获和延迟取消](https://docs.y.uno/zh-hans/docs/payment-features/Cancel-and-capture-flow.md)：Yuno 在 `delayed_capture_settings.delay` 之后捕获，或在 `delayed_cancel_settings.delay` 之后取消 | 支付请求 |
| 根据付款人拒绝、允许或暂扣支付 | [Risk Conditions](https://docs.y.uno/zh-hans/docs/using-yuno/dashboard-overview/risk-conditions.md)：结果为允许、阻止、审核或测试的规则，以及阻止列表、允许列表和审核列表 | Risk Conditions，关联到您的路由 |
| 为受信任的客户跳过欺诈筛查或 3DS | 使用您选择的结果的[允许列表](https://docs.y.uno/zh-hans/docs/using-yuno/dashboard-overview/risk-conditions.md#allowlists) | Risk Conditions |
| 根据金额、BIN、品牌、国家/地区、币种、分期付款、交易类型或元数据将支付发送到不同的服务提供商 | [Routing](https://docs.y.uno/zh-hans/docs/using-yuno/dashboard-overview/routing.md) 和[路由条件](https://docs.y.uno/reference/organizations/routing/routing-conditions.md)，其余情况由 Smart Routing 处理 | Routing |
| 在您自己的系统中处理拒付或问询 | `payment.chargeback` [webhook](https://docs.y.uno/zh-hans/docs/webhooks/index.md)（包含争议的 `status` 和 `sub_status`），以及[拒付管理](https://docs.y.uno/zh-hans/docs/payouts-and-disputes/chargeback-management.md)视图 | Developers，Webhooks |
| 响应任何支付、退款、捕获、取消、注册或订阅变更 | 适用于每个对象的 [Webhooks](https://docs.y.uno/zh-hans/docs/webhooks/configure-webhooks.md)，使用 HMAC 签名 | Developers，Webhooks |

## 组合使用

这些功能可以组合使用。订阅业务的典型设置如下：

1. 一个包含主服务提供商和备用服务提供商的路由，并在其上设置一个 Monitor，这样批准率下降时会自动转移流量，无需任何人盯着图表。
2. 在每个订阅上启用 Smart Retries，这样已拒绝的续订会在最佳时机，通过路由选择的任一服务提供商进行重试。
3. 在同一路由上设置 Risk Conditions，这样您不再信任的卡或客户会在调用服务提供商之前被阻止或暂扣。
4. 一个使用 `payment.purchase`、`payment.refund`、`payment.chargeback` 和 `subscription.*` 的 webhook endpoint，这样您的计费系统无需轮询即可保持同步。

## Yuno 不做的事情

Yuno 不提供自由形式的触发器和操作构建器。无法在 Dashboard 中定义“当此事件发生时，调用此 URL 或发送此 email”。如果您需要上表未涵盖的规则，做法是使用该事件的 webhook，并从您自己的系统调用[捕获](https://docs.y.uno/reference/payments/capture-authorization.md)、[取消](https://docs.y.uno/reference/payments/cancel-payment.md)或[退款](https://docs.y.uno/reference/payments/refund-payment.md) endpoint。同时也请将该规则告知您的客户团队；此类请求大多对应路线图上的某项功能。


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.