> ## 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 SDK 模式迁移到统一的 Transaction API。

统一 SDK 用单个 `Transaction` 类取代了之前所有的 SDK 模式（Full、Lite、Seamless、Render、Headless 和 Secure Fields）。如果您目前正在使用其中任何一种模式，请从下表中选择您的平台和旧版模式。在 React Native 上，这些指南从 `@yuno-payments/yuno-sdk-react-native` 的 1.x API 开始，到 2.0.0 结束。

## 查找您的指南

| 旧版模式 | iOS | Android | Web | React Native |
| - | - | - | - | - |
| **Lite**：预先选定支付方式，由 SDK 管理表单 | [iOS](https://docs.y.uno/zh-hans/docs/yuno-sdk/migration/ios/payment/lite.md) | [Android](https://docs.y.uno/zh-hans/docs/yuno-sdk/migration/android/payment/lite.md) | [Web](https://docs.y.uno/zh-hans/docs/yuno-sdk/migration/web/lite.md) | [React Native](https://docs.y.uno/zh-hans/docs/yuno-sdk/migration/react-native/payment/lite.md) |
| **Full**：由 SDK 渲染支付方式列表 | [iOS](https://docs.y.uno/zh-hans/docs/yuno-sdk/migration/ios/payment/full.md) | [Android](https://docs.y.uno/zh-hans/docs/yuno-sdk/migration/android/payment/full.md) | [Web](https://docs.y.uno/zh-hans/docs/yuno-sdk/migration/web/full.md) | [React Native](https://docs.y.uno/zh-hans/docs/yuno-sdk/migration/react-native/payment/full.md) |
| **Render**：您将 SDK 的表单嵌入自己的布局中 | [iOS](https://docs.y.uno/zh-hans/docs/yuno-sdk/migration/ios/payment/render.md) | [Android](https://docs.y.uno/zh-hans/docs/yuno-sdk/migration/android/payment/render.md) | *（不适用）* | *（不适用：2.0.0 中新增，参见 [`showView`](https://docs.y.uno/zh-hans/docs/yuno-sdk/controllers/show-view)）* |
| **Headless**：您在自己的 UI 中收集数据 | [iOS](https://docs.y.uno/zh-hans/docs/yuno-sdk/migration/ios/payment/headless.md) | [Android](https://docs.y.uno/zh-hans/docs/yuno-sdk/migration/android/payment/headless.md) | [Web](https://docs.y.uno/zh-hans/docs/yuno-sdk/migration/web/headless.md) | [React Native](https://docs.y.uno/zh-hans/docs/yuno-sdk/migration/react-native/payment/headless.md) |
| **Seamless**：由 SDK 管理支付创建，由商户触发启动 | [iOS](https://docs.y.uno/zh-hans/docs/yuno-sdk/migration/ios/payment/seamless.md) | [Android](https://docs.y.uno/zh-hans/docs/yuno-sdk/migration/android/payment/seamless.md) | [Web](https://docs.y.uno/zh-hans/docs/yuno-sdk/migration/web/seamless.md) | *（不适用）* |
| **Seamless Lite**：预先选定支付方式的 Seamless | *（不适用）* | *（不适用）* | [Web](https://docs.y.uno/zh-hans/docs/yuno-sdk/migration/web/seamless-lite.md) | [React Native](https://docs.y.uno/zh-hans/docs/yuno-sdk/migration/react-native/payment/seamless-lite.md) |
| **Secure Fields**：在符合 PCI 要求的 iframe 中收集卡片数据 | *（不适用）* | *（不适用）* | [Web](https://docs.y.uno/zh-hans/docs/yuno-sdk/migration/web/secure-fields.md) | *（不适用）* |
| **注册**：保存支付方式而不扣款 | [Lite](https://docs.y.uno/zh-hans/docs/yuno-sdk/migration/ios/enrollment/lite.md) · [Render](https://docs.y.uno/zh-hans/docs/yuno-sdk/migration/ios/enrollment/render.md) · [Headless](https://docs.y.uno/zh-hans/docs/yuno-sdk/migration/ios/enrollment/headless.md) | [Lite](https://docs.y.uno/zh-hans/docs/yuno-sdk/migration/android/enrollment/lite.md) · [Render](https://docs.y.uno/zh-hans/docs/yuno-sdk/migration/android/enrollment/render.md) · [Headless](https://docs.y.uno/zh-hans/docs/yuno-sdk/migration/android/enrollment/headless.md) | [Web](https://docs.y.uno/zh-hans/docs/yuno-sdk/migration/web/enrollment.md) | [Lite](https://docs.y.uno/zh-hans/docs/yuno-sdk/migration/react-native/enrollment/lite.md) · [Headless](https://docs.y.uno/zh-hans/docs/yuno-sdk/migration/react-native/enrollment/headless.md) |
| **状态**：独立的支付状态页面 | *（不适用）* | *（不适用）* | [Web](https://docs.y.uno/zh-hans/docs/yuno-sdk/migration/web/status.md) | *（不适用）* |
| **欺诈**：设备指纹识别 | *（不适用）* | *（不适用）* | [Web](https://docs.y.uno/zh-hans/docs/yuno-sdk/migration/web/fraud.md) | *（不适用）* |

## 变更内容

每种旧版模式都对应同一个 `Transaction` 类。模式名称已不复存在。行为由您传给配置的内容以及您覆盖的控制器决定：

* **会话类型**（`checkoutSession` 或 `customerSession`）决定是支付还是注册。
* **`createPayment` 控制器**决定由 SDK 还是您的 backend 创建支付。如果您不覆盖它，SDK 会端到端地管理支付创建（相当于 Seamless）。
* **`showView` 控制器**（iOS、Android、React Native）决定 SDK 是全屏呈现表单，还是将视图交给您嵌入（相当于 Render）。
* **`PaymentMethodSelected` 上的 `transactionData`**（iOS、Android、React Native）或**传给 `start()` 的 `paymentMethod` 上的 `data`**（Web）决定 SDK 是显示表单，还是对您已收集的数据进行令牌化（相当于 Headless）。
* **`getPaymentMethodsViews`** 取代所有旧版的列表挂载和外部钱包按钮 API（相当于 Full）。

> [!NOTE]
>
> \*\*iOS 上的原生 3DS：\*\*从 SdkPayments 3.2.0 起，添加 `SdkPaymentsNetcetera` 模块即可原生运行 3DS 挑战；如果不添加，挑战将在 SDK 呈现的 WebView 中运行。参见[原生模块](https://docs.y.uno/zh-hans/docs/yuno-sdk/features/native-modules.md#netcetera-3ds)。

每份指南的结构相同：开始之前需要确定的事项、并排的代码对比，以及一张变更表，列出每项变更及相应的处理方式。


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