# Nạp tiền

`POST /v1/addfunds` · quyền `billing:write`

Tạo hoá đơn nạp tiền vào tài khoản; `gateway` lấy từ `GET /v1/addfunds`.

## HTTP request

| Mục | Giá trị |
| --- | --- |
| URL | `https://api.tino.vn/v1/addfunds` |
| Method | `POST` |
| Quyền (scope) | `billing:write` |
| Header | `Authorization: Bearer <token>` |
| Content-Type | `application/json` |
| Token gọi được | token ứng dụng (`tinoat_`), token API cá nhân (`tinopat_`) |

## Tham số

| Tên | Vị trí | Kiểu | Bắt buộc | Mô tả |
| --- | --- | --- | --- | --- |
| `amount` | body | number | không | Amount to add to account |
| `gateway` | body | number | không | Payment gateway ID, use `GET /addfunds` to list available gateways |

## Example request

```bash
curl -X POST "https://api.tino.vn/v1/addfunds" \
  -H "Authorization: Bearer $TINO_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "amount": "100.00",
  "gateway": "<gateway>"
}'
```

`$TINO_TOKEN` là token có quyền `billing:write`.

SDK ([SDK & Ví dụ](/docs/sdk)): Python `client.billing.add_funds_legacy(amount=...)`, Node.js `await client.billing.addFundsLegacy({ amount: ... });`, PHP `$client->billing->addFundsLegacy(['amount' => ...]);`.

## Example response

```json
{
 "success": true,
 "invoice_id": 1201937
}
```

Mẫu thật từ tài khoản thử, đã che dữ liệu cá nhân; mảng và chuỗi dài được rút gọn (`… N more item(s)`, `… N more line(s)`).
