# Top up (billing)

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

Create a top-up invoice for the account.

## HTTP request

| Item | Value |
| --- | --- |
| URL | `https://api.tino.vn/v1/billing/addfunds` |
| 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 |
| --- | --- | --- | --- | --- |
| `funds` | body | integer | no | Amount of money |
| `gateway` | body | integer | no | Payment Method |

## Example request

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

`$TINO_TOKEN` is a token with the scope `billing:write`.

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

## Example response

```json
{
 "success": true,
 "invoice_id": "1201937",
 "info": [
  "An invoice add credits have created"
 ]
}
```

Live sample from a test account with personal data masked; long arrays and strings are trimmed (`… N more item(s)`, `… N more line(s)`).
