# Redeem top-up code

`POST /v1/billing/creditvoucher` · scope `billing:write`

Add credit with a voucher code.

## HTTP request

| Item | Value |
| --- | --- |
| URL | `https://api.tino.vn/v1/billing/creditvoucher` |
| Method | `POST` |
| Scope | `billing:write` |
| Header | `Authorization: Bearer <token>` |
| Content-Type | `application/json` |
| Tokens that can call it | app tokens (`tinoat_`), personal API tokens (`tinopat_`) |

## Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `code` | body | string | no | 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` is a token with the scope `billing:write`.

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

## Example response

No live sample: the route changes real data or the test account has no data for it. The answer is a JSON object; errors follow the common shape in [Calling the Tino API](/en/docs/api#errors).
