> ## Documentation Index
> Fetch the complete documentation index at: https://developers-sandbox.uqpaytech.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# 为发卡账户余额充值

> 为发卡账户余额充值，并管理 Single 和 Share 模式下的卡级余额。

卡片可以交易之前，你的发卡账户余额必须有充足资金。资金流向取决于卡模式：

* **Share mode** —— 交易直接从发卡账户余额扣款。卡片的 `card_limit` 作为消费上限。
* **Single mode** —— 创建卡片时，资金从发卡账户余额转入卡片。卡片使用自己独立的预付余额。

## 为发卡账户余额充值

通过商户后台将 Banking 或 Crypto 余额中的资金转入发卡账户余额。

> [accordion] 控制台：为主发卡账户充值
>
> 1. 在商户后台打开 **Cards**，停留在 **Overview** 标签页。
> 2. 选择 **Deposit**。只有账户拥有有效的发卡余额和所需权限时，该按钮才可用。
> 3. 选择资金来源：**Banking** 或 **Crypto**。商户后台只显示来源余额和发卡余额共同支持的币种。
> 4. 输入金额，检查手续费和扣款总额，然后确认转账。

## 主账户与子账户之间的转账

如果你使用了子账户，可以在主发卡账户和子账户之间转账。

**通过 API：** 使用 [Create Issuing Transfer](https://developers-sandbox.uqpaytech.com/docs/zh/card-issuance/v1.6/api-reference/create-issuing-transfer.md) 接口：

```bash theme={null}
curl -X POST https://api-sandbox.uqpaytech.com/api/v1/issuing/transfers \
  -H "x-auth-token: YOUR_API_TOKEN" \
  -H "x-idempotency-key: $(uuidgen | tr '[:upper:]' '[:lower:]')" \
  -H "Content-Type: application/json" \
  -d '{
    "source_account_id": "main-account-uuid",
    "destination_account_id": "sub-account-uuid",
    "amount": 5000,
    "currency": "USD"
  }'
```

> [accordion] 控制台：账户间转账
>
> 1. 打开 **Cards**，从 **Quick actions** 中选择 **Transfer**。只有账户已启用内部发卡转账时，该入口才会显示。
> 2. 选择来源账户、目标账户和双方共同支持的币种。
> 3. 输入金额并创建转账。

## 查询发卡账户余额

使用 [Retrieve Issuing Balance](https://developers-sandbox.uqpaytech.com/docs/zh/card-issuance/v1.6/api-reference/retrieve-issuing-balance.md) 或 [List Issuing Balances](https://developers-sandbox.uqpaytech.com/docs/zh/card-issuance/v1.6/api-reference/list-issuing-balances.md) 接口查询当前余额。

```bash theme={null}
curl "https://api-sandbox.uqpaytech.com/api/v1/issuing/balances?page_number=1&page_size=10" \
  -H "x-auth-token: YOUR_API_TOKEN" \
  -H "Content-Type: application/json"
```

## 管理卡级余额

### 卡片充值

使用 [Card Recharge](https://developers-sandbox.uqpaytech.com/docs/zh/card-issuance/v1.6/api-reference/card-recharge.md) 接口为卡片充值。

* **Single mode**：把资金从发卡账户余额转入卡片。
* **Share mode**：增加 `card_available_balance`，但不实际转移资金。

```bash theme={null}
curl -X POST https://api-sandbox.uqpaytech.com/api/v1/issuing/cards/{card_id}/recharge \
  -H "x-auth-token: YOUR_API_TOKEN" \
  -H "x-idempotency-key: $(uuidgen | tr '[:upper:]' '[:lower:]')" \
  -H "Content-Type: application/json" \
  -d '{"amount": "500"}'
```

完成后会触发一次 `card.recharge.succeeded` [webhook](https://developers-sandbox.uqpaytech.com/docs/zh/card-issuance/v1.6/webhooks/card-recharged.md)。

### 从卡片提现

使用 [Card Withdraw](https://developers-sandbox.uqpaytech.com/docs/zh/card-issuance/v1.6/api-reference/card-withdraw.md) 接口从卡片提现。

* **Single mode**：把资金从卡片退回发卡账户余额。
* **Share mode**：减少 `card_available_balance`。

```bash theme={null}
curl -X POST https://api-sandbox.uqpaytech.com/api/v1/issuing/cards/{card_id}/withdraw \
  -H "x-auth-token: YOUR_API_TOKEN" \
  -H "x-idempotency-key: $(uuidgen | tr '[:upper:]' '[:lower:]')" \
  -H "Content-Type: application/json" \
  -d '{"amount": "200"}'
```

完成后会触发一次 `card.withdraw.succeeded` [webhook](https://developers-sandbox.uqpaytech.com/docs/zh/card-issuance/v1.6/webhooks/card-withdraw.md)。

## 相关链接

* [核心概念](https://developers-sandbox.uqpaytech.com/docs/zh/card-issuance/v1.6/guide/core-concepts.md) —— Single 与 Share 模式的资金差异
* [Card Recharged webhook](https://developers-sandbox.uqpaytech.com/docs/zh/card-issuance/v1.6/webhooks/card-recharged.md)
* [Card Withdraw webhook](https://developers-sandbox.uqpaytech.com/docs/zh/card-issuance/v1.6/webhooks/card-withdraw.md)
* [List Issuing Balances API](https://developers-sandbox.uqpaytech.com/docs/zh/card-issuance/v1.6/api-reference/list-issuing-balances.md)


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