# Thanh toán gộp hoá đơn

`POST /v1/invoices/payall` · quyền `billing:write`

Thanh toán gộp các hoá đơn chọn trong `selected`; trả `invoice_id` của hoá đơn cần thanh toán.

## HTTP request

| Mục | Giá trị |
| --- | --- |
| URL | `https://api.tino.vn/v1/invoices/payall` |
| 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ả |
| --- | --- | --- | --- | --- |
| `selected` | body | array | không | selected invoice id |

## Example request

```bash
curl -X POST "https://api.tino.vn/v1/invoices/payall" \
  -H "Authorization: Bearer $TINO_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "selected": []
}'
```

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

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

## Example response

```json
{
 "invoice_id": null
}
```

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)`).
