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

# 支付状态

> 将 Web 独立状态页面（yuno.mountStatusPayment）迁移到统一 SDK。

`yuno.mountStatusPayment(...)` 为结账会话渲染一个独立的支付结果页面，通常在购物者从外部重定向返回后显示。在统一 API 中，它变为 `SdkPayments` 上的一个顶层方法：`sdkPayments.transactionStatus(...)`。

它不属于 `Transaction`。与 `antifraud` 一样，它是一个独立操作，因此直接位于 `SdkPayments` 实例上。

## 开始之前

* 加载统一 SDK 包而不是旧版包，并按照代码对照所示进行初始化：`window.Yuno.initialize(...)` 变为 `SdkPayments.initialize(...)`。您的公共 API 密钥以及您的 backend 创建的结账会话保持不变（[开始之前](https://docs.y.uno/zh-hans/docs/yuno-sdk/get-started.md#before-you-begin)）。

## 代码对照

```typescript Before. mountStatusPayment theme={"theme":{"light":"github-dark","dark":"github-dark-dimmed"}}
const yuno = await window.Yuno.initialize('your-public-api-key')

yuno.mountStatusPayment({
    checkoutSession: 'session-from-backend',
    countryCode: 'CO',
    language: 'en',
    paymentResult(data) {
        console.log('paymentResult', data)
    },
})
```

```typescript After. sdkPayments.transactionStatus theme={"theme":{"light":"github-dark","dark":"github-dark-dimmed"}}
const sdkPayments = await SdkPayments.initialize('your-public-api-key')

await sdkPayments.transactionStatus({
    checkoutSession: 'session-from-backend',
    countryCode: 'CO',           // optional
    language: 'en',              // optional
    elementSelector: '#status',  // required
})
```

## 变更内容

按您编辑代码的顺序分组。**重命名**：作用相同，名称变化。**移动**：值相同，归属对象变化。**移除**：无需调用任何内容。**新增**：没有旧版对应项。最后一列是重命名之外您唯一需要做的事。

### 初始化和配置

| 状态 | 统一 API | 变更 | 操作 |
| - | - | - | - |
| `window.Yuno.initialize(publicApiKey)` | `SdkPayments.initialize(publicApiKey)` | 重命名 | 全局对象是 `window.SdkPayments`。与之前一样，对它使用 `await`：它会解析为 `SdkPayments` 实例。 |
| `checkoutSession` | `checkoutSession` | 移动 | 相同。必填。 |
| `countryCode` | `countryCode?` | 移动 | 现在为可选。 |
| `language` | `language?` | 移动 | 现在为可选。 |
| *（默认容器）* | `elementSelector` | 新增 | 现在为必填：您传入要渲染到的元素的 CSS 选择器，而不是依赖 SDK 的默认容器。 |

### Callback

| 状态 | 统一 API | 变更 | 操作 |
| - | - | - | - |
| `paymentResult(data)` | *（已移除）* | 移除 | 该页面渲染结果，仅用于显示。请在服务端通过 [webhooks](https://docs.y.uno/zh-hans/docs/webhooks.md) 或支付 API 确认结果，并将其作为履约的可信来源；在 `Transaction` 内，最终状态会在 [`onStatus`](https://docs.y.uno/zh-hans/docs/yuno-sdk/controllers/on-status) 中返回。 |

### 入口点

| 状态 | 统一 API | 变更 | 操作 |
| - | - | - | - |
| `yuno.mountStatusPayment({...})` | `sdkPayments.transactionStatus({...})` | 重命名 | `SdkPayments` 上的顶层方法，不在 `Transaction` 上：它是独立操作，不属于交易生命周期。返回 `Promise<void>`。 |

## 相关内容

* [`onStatus`](https://docs.y.uno/zh-hans/docs/yuno-sdk/controllers/on-status)。在 `Transaction` 内接收最终状态。
* [快速入门](https://docs.y.uno/zh-hans/docs/yuno-sdk/get-started.md)。完整的集成演练。


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