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

> 将 Yuno Web SDK 从 v1.4 升级到 v1.5.0，包括 Lite SDK 的 mountExternalButtons 变更

# 迁移到 Web SDK v1.5

1.5.0 版本更改了 Google Pay 和 Apple Pay 在 **Lite SDK** 中的渲染方式。Full SDK 集成不受影响。

## 变更内容

在 v1.5.0 中，Lite SDK 用户必须显式调用 `mountExternalButtons()` 来渲染 Google Pay 和 Apple Pay 按钮。这些支付方式不再自动作为单选按钮渲染在支付方式列表中。

Full SDK 集成**没有破坏性变更**：Google Pay 和 Apple Pay 将自动显示为直接按钮而不是单选按钮，无需更改代码。

## 受影响的用户

* **Lite SDK 用户**：需要执行操作（见下方步骤）
* **Full SDK 用户**：无需执行操作

## 步骤（仅限 Lite SDK）

### 更新脚本标签

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

### 为钱包按钮添加 HTML 元素

在您的 HTML 中要显示按钮的位置添加容器元素：

```html theme={"theme":{"light":"github-dark","dark":"github-dark-dimmed"}}
<div id="apple-pay"></div>
<div id="google-pay"></div>
```

### 在 `startCheckout` 之后调用 `mountExternalButtons()`

**之前**：

```js theme={"theme":{"light":"github-dark","dark":"github-dark-dimmed"}}
// Lite SDK — wallet buttons rendered automatically
await yuno.startCheckout({ checkoutSession, countryCode, elementSelector: '#root' })
```

**之后**：

```js theme={"theme":{"light":"github-dark","dark":"github-dark-dimmed"}}
// Explicitly mount wallet buttons after startCheckout
await yuno.startCheckout({ checkoutSession, countryCode, elementSelector: '#root' })

await yuno.mountExternalButtons([
  {
    paymentMethodType: 'APPLE_PAY',
    elementSelector: '#apple-pay',
  },
  {
    paymentMethodType: 'GOOGLE_PAY',
    elementSelector: '#google-pay',
  },
])
```

### 按需卸载按钮（可选）

卸载单个按钮：

```js theme={"theme":{"light":"github-dark","dark":"github-dark-dimmed"}}
yuno.unmountExternalButton('APPLE_PAY')
```

一次性卸载所有外部按钮：

```js theme={"theme":{"light":"github-dark","dark":"github-dark-dimmed"}}
yuno.unmountAllExternalButtons()
```


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