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

# React Native Lite

> 使用 Lite SDK 实现半定制化集成，由您控制支付方式选择界面。

> [!NOTE]
>
> **This page documents a legacy SDK.** Starting a new integration? Use the [Yuno SDK](https://docs.y.uno/docs/yuno-sdk/get-started.md). Already on a legacy SDK? Follow the [migration guide](https://docs.y.uno/docs/yuno-sdk/migration/overview.md).
>
> The new **Yuno SDK** (Web v2.x, iOS v3.x, Android v3.x, React Native v2.x) replaces the Full, Lite, Seamless, Render, Headless, and Secure Fields SDKs with one API across every platform. Legacy SDKs remain supported side by side during the transition and are scheduled for deprecation in **2027**. Contact your Account Manager for migration planning.

> [!WARNING]
>
> **Orientation: Choosing Your Integration Flow**, before you begin, please review the [Official Integration Flow](https://docs.y.uno/docs/sdks/overview/understanding-flows.md).
>
> * **Standard Flow ([Full Checkout](https://docs.y.uno/docs/sdks/full-checkout/web-payments))**: Recommended for most merchants. Yuno handles the UI, security, and automatic updates for payment methods.
> * **Custom Flow (This SDK)**: Use this only if you require full control over the UX. **Note**: You will be responsible for manually handling payment statuses, 3DS transitions, and fraud routing data collection.

Lite SDK 允许您构建自己的支付方式选择页面，而 Yuno 负责处理实际的支付流程和安全性。

## 其他挂载选项

[基本支付流程](https://docs.y.uno/zh-hans/docs/sdks/additional-platforms/react-native.md#basic-payment-flow-full-checkout)会自动显示支付方式。如需更多控制，请使用以下替代方式：

### 自定义支付方式选择（`startPaymentLite`）

选择要显示的支付方式：

```typescript theme={"theme":{"light":"github-dark","dark":"github-dark-dimmed"}}
// 1. Fetch available methods
const methods = await fetchPaymentMethods(sessionId);

// 2. Display in your UI
// 3. Start payment with selected method

await YunoSdk.startPaymentLite(
  {
    checkoutSession: session.checkoutSession,
    methodSelected: {
      paymentMethodType: selectedMethod, // 'CARD', 'PIX', etc.
      vaultedToken: null, // or saved token
    },
    showPaymentStatus: true,
  },
  'US' // Optional country code override
);
```

### 简化流程（`startPaymentSeamlessLite`）

与 Lite 类似，但会自动创建支付：

```typescript theme={"theme":{"light":"github-dark","dark":"github-dark-dimmed"}}
await YunoSdk.startPaymentSeamlessLite({
  checkoutSession: session.checkoutSession,
  methodSelected: {
    paymentMethodType: 'CARD',
    vaultedToken: null, // or saved token
  },
  showPaymentStatus: true,
  countryCode: 'US',
});
```

## 存储令牌支付

使用已保存的支付方式，获得更快的 checkout 体验。

```typescript theme={"theme":{"light":"github-dark","dark":"github-dark-dimmed"}}
await YunoSdk.startPaymentLite({
  checkoutSession: session.checkoutSession,
  methodSelected: {
    paymentMethodType: 'CARD',
    vaultedToken: 'vtok_saved_card_123',
  },
  showPaymentStatus: true,
});
```

## 参数

| 参数 | 描述 |
| - | - |
| `checkoutSession` | 来自您 backend 的结账会话 ID。 |
| `methodSelected.paymentMethodType` | 支付方式类型（例如 `CARD`、`PIX`）。 |
| `methodSelected.vaultedToken` | 已保存支付方式的令牌，新卡则为 `null`。 |
| `showPaymentStatus` | 为 `true` 时，SDK 会显示支付结果界面。 |
| `countryCode` | 可选的 ISO 国家代码覆盖值（例如 `US`）。 |


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