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

# 设置支付连接

> 逐步介绍如何在 Yuno 中配置支付连接、路由、checkout builder 和 API 凭证。

在通过 Yuno API 直接集成创建支付之前，您必须配置您的账户：设置支付连接、定义支付路由、启用支付方式并获取您的 API 凭证。本页介绍这些必要的设置步骤。

您将了解如何：

* 配置您的第一个支付连接
* 设置支付路由
* 在 checkout builder 中启用支付方式
* 获取您的 API 凭证，包括您的 `public-api-key` 和 `private-secret-key`

> [!NOTE]
>
> **Yuno Testing Gateway**
>
> 按照这些说明操作时，请务必选择符合您需求的支付连接。如果您想测试信用卡支付，请使用 [Yuno Testing Gateway](https://docs.y.uno/zh-hans/docs/direct-integration-use-cases/yuno-testing-gateway.md) 作为您的服务提供商。

## 配置支付方式

在配置支付方式之前，您首先需要与某个可用的服务提供商创建连接。

### 步骤 1：设置您的连接

要设置您的第一个支付连接：

1. 在 Dashboard 侧边栏中前往 **Connections**。
2. 使用搜索栏查找您需要的连接。
3. 点击 gateway 旁边的 **Connect**。
4. 为连接提供一个描述性名称，并按照屏幕上的提示操作。
5. 点击 **Save**。

成功添加连接后，Dashboard 中将显示一条确认消息。

<video src="https://github.com/writechoiceorg/yuno-images/raw/main/doc/set_up_you_account/connection_setup_V4_v2.mp4" loop autoPlay muted playsInline />

### 步骤 2：为新连接设置路由

Yuno 中的支付路由让您可以定义使用哪些连接来处理特定类型的交易。这样可以实现动态路由逻辑，并让您可以根据币种、国家/地区或其他因素灵活管理服务提供商。如需进行基本设置，请按照以下步骤操作：

1. 在 Dashboard 侧边栏中前往 [Routing](https://dashboard.y.uno/routing)。
2. 点击 **Not published** 选项卡，查看已有可用连接但尚未配置路由的支付方式。
3. 找到所需的支付方式，然后点击 **Set Up**。
4. 在弹出窗口中：
   * 点击 **+ Create new route**。
   * 为路由输入一个描述性名称。
   * 点击 **Save**。
5. 点击新路由旁边的箭头，然后选择 **Add step**。
6. 从列表中选择一个 **processor**，然后点击 **Select**。
7. 点击 **Publish** 保存您的所有更改。

您的新路由现在会显示在 **Published** 选项卡中，表示已配置的支付方式现在将通过此路由处理所有交易。

<video src="https://github.com/writechoiceorg/yuno-images/raw/main/doc/set_up_you_account/routing_V2.mp4" loop autoPlay muted playsInline />

### 步骤 3：在 Checkout Builder 中启用支付方式

配置好连接和路由后，您需要启用该支付方式，使其在您的 checkout 中可用：

1. 在 Dashboard 侧边栏中前往 [Checkout Builder](https://dashboard.y.uno/checkout-builder)。
2. 在可用方式列表中找到已配置的支付方式。
3. 打开开关以启用它。
4. 点击 **Publish settings** 应用您的更改。

<video src="https://github.com/writechoiceorg/yuno-images/raw/main/doc/set_up_you_account/checkoutbuilder.mp4" loop autoPlay muted playsInline />

### 步骤 4：获取您的 API 凭证

要完成设置并将 Yuno 集成到您的应用程序中，您需要从 Yuno Dashboard 获取您的 API 凭证。这些凭证仅适用于 sandbox 环境：

1. 在 Dashboard 侧边栏中前往 **Developers** 部分。
2. 在 Developer Tools 部分中，找到您的 API 凭证：
   * **Public API Key**：用于客户端 SDK 初始化。
   * **Secret API Key**：用于服务器端 API 调用。

<video src="https://raw.githubusercontent.com/writechoiceorg/yuno-images/main/doc/set_up_you_account/developer_V2.mp4" loop autoPlay muted playsInline />

完成这些步骤后，您就可以使用 **直接集成** 创建支付了。


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