# Dùng mã nạp tiền

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

Nạp tín dụng bằng mã voucher.

## HTTP request

| Mục | Giá trị |
| --- | --- |
| URL | `https://api.tino.vn/v1/billing/creditvoucher` |
| 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ả |
| --- | --- | --- | --- | --- |
| `code` | body | string | không | Voucher Code |

## Example request

```bash
curl -X POST "https://api.tino.vn/v1/billing/creditvoucher" \
  -H "Authorization: Bearer $TINO_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "code": "<code>"
}'
```

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

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

## Example response

Chưa có mẫu thật: route thay đổi dữ liệu thật hoặc tài khoản thử không có dữ liệu cho route này. Câu trả lời là một đối tượng JSON; lỗi theo dạng chung ở [Gọi API Tino](/docs/api#loi).
