> ## 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 SDK：迁移到 v1.2

> 在您的 checkout 中将 Yuno Web SDK 从 v1.1 升级到 v1.2.0

# 迁移到 Web SDK v1.2

1.2.0 版本是**非破坏性**版本，现有 v1.1 集成无需任何更改。

## 变更内容

### `Yuno.initialize()` 中的可选 `options` 参数

`Yuno.initialize()` 现在接受可选的 `options` 配置对象作为第二个参数。不带该参数的现有调用无需修改，仍可正常工作。

```js theme={"theme":{"light":"github-dark","dark":"github-dark-dimmed"}}
// v1.1 — still valid in v1.2
const yuno = await Yuno.initialize(publicApiKey)

// v1.2 — optional options parameter
const yuno = await Yuno.initialize(publicApiKey, {
  // additional options here
})
```

### `continuePayment` 的扩展参数

`continuePayment()` 现在接受更多可选参数：`checkoutSession`、`showPaymentStatus`、`yunoPaymentResult`、`yunoError`、`countryCode` 和 `language`。所有参数均为可选，参数较少的现有调用仍可正常工作。

```js theme={"theme":{"light":"github-dark","dark":"github-dark-dimmed"}}
// v1.1 usage — still valid in v1.2
await yuno.continuePayment()

// v1.2 — additional optional params available
await yuno.continuePayment({
  checkoutSession,
  showPaymentStatus: true,
  yunoPaymentResult,
  yunoError,
  countryCode: 'US',
  language: 'en',
})
```

## 步骤

### 更新脚本标签

```html theme={"theme":{"light":"github-dark","dark":"github-dark-dimmed"}}
<script src="https://sdk-web.y.uno/v1.2/main.js"></script>
```

### 采用新参数（可选）

无需更改代码。如果您想使用新的可选参数，请按上文所示更新您的 `initialize()` 和 `continuePayment()` 调用。

## 检查清单

* [ ] 已将脚本标签更新到 v1.2
* [ ] 已按需为 `Yuno.initialize()` 添加 `options` 参数（可选）
* [ ] 已按需为 `continuePayment()` 添加更多参数（可选）


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