> ## 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.

# 创建路由

> 为一个 (account_id, payment_method) 组合创建路由。创建成功后始终立即生效。

为一个 `(account_id, payment_method)` 组合创建路由。每个路由通过 `connection_id` 引用**连接**。请*在调用路由之前*，确保您的连接已创建，并且对所请求的 `payment_method` 处于 `ACTIVE` 状态。通过 `group_id` 引用拒绝组、Merchant Advice Code 组或成功组的输出，也要求该组存在于账户中，请参阅[结果组](https://docs.y.uno/zh-hans/reference/organizations/routing/routing-resource-shape.md#outcome-groups)。

### 请求体

**account\_id** `string (UUID)` *required*

此路由规则适用的商户账户 ID。

**payment\_method** `enum` *required*

例如 `CARD`、`PIX`、`WALLET`。每个路由创建后不可更改：要路由其他支付方式，请创建新的路由。

**name** `string` *required*

自由格式的标签。

**default\_route** `object` *required*

没有任何 `condition_sets[]` 匹配时使用的路由。

**属性**

**start\_split** `object[]`

可选。按百分比将路由入口拆分到多个步骤，格式为 `[{ "index": 1, "percentage": 45 }, { "index": 2, "percentage": 55 }]`。百分比为整数，总和必须为 `100`。省略时，每笔支付都从步骤 1 开始。请参阅[百分比拆分](https://docs.y.uno/zh-hans/reference/organizations/routing/routing-resource-shape.md#percentage-splits)。

**steps** `object[]` *required*

每个步骤要么是一次服务提供商尝试，要么是一个[操作步骤](https://docs.y.uno/zh-hans/reference/organizations/routing/routing-resource-shape.md#action-steps)。`index` 值从 1 开始连续编号。

**项**

**index** `integer` *required*

步骤序号。

**provider\_id** `string`

服务提供商步骤（支付、欺诈、3DS 或认证服务提供商）必填，Smart Routing 步骤上为 `SMART_ROUTING`；操作步骤上省略。必须与连接的服务提供商一致。

**connection\_id** `UUID`

服务提供商步骤必填；操作步骤和 Smart Routing 步骤上省略。必须处于 `ACTIVE` 状态并支持该 `payment_method`。

**fraud** `object`

欺诈服务提供商步骤的配置：`rules`、`blocklists`、`allowlists`、`reviewlists`、`preset`（从 Dashboard 复制的代码，按原样保存）和 `report_only`。仅用于 `FRAUD` 服务提供商。请参阅[服务提供商步骤类型](https://docs.y.uno/zh-hans/reference/organizations/routing/routing-resource-shape.md#provider-step-kinds)。

**network\_token\_on** `boolean`

仅用于 `CARD` 路由的支付服务提供商步骤。为 `true` 时，如果卡片有可用的网络令牌，则使用该网络令牌支付。组织必须已开通网络令牌，且服务提供商必须支持网络令牌（响应中的 `network_token_enable`），否则返回 `400 NETWORK_TOKEN_NOT_ONBOARDED` 或 `400 NETWORK_TOKEN_NOT_SUPPORTED`。请参阅[服务提供商步骤设置](https://docs.y.uno/zh-hans/reference/organizations/routing/routing-resource-shape.md#provider-step-settings)。

**three\_d\_secure\_exemptions** `string[]`

仅用于 3DS 服务提供商步骤。此步骤可以应用的 [SCA 豁免](https://docs.y.uno/zh-hans/docs/payment-features/sca-exemptions.md#allowed-values)，例如 `["LOW_VALUE", "TRANSACTION_RISK_ANALYSIS"]`。请参阅[服务提供商步骤设置](https://docs.y.uno/zh-hans/reference/organizations/routing/routing-resource-shape.md#provider-step-settings)。

**smart\_routing** `object`

使该步骤成为 Smart Routing 步骤：`type`（`COSTS` 或 `LATENCY`）、`providers`（2 到 4 个 `{ provider_id, connection_id, network_token_on }` 支付服务提供商）、`no_retry_decline_types`、`no_retry_decline_group_ids`（拒绝组 ID，包括 ISO 代码组）和 `no_retry_failure_causes`。仅适用于卡片路由，每个路由一个。请参阅 [Smart Routing 步骤](https://docs.y.uno/zh-hans/reference/organizations/routing/routing-resource-shape.md#smart-routing-steps)。

**action** `enum`

使该步骤成为操作步骤：`CANCEL` 驳回支付，`CAPTURE` 捕获授权，`HOLD_FOR_REVIEW` 使支付保持待处理状态以等待人工审核，`REVERT` 在支付之后运行的欺诈筛查结束后撤销支付。`CAPTURE` 和 `HOLD_FOR_REVIEW` 只能从支付步骤或 Smart Routing 步骤的 `APPROVED` 或 `SUCCEEDED_GROUP` 输出到达，`REVERT` 只能从在支付之后运行的欺诈步骤的输出到达，`CANCEL` 永远不能从批准结果到达。操作步骤没有 `provider_id`、`connection_id` 或 `output`。请参阅[操作步骤](https://docs.y.uno/zh-hans/reference/organizations/routing/routing-resource-shape.md#action-steps)。

**action\_delay** `string`

仅在 `action = CAPTURE` 时使用。批准与捕获之间的 ISO-8601 时长，最少 `PT1M`，最多 `P7D`（例如 `PT5M`、`PT3H`、`P2D`）。省略时，批准处理完成后立即捕获。

**output** `object[]`

定义如何处理此步骤的每种可能结果。操作步骤上不允许使用。

**项**

**status** `string` *required*

触发此规则的结果状态：`APPROVED`、`DECLINED`、`DECLINE_GROUP`、`MAC_CODE_GROUP`、`ISO_CODE_GROUP`（仅限卡片支付，请参阅 [ISO 代码组](https://docs.y.uno/zh-hans/reference/organizations/routing/routing-resource-shape.md#iso-code-groups)）、`SUCCEEDED_GROUP`、`PENDING`（仅限欺诈、3DS 和认证步骤）、`INTERNAL_ERROR`，或 `LIABILITY_SHIFTED`、`LIABILITY_NOT_SHIFTED` 和 `LIABILITY_NOT_REPORTED`（仅限 3DS 服务提供商步骤；它们按认证的责任转移结果细化 `APPROVED`，当步骤上没有对应的输出时回退到 `APPROVED`，请参阅[责任转移输出](https://docs.y.uno/zh-hans/reference/organizations/routing/routing-resource-shape.md#liability-shift-outputs)）。

**group\_id** `integer`

账户中某个组的 ID，来自[列出拒绝组](https://docs.y.uno/zh-hans/reference/organizations/routing/list-decline-groups.md)或[列出成功组](https://docs.y.uno/zh-hans/reference/organizations/routing/list-succeeded-groups.md)。当 `status` 为 `MAC_CODE_GROUP` 或 `SUCCEEDED_GROUP` 时必填；在 `DECLINE_GROUP` 和 `ISO_CODE_GROUP` 上可选；其他情况下不允许使用。`MAC_CODE_GROUP` 接受 Merchant Advice Code 组；`DECLINE_GROUP` 接受拒绝组或 Merchant Advice Code 组；`ISO_CODE_GROUP` 只接受 ISO 代码组（请参阅[结果组](https://docs.y.uno/zh-hans/reference/organizations/routing/routing-resource-shape.md#outcome-groups)）。

**decline\_types** `string[]`

拒绝子状态（例如 `INSUFFICIENT_FUNDS`、`DECLINED_BY_BANK`），或在 `ISO_CODE_GROUP` 上为 ISO 8583 响应代码（例如 `51`、`9G`），每个值去除首尾空格后为 1 到 30 个字符，比较时不区分大小写。在 `DECLINE_GROUP` 和 `ISO_CODE_GROUP` 上，除非发送了 `group_id`，否则必填；发送 `group_id` 时，必须与该组的成员完全一致。`SUCCEEDED_GROUP` 上不允许使用。

**retry** `boolean`

为 `true` 时，发生此结果后会先对同一服务提供商再尝试一次，然后再执行 `next`。仅用于 `DECLINED`、`INTERNAL_ERROR`、`DECLINE_GROUP` 和 `ISO_CODE_GROUP`；`MAC_CODE_GROUP` 仍然拒绝 `retry: true`。默认为 `false`。关于 Merchant Advice Code 组上的 `DECLINE_GROUP` 条目，请参阅[重试](https://docs.y.uno/zh-hans/reference/organizations/routing/routing-resource-shape.md#retry)。

**next** `integer`

下一个要执行的步骤的 `index`。不需要备用步骤时省略。与 `next_split` 一起使用时可选；如果两者都发送，它必须是 `next_split` 的第一个条目。

**next\_split** `object[]`

按百分比将备用路径拆分到多个步骤，格式为 `[{ "index": 2, "percentage": 70 }, { "index": 3, "percentage": 30 }]`。至少两个条目，百分比为整数，总和为 `100`。使用它时不需要 `next`。

**condition\_sets** `object[]`

可选。按 `sort_number` 排序：第一个匹配的条件集生效。

**项**

**sort\_number** `integer` *required*

条件集的优先级。

**name** `string` *required*

条件集的标签。

**conditions** `object[]` *required*

必须匹配的[条件](https://docs.y.uno/zh-hans/reference/organizations/routing/routing-conditions.md)列表。除 `condition_type`、`conditional`、`values`、`key` 和 `currency` 外，`TIME_PERIOD` 条件还包含其时间安排字段，`VOLUME_PAYMENTS_LIMIT` 条件包含其 `limit_by`、`payments_count` 和周期字段，`ORDER_ITEMS_AMOUNT` 条件包含其 `item_values`。

**route** `object` *required*

此条件集匹配时要执行的步骤。结构与 `default_route` 相同，包括 `start_split`、`output[].next_split` 和操作步骤；仅由一个 `CANCEL` 步骤组成的路由会驳回匹配的支付。

### 响应

**id** `string`

路由的唯一标识符。

**account\_id** `string`

账户的唯一标识符。

**payment\_method** `enum`

此路由适用的支付方式（例如 `CARD`）。

**name** `string`

路由的标签。

**default\_route** `object`

默认路由逻辑，结构如[检索路由](https://docs.y.uno/zh-hans/reference/organizations/routing/retrieve-routing.md)中所述。

**condition\_sets** `object[]`

可选的条件逻辑。

**created\_at** `string`

ISO 8601 时间戳。

**updated\_at** `string`

ISO 8601 时间戳。

```bash cURL theme={"theme":{"light":"github-dark","dark":"github-dark-dimmed"}}
curl -X POST 'https://api.y.uno/v1/routing' \
  -H 'public-api-key: <YOUR_PUBLIC_KEY>' \
  -H 'private-secret-key: <YOUR_SECRET_KEY>' \
  -H 'Content-Type: application/json' \
  -H 'X-Idempotency-Key: <UUID>' \
  -d '{
    "account_id": "7825fc5e-e50a-4248-9ae8-5d3786afb0be",
    "payment_method": "CARD",
    "name": "Card routing — Stripe primary, Adyen fallback",
    "default_route": {
      "steps": [
        {
          "index": 1,
          "provider_id": "STRIPE",
          "connection_id": "f1a3c4d5-7b8e-4a2c-9d1e-3f4a5b6c7d8e",
          "output": [
            { "status": "DECLINE_GROUP",  "group_id": 1044, "next": 2, "retry": true },
            { "status": "MAC_CODE_GROUP", "group_id": 4542 },
            { "status": "DECLINED",       "next": 2 },
            { "status": "INTERNAL_ERROR", "next": 2 }
          ]
        },
        {
          "index": 2,
          "provider_id": "ADYEN",
          "connection_id": "b2c4d5e6-1a2b-4c3d-8e4f-5a6b7c8d9e0f"
        }
      ]
    },
    "condition_sets": [
      {
        "sort_number": 1,
        "name": "Reject foreign-issued cards",
        "conditions": [
          { "condition_type": "CARD_ISSUER_COUNTRY", "conditional": "NOT_ONE_OF", "values": ["BR"] }
        ],
        "route": {
          "steps": [
            { "index": 1, "action": "CANCEL" }
          ]
        }
      },
      {
        "sort_number": 2,
        "name": "Brazil — BRL 300 to 600 via Adyen, capture after 5 minutes",
        "description": "BR card transactions between BRL 300 and 600 go to Adyen directly",
        "conditions": [
          { "condition_type": "COUNTRY", "conditional": "EQUAL",   "values": ["BR"] },
          { "condition_type": "AMOUNT",  "conditional": "BETWEEN", "values": ["300.00", "600.00"], "currency": "BRL" }
        ],
        "route": {
          "steps": [
            { "index": 1, "provider_id": "ADYEN", "connection_id": "b2c4d5e6-1a2b-4c3d-8e4f-5a6b7c8d9e0f",
              "output": [
                { "status": "APPROVED",        "next": 2 },
                { "status": "SUCCEEDED_GROUP", "group_id": 430 }
              ] },
            { "index": 2, "action": "CAPTURE", "action_delay": "PT5M" }
          ]
        }
      },
      {
        "sort_number": 3,
        "name": "Mexico — 45/45/10 between Adyen, Stripe and dLocal",
        "conditions": [
          { "condition_type": "COUNTRY", "conditional": "EQUAL", "values": ["MX"] }
        ],
        "route": {
          "start_split": [
            { "index": 1, "percentage": 45 },
            { "index": 2, "percentage": 45 },
            { "index": 3, "percentage": 10 }
          ],
          "steps": [
            {
              "index": 1,
              "provider_id": "ADYEN",
              "connection_id": "b2c4d5e6-1a2b-4c3d-8e4f-5a6b7c8d9e0f",
              "output": [
                { "status": "DECLINED", "next_split": [ { "index": 2, "percentage": 70 }, { "index": 3, "percentage": 30 } ] }
              ]
            },
            { "index": 2, "provider_id": "STRIPE", "connection_id": "f1a3c4d5-7b8e-4a2c-9d1e-3f4a5b6c7d8e" },
            { "index": 3, "provider_id": "DLOCAL", "connection_id": "c3d5e6f7-2b3c-4d5e-8f6a-7b8c9d0e1f2a" }
          ]
        }
      }
    ]
  }'
```

```json 201 Created theme={"theme":{"light":"github-dark","dark":"github-dark-dimmed"}}
{
  "id": "8f2c1d3e-4b5a-4c7d-8e9f-0a1b2c3d4e5f",
  "account_id": "7825fc5e-e50a-4248-9ae8-5d3786afb0be",
  "payment_method": "CARD",
  "name": "Card routing — Stripe primary, Adyen fallback",
  "default_route": {
    "steps": [
      {
        "index": 1,
        "provider_id": "STRIPE",
        "connection_id": "f1a3c4d5-7b8e-4a2c-9d1e-3f4a5b6c7d8e",
        "output": [
          { "status": "DECLINE_GROUP",  "group_id": 1044, "group_name": "Soft declines",
            "decline_types": ["DECLINED_BY_BANK", "RESTRICTED_BY_BANK"], "next": 2, "retry": true },
          { "status": "MAC_CODE_GROUP", "group_id": 4542, "group_name": "Do not retry",
            "decline_types": ["NO_RETRY_POLICY", "NO_RETRY_SECURITY"], "retry": false },
          { "status": "DECLINED",       "next": 2, "retry": false },
          { "status": "INTERNAL_ERROR", "next": 2, "retry": false }
        ]
      },
      { "index": 2, "provider_id": "ADYEN", "connection_id": "b2c4d5e6-1a2b-4c3d-8e4f-5a6b7c8d9e0f", "output": [{ "status": "APPROVED", "next": null, "decline_types": null, "retry": false }, { "status": "INTERNAL_ERROR", "next": null, "decline_types": null, "retry": false }] }
    ]
  },
  "condition_sets": [
    {
      "sort_number": 1,
      "name": "Reject foreign-issued cards",
      "conditions": [
        { "condition_type": "CARD_ISSUER_COUNTRY", "conditional": "NOT_ONE_OF", "values": ["BR"] }
      ],
      "route": { "steps": [ { "index": 1, "action": "CANCEL", "output": [] } ] }
    },
    {
      "sort_number": 2,
      "name": "Brazil — BRL 300 to 600 via Adyen, capture after 5 minutes",
      "conditions": [
        { "condition_type": "COUNTRY", "conditional": "EQUAL",   "values": ["BR"] },
        { "condition_type": "AMOUNT",  "conditional": "BETWEEN", "values": ["300.00", "600.00"], "currency": "BRL" }
      ],
      "route": {
        "steps": [
          { "index": 1, "provider_id": "ADYEN", "connection_id": "b2c4d5e6-1a2b-4c3d-8e4f-5a6b7c8d9e0f",
            "output": [
              { "status": "APPROVED",        "next": 2, "retry": false },
              { "status": "SUCCEEDED_GROUP", "group_id": 430, "group_name": "Pending review", "retry": false }
            ] },
          { "index": 2, "action": "CAPTURE", "action_delay": "PT5M", "output": [] }
        ]
      }
    },
    { "sort_number": 3, "name": "Mexico — 45/45/10 between Adyen, Stripe and dLocal", "conditions": ["..."], "route": { "steps": ["..."] } }
  ],
  "created_at": "2026-05-12T14:30:00Z",
  "updated_at": "2026-05-12T14:30:00Z"
}
```

```json 400 — Invalid Route Configuration theme={"theme":{"light":"github-dark","dark":"github-dark-dimmed"}}
{
  "code": "INVALID_ROUTE_CONFIGURATION",
  "messages": ["step index=2 with action=CAPTURE must be reached only from an APPROVED output of a provider step"]
}
```

```json 400 — Unknown group theme={"theme":{"light":"github-dark","dark":"github-dark-dimmed"}}
{
  "code": "INVALID_ROUTE_CONFIGURATION",
  "messages": ["output.group_id=99 not found for account"]
}
```

```json 400 — Group of the wrong kind theme={"theme":{"light":"github-dark","dark":"github-dark-dimmed"}}
{
  "code": "INVALID_ROUTE_CONFIGURATION",
  "messages": ["output.group_id=1044 is a DECLINE_GROUP group and cannot be used with status MAC_CODE_GROUP"]
}
```

```json 409 — Already Exists theme={"theme":{"light":"github-dark","dark":"github-dark-dimmed"}}
{
  "code": "ROUTING_ALREADY_EXISTS",
  "messages": ["A routing for payment_method 'CARD' already exists for this account."]
}
```

### 错误

| HTTP | `code` |
| - | - |
| `400` | `INVALID_PARAMETERS` 某个字段缺失或取值无效：步骤既没有 `provider_id` 也没有 `action`，`status` 或 `action` 不在其枚举范围内，在非 `CAPTURE` 步骤上使用了 `action_delay`，`group_id` 格式错误。`messages` 会指出出错的字段。 |
| `400` | `INVALID_FORMAT` 某个字段的类型或格式错误：`time_period_start_time` / `time_period_end_time` 不是 `HH:mm:ss`，`TIME_PERIOD` 条件的 `values` 中的日期不是 ISO-8601，`time_period_repeat_amount` 或 `sort_number` 不是整数，`retry` 不是布尔值。`messages` 会指出该字段。 |
| `400` | `INVALID_ROUTE_CONFIGURATION` 违反路由规则：步骤索引不连续，`next` 或拆分分支指向不存在的步骤，拆分总和不为 100 或导致某个步骤无法到达，`CAPTURE` 或 `HOLD_FOR_REVIEW` 步骤并非只从 `APPROVED` 到达，`action_delay` 小于 1 分钟或大于 7 天，在不支持 `retry` 的状态上使用它，或在已存储路由尚未重试的 Merchant Advice Code 组上使用它（请参阅[重试](https://docs.y.uno/zh-hans/reference/organizations/routing/routing-resource-shape.md#retry)），`group_id` 未知、属于其他账户或类型错误，`decline_types` 与该组不匹配，在非 3DS 服务提供商步骤上使用 `LIABILITY_SHIFTED`、`LIABILITY_NOT_SHIFTED` 或 `LIABILITY_NOT_REPORTED`，或将它们与 `group_id`、`decline_types` 或 `retry: true` 一起使用（请参阅[责任转移输出](https://docs.y.uno/zh-hans/reference/organizations/routing/routing-resource-shape.md#liability-shift-outputs)），条件违反其 `condition_type` 的规则，或者找不到该账户和服务提供商对应的 `connection_id`。`messages` 会说明违反了哪条规则。 |
| `400` | `INVALID_VOLUME_LIMIT_CURRENCY`、`INVALID_VOLUME_LIMIT_PERIOD`、`UNSUPPORTED_VOLUME_LIMIT_TIMEZONE` `VOLUME_PAYMENTS_LIMIT` 条件的币种、周期或时区无效。请参阅[金额与笔数限制](https://docs.y.uno/zh-hans/reference/organizations/routing/routing-conditions.md#volume-and-count-limits-volume_payments_limit)。 |
| `400` | `INVALID_PROVIDER_ID` `provider_id` 格式无效。 |
| `409` | `ROUTING_ALREADY_EXISTS` 此 `(account, payment_method)` 已存在路由。请使用 `PATCH` 更新它。 |
| `401` | `NOT_AUTHENTICATED` 缺少 `public-api-key` 或 `private-secret-key` 标头。 |
| `401` | `INVALID_CREDENTIALS` 密钥对错误，或使用了 Dashboard **Customized API key**。请改用账户密钥或组织密钥。 |


## OpenAPI

````yaml openapi/zh-hans/organizations/routing/create-routing.json POST /routing
openapi: 3.1.0
info:
  title: Routing API - Create
  version: 1.0.0
servers:
  - url: https://api-sandbox.y.uno/v1
    description: Sandbox
  - url: https://api.y.uno/v1
    description: Production (US)
security:
  - sec0: []
    sec1: []
paths:
  /routing:
    post:
      summary: 创建路由配置
      description: 为一个（account_id、payment_method）组合创建路由配置。
      operationId: create-routing
      parameters:
        - name: X-Idempotency-Key
          in: header
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - account_id
                - payment_method
                - name
                - default_route
              properties:
                account_id:
                  type: string
                  format: uuid
                  example: 7825fc5e-e50a-4248-9ae8-5d3786afb0be
                payment_method:
                  type: string
                  example: CARD
                name:
                  type: string
                  example: Card routing
                default_route:
                  type: object
                  required:
                    - steps
                  properties:
                    start_split:
                      type: array
                      description: >-
                        按百分比将该路由的入口拆分到多个步骤。省略时，所有支付都从步骤 1 开始。各条目之和必须为
                        100；仅当路由具有拆分入口时才会返回。
                      items:
                        type: object
                        required:
                          - index
                          - percentage
                        properties:
                          index:
                            type: integer
                            example: 1
                          percentage:
                            type: integer
                            example: 45
                    steps:
                      type: array
                      items:
                        type: object
                        required:
                          - index
                        properties:
                          index:
                            type: integer
                            example: 1
                          provider_id:
                            type: string
                            example: STRIPE
                            description: >-
                              服务提供商步骤必填（智能路由步骤上为
                              SMART_ROUTING）；动作步骤上不出现。必须与连接的服务提供商一致。
                          connection_id:
                            type: string
                            format: uuid
                            example: f1a3c4d5-7b8e-4a2c-9d1e-3f4a5b6c7d8e
                            description: >-
                              服务提供商步骤必填；动作步骤和智能路由步骤上不出现。必须为 ACTIVE，并支持该
                              payment_method。
                          action:
                            type: string
                            enum:
                              - CANCEL
                              - CAPTURE
                              - HOLD_FOR_REVIEW
                              - REVERT
                            description: >-
                              将该步骤设为结束路由的动作步骤：CANCEL 拒绝支付，CAPTURE 在 action_delay
                              之后捕获授权，HOLD_FOR_REVIEW 使其保持待处理状态等待人工审核，REVERT
                              在支付后欺诈筛查之后将其冲销。CAPTURE 和 HOLD_FOR_REVIEW
                              跟在支付步骤或智能路由步骤的 APPROVED 或 SUCCEEDED_GROUP
                              输出之后，REVERT 跟在支付之后运行的欺诈步骤的输出之后，CANCEL
                              绝不跟在批准之后。动作步骤没有 provider_id、connection_id 或
                              output。
                          action_delay:
                            type: string
                            example: PT5M
                            description: >-
                              仅适用于 action = CAPTURE。批准与捕获之间的 ISO-8601 时长，最短
                              PT1M，最长 P7D。省略则在批准处理完成后立即捕获。
                          output:
                            type: array
                            items:
                              type: object
                              required:
                                - status
                              properties:
                                status:
                                  type: string
                                  example: DECLINED
                                  description: >-
                                    APPROVED、DECLINED、DECLINE_GROUP、MAC_CODE_GROUP、ISO_CODE_GROUP、SUCCEEDED_GROUP、PENDING（仅限欺诈、3DS
                                    和身份验证步骤）、INTERNAL_ERROR，或
                                    LIABILITY_SHIFTED、LIABILITY_NOT_SHIFTED 和
                                    LIABILITY_NOT_REPORTED（仅限 3DS
                                    服务提供商步骤：它们按身份验证的责任转移情况（true、false 或无值）细化
                                    APPROVED，当步骤上没有匹配的输出时，路由沿用
                                    APPROVED；这些输出上不允许使用 group_id、decline_types 和
                                    retry: true）。
                                decline_types:
                                  type: array
                                  items:
                                    type: string
                                  description: >-
                                    拒绝子状态，或 ISO_CODE_GROUP 上的 ISO 8583
                                    响应码（仅限银行卡支付；每个代码去除首尾空格后为 1 至 30
                                    个字符，比较时不区分大小写）。在 DECLINE_GROUP 和
                                    ISO_CODE_GROUP 上，除非发送了 group_id，否则必填；带有
                                    group_id 时，必须与该组的成员一致。SUCCEEDED_GROUP
                                    上不允许使用。
                                group_id:
                                  type: integer
                                  example: 1044
                                  description: >-
                                    账户的拒绝组、Merchant Advice Code 组、ISO 代码组或成功组的
                                    ID（参见列出拒绝组和列出成功组）。MAC_CODE_GROUP 和
                                    SUCCEEDED_GROUP 上必填，DECLINE_GROUP 和
                                    ISO_CODE_GROUP 上可选，其他情况不允许使用。MAC_CODE_GROUP
                                    接受 Merchant Advice Code 组；DECLINE_GROUP
                                    接受拒绝组或 Merchant Advice Code 组；ISO_CODE_GROUP
                                    仅接受 ISO 代码组。
                                retry:
                                  type: boolean
                                  example: false
                                  description: >-
                                    设为 true 时，在发生该结果时，先再次尝试同一服务提供商一次，然后再沿用
                                    next。仅适用于
                                    DECLINED、INTERNAL_ERROR、DECLINE_GROUP 和
                                    ISO_CODE_GROUP（MAC_CODE_GROUP 仍会拒绝 retry:
                                    true）；对于引用 Merchant Advice Code 组的
                                    DECLINE_GROUP
                                    条目，仅当已存储的路由已在同一步骤上对该组重试时才适用，因此创建时始终会被拒绝。更新时，省略
                                    retry 则保留已存储的值。
                                next:
                                  type: integer
                                  example: 2
                                next_split:
                                  type: array
                                  description: >-
                                    按百分比将回退拆分到多个步骤：至少 2 个条目，百分比之和为 100。next
                                    与之并存时为可选，若发送则必须等于第一个条目；响应在返回 next_split
                                    的同时，将 next 设为第一个条目。
                                  items:
                                    type: object
                                    required:
                                      - index
                                      - percentage
                                    properties:
                                      index:
                                        type: integer
                                        example: 2
                                      percentage:
                                        type: integer
                                        example: 70
                            description: 服务提供商步骤上按结果划分的处理器。动作步骤上不允许使用。
                          network_token_on:
                            type: boolean
                            description: >-
                              仅适用于 CARD 路由的支付服务提供商步骤。设为 true
                              时，如果有可用的卡网络令牌，则使用网络令牌支付；要求组织已开通网络令牌，且服务提供商支持网络令牌（响应中的
                              network_token_enable），否则返回 400
                              NETWORK_TOKEN_NOT_ONBOARDED 或
                              NETWORK_TOKEN_NOT_SUPPORTED。更新时省略则保留已存储的值；false
                              则关闭。
                          three_d_secure_exemptions:
                            type: array
                            items:
                              type: string
                              enum:
                                - LOW_VALUE
                                - TRANSACTION_RISK_ANALYSIS
                                - SECURE_CORPORATE
                                - TRUSTED_BENEFICIARY
                                - RECURRING_PAYMENT
                                - STRONG_CUSTOMER_AUTHENTICATION
                                - OUT_OF_SCOPE
                            description: >-
                              仅适用于 3DS 服务提供商步骤。该步骤可应用的 SCA 豁免。更新时省略则保留已存储的列表；[]
                              则清空。
                          fraud:
                            type: object
                            description: 欺诈服务提供商步骤的配置。仅适用于 FRAUD 服务提供商；更新时省略则保留已存储的配置。
                            properties:
                              rules:
                                type: string
                                example: rule-a,rule-b
                              blocklists:
                                type: string
                              allowlists:
                                type: string
                              reviewlists:
                                type: string
                              preset:
                                type: string
                              report_only:
                                type: boolean
                                description: 仅评分，不根据结果采取动作。仅适用于从支付步骤的拒绝输出到达的欺诈步骤。
                          smart_routing:
                            type: object
                            description: >-
                              将该步骤设为智能路由步骤（provider_id 为 SMART_ROUTING，没有
                              connection_id）。仅限银行卡路由，每条路由一个。
                            required:
                              - type
                              - providers
                            properties:
                              type:
                                type: string
                                enum:
                                  - COSTS
                                  - LATENCY
                                example: LATENCY
                              providers:
                                type: array
                                minItems: 2
                                maxItems: 4
                                items:
                                  type: object
                                  required:
                                    - provider_id
                                    - connection_id
                                  properties:
                                    provider_id:
                                      type: string
                                      example: ADYEN
                                    connection_id:
                                      type: string
                                      format: uuid
                                    network_token_on:
                                      type: boolean
                              no_retry_decline_types:
                                type: array
                                items:
                                  type: string
                                description: 出现这些拒绝子状态后，不再尝试该组中的下一个服务提供商。
                              no_retry_decline_group_ids:
                                type: array
                                items:
                                  type: integer
                                example:
                                  - 5120
                                description: >-
                                  账户的拒绝组 ID（列出拒绝组），其拒绝不会在该组中的下一个服务提供商上重试。接受 ISO
                                  代码组：ISO 8583
                                  响应码属于其中某个组的拒绝，不会在下一个智能路由服务提供商上重试。更新时省略则保留已存储的组；[]
                                  则清空。
                              no_retry_failure_causes:
                                type: array
                                items:
                                  type: string
                                description: >-
                                  出现这些失败原因（例如
                                  PROVIDER_TIMEOUT）后，不再尝试该组中的下一个服务提供商。
                        description: >-
                          一次服务提供商尝试（provider_id +
                          connection_id）或一个动作步骤（action）。index 值从 1 开始连续编号。
                condition_sets:
                  type: array
                  description: 可选。按 sort_number 排序，第一个匹配的集合生效。
                  items:
                    type: object
                    required:
                      - sort_number
                      - name
                      - conditions
                      - route
                    properties:
                      sort_number:
                        type: integer
                        example: 1
                      name:
                        type: string
                        example: US & Canada — high value
                      description:
                        type: string
                      conditions:
                        type: array
                        items:
                          type: object
                          required:
                            - condition_type
                            - conditional
                            - values
                          properties:
                            condition_type:
                              type: string
                              example: COUNTRY
                              description: >-
                                条件目录请参见 Routing
                                Conditions：COUNTRY、CARD_ISSUER_COUNTRY、AMOUNT、CURRENCY、CARD_TYPE、CARD_BRAND、CARD_BIN、TRANSACTION_TYPE、METADATA、ADDITIONAL_FIELD、ORDER_ITEMS_AMOUNT、TIME_PERIOD、VOLUME_PAYMENTS_LIMIT、SUBSCRIPTION_RETRY、SUBSCRIPTION_RETRY_COUNT。
                            conditional:
                              type: string
                              example: ONE_OF
                            values:
                              type: array
                              items:
                                type: string
                              example:
                                - US
                                - CA
                              description: >-
                                在 CURRENCY 上，为大写的 ISO 4217 代码（不含 XXX，不可重复）：使用
                                EQUAL 或 NOT_EQUAL 时恰好 1 个，使用 ONE_OF 或 NOT_ONE_OF
                                时 1 个或多个。仅在带有 currency 的 AMOUNT
                                条件上可为空，此时匹配该货币的任意金额。在 ORDER_ITEMS_AMOUNT
                                上，为订单项汇总金额的数值阈值：1 个值，使用 BETWEEN 时为 2 个。
                            key:
                              type: string
                              description: >-
                                METADATA：metadata
                                键。ADDITIONAL_FIELD：受支持的字段名称。ORDER_ITEMS_AMOUNT：item_values
                                所匹配的订单项字段，可选 sku_code（默认）、category 或 brand。
                            item_values:
                              type: array
                              items:
                                type: string
                              example:
                                - GC-50
                                - GC-100
                                - GC-200
                              description: >-
                                仅适用于
                                ORDER_ITEMS_AMOUNT，且在其上必填：订单项值的非空列表（精确匹配，区分大小写），其
                                quantity × unit_amount 会被累加。在其他任何 condition_type
                                上会被拒绝。
                            currency:
                              type: string
                              example: USD
                              description: >-
                                ISO 4217。在 AMOUNT、ORDER_ITEMS_AMOUNT 以及 limit_by
                                = VOLUME 的 VOLUME_PAYMENTS_LIMIT 上必填。CURRENCY
                                上不发送，其货币放在 values 中。
                            time_period_repeat_amount:
                              type: integer
                              example: 1
                              description: >-
                                TIME_PERIOD 和 VOLUME_PAYMENTS_LIMIT：每隔多少个
                                time_period_repeat_frequency 单位（计划），或 DAILY
                                窗口的天数长度，1 至 90（限额）。
                            time_period_repeat_frequency:
                              type: string
                              enum:
                                - DAILY
                                - WEEKLY
                                - MONTHLY
                                - QUARTERLY
                                - YEARLY
                              description: >-
                                TIME_PERIOD：重复周期单位。VOLUME_PAYMENTS_LIMIT：限额的周期，DAILY、MONTHLY
                                或 QUARTERLY。
                            time_period_repetition_days:
                              type: array
                              items:
                                type: string
                                enum:
                                  - MONDAY
                                  - TUESDAY
                                  - WEDNESDAY
                                  - THURSDAY
                                  - FRIDAY
                                  - SATURDAY
                                  - SUNDAY
                              description: 仅适用于 TIME_PERIOD。计划适用的星期几；需要同时设置频率。
                            time_period_start_time:
                              type: string
                              example: '09:00:00'
                              description: >-
                                仅适用于 TIME_PERIOD。每日时间窗口的开始时间（HH:mm:ss），需与
                                time_period_end_time 一起使用。
                            time_period_end_time:
                              type: string
                              example: '18:00:00'
                              description: 仅适用于 TIME_PERIOD。每日时间窗口的结束时间（HH:mm:ss），含该时刻。
                            timezone:
                              type: string
                              example: '-03:00'
                              description: >-
                                UTC 偏移量。TIME_PERIOD：计划按该偏移量解读（默认为 values[0]
                                的偏移量）。VOLUME_PAYMENTS_LIMIT：各周期起始所用的整小时偏移量（默认为
                                +00:00）。
                            limit_by:
                              type: string
                              enum:
                                - PAYMENTS
                                - VOLUME
                              description: 仅适用于 VOLUME_PAYMENTS_LIMIT。按笔数统计支付（默认），或按货币汇总金额。
                            payments_count:
                              type: string
                              enum:
                                - ALL
                                - SUCCEEDED
                              description: 仅适用于 VOLUME_PAYMENTS_LIMIT。哪些支付计入限额。默认为 ALL。
                        description: 以逻辑 AND 组合的条件。请参见 Routing Conditions。
                      route:
                        type: object
                        description: >-
                          结构与 default_route 相同，包括
                          start_split、output[].next_split 和动作步骤。
            example:
              account_id: 7825fc5e-e50a-4248-9ae8-5d3786afb0be
              payment_method: GOOGLE_PAY
              name: Google Pay routing
              default_route:
                steps:
                  - index: 1
                    provider_id: ADYEN
                    connection_id: b2c4d5e6-1a2b-4c3d-8e4f-5a6b7c8d9e0f
                    output:
                      - status: APPROVED
                        next: 3
                      - status: DECLINED
                        retry: false
                        next_split:
                          - index: 2
                            percentage: 70
                          - index: 4
                            percentage: 30
                  - index: 2
                    provider_id: ADYEN
                    connection_id: b2c4d5e6-1a2b-4c3d-8e4f-5a6b7c8d9e0f
                    output:
                      - status: APPROVED
                        next: 3
                  - index: 3
                    action: CAPTURE
                    action_delay: PT5M
                  - index: 4
                    action: CANCEL
              condition_sets:
                - sort_number: 1
                  name: US & Canada
                  conditions:
                    - condition_type: COUNTRY
                      conditional: ONE_OF
                      values:
                        - US
                        - CA
                  route:
                    steps:
                      - index: 1
                        provider_id: ADYEN
                        connection_id: b2c4d5e6-1a2b-4c3d-8e4f-5a6b7c8d9e0f
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    example: 8f2c1d3e-4b5a-4c7d-8e9f-0a1b2c3d4e5f
                  account_id:
                    type: string
                    example: acc-uuid
                  payment_method:
                    type: string
                    example: CARD
                  name:
                    type: string
                    example: Card routing
                  default_route:
                    type: object
                    properties:
                      start_split:
                        type: array
                        description: >-
                          按百分比将该路由的入口拆分到多个步骤。省略时，所有支付都从步骤 1 开始。各条目之和必须为
                          100；仅当路由具有拆分入口时才会返回。
                        items:
                          type: object
                          required:
                            - index
                            - percentage
                          properties:
                            index:
                              type: integer
                              example: 1
                            percentage:
                              type: integer
                              example: 45
                      steps:
                        type: array
                        items:
                          type: object
                          properties:
                            index:
                              type: integer
                              example: 1
                            provider_id:
                              type: string
                              example: STRIPE
                              description: 服务提供商步骤必填；动作步骤上不出现。必须与连接的服务提供商一致。
                            connection_id:
                              type: string
                              example: f1a3c4d5-7b8e-4a2c-9d1e-3f4a5b6c7d8e
                              description: >-
                                服务提供商步骤必填；动作步骤和智能路由步骤上不出现。必须为 ACTIVE，并支持该
                                payment_method。
                            provider_type:
                              type: string
                              enum:
                                - PAYMENT
                                - FRAUD
                                - THREE_D_SECURE
                                - AUTHENTICATION
                              description: 服务提供商所对应的类型。仅在响应中出现。
                            timeout:
                              type: integer
                              example: 60
                              description: 服务提供商步骤。服务提供商的超时时间（秒），来自服务提供商目录。仅在响应中出现。
                            network_token_enable:
                              type: boolean
                              description: >-
                                支付步骤。该步骤上 network_token_on 能否为
                                true：组织已开通网络令牌，且服务提供商支持网络令牌。仅在响应中出现。
                            network_token_on:
                              type: boolean
                              description: 支付步骤。该步骤是否在有可用的卡网络令牌时使用网络令牌支付。
                            three_d_secure_exemptions:
                              type: array
                              items:
                                type: string
                                enum:
                                  - LOW_VALUE
                                  - TRANSACTION_RISK_ANALYSIS
                                  - SECURE_CORPORATE
                                  - TRUSTED_BENEFICIARY
                                  - RECURRING_PAYMENT
                                  - STRONG_CUSTOMER_AUTHENTICATION
                                  - OUT_OF_SCOPE
                              description: 3DS 步骤。该步骤可应用的 SCA 豁免；没有时为空数组。
                            action:
                              type: string
                              enum:
                                - CANCEL
                                - CAPTURE
                                - HOLD_FOR_REVIEW
                                - REVERT
                              description: >-
                                将该步骤设为结束路由的动作步骤：CANCEL 拒绝支付，CAPTURE 在
                                action_delay 之后捕获授权，HOLD_FOR_REVIEW
                                使其保持待处理状态等待人工审核，REVERT 在支付后欺诈筛查之后将其冲销。CAPTURE 和
                                HOLD_FOR_REVIEW 跟在支付步骤或智能路由步骤的 APPROVED 或
                                SUCCEEDED_GROUP 输出之后，REVERT
                                跟在支付之后运行的欺诈步骤的输出之后，CANCEL 绝不跟在批准之后。动作步骤没有
                                provider_id、connection_id 或 output。
                            action_delay:
                              type: string
                              example: PT5M
                              description: >-
                                仅适用于 action = CAPTURE。批准与捕获之间的 ISO-8601 时长，最短
                                PT1M，最长 P7D。省略则在批准处理完成后立即捕获。
                            output:
                              type: array
                              items:
                                type: object
                                required:
                                  - status
                                properties:
                                  status:
                                    type: string
                                    example: DECLINED
                                    description: >-
                                      APPROVED、DECLINED、DECLINE_GROUP、MAC_CODE_GROUP、ISO_CODE_GROUP、SUCCEEDED_GROUP、PENDING（仅限欺诈、3DS
                                      和身份验证步骤）、INTERNAL_ERROR，或
                                      LIABILITY_SHIFTED、LIABILITY_NOT_SHIFTED 和
                                      LIABILITY_NOT_REPORTED（仅限 3DS
                                      服务提供商步骤：它们按身份验证的责任转移情况（true、false 或无值）细化
                                      APPROVED，当步骤上没有匹配的输出时，路由沿用
                                      APPROVED；这些输出上不允许使用 group_id、decline_types
                                      和 retry: true）。
                                  decline_types:
                                    type: array
                                    items:
                                      type: string
                                    description: >-
                                      DECLINE_GROUP（拒绝子状态）、MAC_CODE_GROUP（Merchant
                                      Advice Codes）和 ISO_CODE_GROUP（ISO 8583
                                      响应码）输出上该组的成员。
                                  group_id:
                                    type: integer
                                    example: 1044
                                    description: >-
                                      DECLINE_GROUP、MAC_CODE_GROUP、ISO_CODE_GROUP
                                      或 SUCCEEDED_GROUP 输出所对应的组的 ID。
                                  group_name:
                                    type: string
                                    example: Soft declines
                                    description: group_id 所对应的组的名称。写入时忽略。
                                  retry:
                                    type: boolean
                                    example: false
                                    description: 该输出是否在沿用 next 之前，对同一服务提供商重试一次。始终返回。
                                  next:
                                    type: integer
                                    example: 2
                                  next_split:
                                    type: array
                                    description: >-
                                      按百分比将回退拆分到多个步骤：至少 2 个条目，百分比之和为 100。next
                                      与之并存时为可选，若发送则必须等于第一个条目；响应在返回 next_split
                                      的同时，将 next 设为第一个条目。
                                    items:
                                      type: object
                                      required:
                                        - index
                                        - percentage
                                      properties:
                                        index:
                                          type: integer
                                          example: 2
                                        percentage:
                                          type: integer
                                          example: 70
                              description: 按结果划分的处理器。在动作步骤上返回空数组。
                            fraud:
                              type: object
                              description: 欺诈服务提供商步骤的配置，在 FRAUD 步骤上返回。
                              properties:
                                rules:
                                  type: string
                                  example: rule-a,rule-b
                                blocklists:
                                  type: string
                                allowlists:
                                  type: string
                                reviewlists:
                                  type: string
                                preset:
                                  type: string
                                report_only:
                                  type: boolean
                                  description: 仅评分，不根据结果采取动作。仅适用于从支付步骤的拒绝输出到达的欺诈步骤。
                            smart_routing:
                              type: object
                              description: 在智能路由步骤上返回。
                              properties:
                                type:
                                  type: string
                                  enum:
                                    - COSTS
                                    - LATENCY
                                  example: LATENCY
                                providers:
                                  type: array
                                  minItems: 2
                                  maxItems: 4
                                  items:
                                    type: object
                                    required:
                                      - provider_id
                                      - connection_id
                                    properties:
                                      provider_id:
                                        type: string
                                        example: ADYEN
                                      connection_id:
                                        type: string
                                        format: uuid
                                      network_token_on:
                                        type: boolean
                                no_retry_decline_types:
                                  type: array
                                  items:
                                    type: string
                                  description: 出现这些拒绝子状态后，不再尝试该组中的下一个服务提供商。
                                no_retry_decline_group_ids:
                                  type: array
                                  items:
                                    type: integer
                                  example:
                                    - 5120
                                  description: >-
                                    账户的拒绝组 ID（列出拒绝组），其拒绝不会在该组中的下一个服务提供商上重试。接受
                                    ISO 代码组：ISO 8583
                                    响应码属于其中某个组的拒绝，不会在下一个智能路由服务提供商上重试。更新时省略则保留已存储的组；[]
                                    则清空。
                                no_retry_failure_causes:
                                  type: array
                                  items:
                                    type: string
                                  description: >-
                                    出现这些失败原因（例如
                                    PROVIDER_TIMEOUT）后，不再尝试该组中的下一个服务提供商。
                  condition_sets:
                    type: array
                    items:
                      type: object
                      properties:
                        sort_number:
                          type: integer
                          example: 1
                        name:
                          type: string
                          example: High Value US
                        description:
                          type: string
                        conditions:
                          type: array
                          items:
                            type: object
                            properties:
                              condition_type:
                                type: string
                                example: COUNTRY
                                description: >-
                                  条件目录请参见 Routing
                                  Conditions：COUNTRY、CARD_ISSUER_COUNTRY、AMOUNT、CURRENCY、CARD_TYPE、CARD_BRAND、CARD_BIN、TRANSACTION_TYPE、METADATA、ADDITIONAL_FIELD、ORDER_ITEMS_AMOUNT、TIME_PERIOD、VOLUME_PAYMENTS_LIMIT、SUBSCRIPTION_RETRY、SUBSCRIPTION_RETRY_COUNT。
                              conditional:
                                type: string
                                example: ONE_OF
                              values:
                                type: array
                                items:
                                  type: string
                                example:
                                  - US
                                  - CA
                                description: >-
                                  在 CURRENCY 上，为大写的 ISO 4217 代码（不含 XXX，不可重复）：使用
                                  EQUAL 或 NOT_EQUAL 时恰好 1 个，使用 ONE_OF 或
                                  NOT_ONE_OF 时 1 个或多个。仅在带有 currency 的 AMOUNT
                                  条件上可为空，此时匹配该货币的任意金额。在 ORDER_ITEMS_AMOUNT
                                  上，为订单项汇总金额的数值阈值：1 个值，使用 BETWEEN 时为 2 个。
                              key:
                                type: string
                                description: >-
                                  METADATA：metadata
                                  键。ADDITIONAL_FIELD：受支持的字段名称。ORDER_ITEMS_AMOUNT：item_values
                                  所匹配的订单项字段，可选 sku_code（默认）、category 或 brand。
                              item_values:
                                type: array
                                items:
                                  type: string
                                example:
                                  - GC-50
                                  - GC-100
                                  - GC-200
                                description: >-
                                  仅适用于
                                  ORDER_ITEMS_AMOUNT，且在其上必填：订单项值的非空列表（精确匹配，区分大小写），其
                                  quantity × unit_amount 会被累加。在其他任何
                                  condition_type 上会被拒绝。
                              currency:
                                type: string
                                example: USD
                                description: >-
                                  ISO 4217。在 AMOUNT、ORDER_ITEMS_AMOUNT 以及
                                  limit_by = VOLUME 的 VOLUME_PAYMENTS_LIMIT
                                  上必填。CURRENCY 上不发送，其货币放在 values 中。
                              time_period_repeat_amount:
                                type: integer
                                example: 1
                                description: >-
                                  TIME_PERIOD 和 VOLUME_PAYMENTS_LIMIT：每隔多少个
                                  time_period_repeat_frequency 单位（计划），或 DAILY
                                  窗口的天数长度，1 至 90（限额）。
                              time_period_repeat_frequency:
                                type: string
                                enum:
                                  - DAILY
                                  - WEEKLY
                                  - MONTHLY
                                  - QUARTERLY
                                  - YEARLY
                                description: >-
                                  TIME_PERIOD：重复周期单位。VOLUME_PAYMENTS_LIMIT：限额的周期，DAILY、MONTHLY
                                  或 QUARTERLY。
                              time_period_repetition_days:
                                type: array
                                items:
                                  type: string
                                  enum:
                                    - MONDAY
                                    - TUESDAY
                                    - WEDNESDAY
                                    - THURSDAY
                                    - FRIDAY
                                    - SATURDAY
                                    - SUNDAY
                                description: 仅适用于 TIME_PERIOD。计划适用的星期几；需要同时设置频率。
                              time_period_start_time:
                                type: string
                                example: '09:00:00'
                                description: >-
                                  仅适用于 TIME_PERIOD。每日时间窗口的开始时间（HH:mm:ss），需与
                                  time_period_end_time 一起使用。
                              time_period_end_time:
                                type: string
                                example: '18:00:00'
                                description: 仅适用于 TIME_PERIOD。每日时间窗口的结束时间（HH:mm:ss），含该时刻。
                              timezone:
                                type: string
                                example: '-03:00'
                                description: >-
                                  UTC 偏移量。TIME_PERIOD：计划按该偏移量解读（默认为 values[0]
                                  的偏移量）。VOLUME_PAYMENTS_LIMIT：各周期起始所用的整小时偏移量（默认为
                                  +00:00）。
                              limit_by:
                                type: string
                                enum:
                                  - PAYMENTS
                                  - VOLUME
                                description: >-
                                  仅适用于
                                  VOLUME_PAYMENTS_LIMIT。按笔数统计支付（默认），或按货币汇总金额。
                              payments_count:
                                type: string
                                enum:
                                  - ALL
                                  - SUCCEEDED
                                description: 仅适用于 VOLUME_PAYMENTS_LIMIT。哪些支付计入限额。默认为 ALL。
                          description: 以逻辑 AND 组合的条件。请参见 Routing Conditions。
                        route:
                          type: object
                          description: >-
                            结构与 default_route 相同，包括
                            start_split、output[].next_split 和动作步骤。
                  created_at:
                    type: string
                    format: date-time
                    example: '2026-05-12T14:30:00Z'
                  updated_at:
                    type: string
                    format: date-time
                    example: '2026-05-12T14:30:00Z'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: INVALID_ROUTE_CONFIGURATION
                  messages:
                    type: array
                    items:
                      type: string
                    example:
                      - >-
                        step index=2 with action=CAPTURE must be reached only
                        from an APPROVED output of a provider step
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: NOT_AUTHENTICATED
                  messages:
                    type: array
                    items:
                      type: string
                    example:
                      - Not authenticated
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: ROUTING_ALREADY_EXISTS
                  messages:
                    type: array
                    items:
                      type: string
                    example:
                      - A routing already exists for this payment method
components:
  securitySchemes:
    sec0:
      type: apiKey
      in: header
      name: PUBLIC-API-KEY
      x-default: <Your PUBLIC-API-KEY>
    sec1:
      type: apiKey
      in: header
      name: PRIVATE-SECRET-KEY
      x-default: <Your PRIVATE-SECRET-KEY>

````

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