# Billing

Hoá đơn, báo giá, số dư, nạp tiền và thanh toán.

Mọi route gọi qua gateway `https://api.tino.vn/v1` với `Authorization: Bearer <token>`; xem [Gọi API Tino](/docs/api).

## Hoá đơn & thanh toán

| Method | Đường dẫn | Tên | Quyền |
| --- | --- | --- | --- |
| `GET` | `/v1/addfunds` | [Thông tin nạp tiền](/docs/api/get-addfunds) | `billing:read` |
| `POST` | `/v1/addfunds` | [Nạp tiền](/docs/api/post-addfunds) | `billing:write` |
| `GET` | `/v1/balance` | [Số dư tài khoản](/docs/api/get-balance) | `billing:read` |
| `GET` | `/v1/billing/@invoice_id/pay/@gateway_id` | [Link thanh toán hoá đơn](/docs/api/get-billing-invoice-id-pay-gateway-id) | `billing:write` |
| `POST` | `/v1/billing/addfunds` | [Nạp tiền (billing)](/docs/api/post-billing-addfunds) | `billing:write` |
| `GET` | `/v1/billing/creditlogs` | [Lịch sử số dư tín dụng](/docs/api/get-billing-creditlogs) | `billing:read` |
| `POST` | `/v1/billing/creditvoucher` | [Dùng mã nạp tiền](/docs/api/post-billing-creditvoucher) | `billing:write` |
| `GET` | `/v1/estimate/@id/pdf` | [Tải PDF báo giá](/docs/api/get-estimate-id-pdf) | `billing:read` |
| `GET` | `/v1/estimates` | [Danh sách báo giá](/docs/api/get-estimates) | `billing:read` |
| `GET` | `/v1/estimates/@id` | [Chi tiết báo giá](/docs/api/get-estimates-id) | `billing:read` |
| `GET` | `/v1/invoice` | [Danh sách hoá đơn](/docs/api/get-invoice) | `billing:read` |
| `GET` | `/v1/invoice/@id` | [Chi tiết hoá đơn](/docs/api/get-invoice-id) | `billing:read` |
| `DELETE` | `/v1/invoice/@id` | [Xoá hoá đơn](/docs/api/delete-invoice-id) | `billing:write` |
| `POST` | `/v1/invoice/@id/credit` | [Trả hoá đơn bằng số dư](/docs/api/post-invoice-id-credit) | `billing:write` |
| `GET` | `/v1/invoice/@id/pdf` | [Tải PDF hoá đơn](/docs/api/get-invoice-id-pdf) | `billing:read` |
| `GET` | `/v1/invoices` | [Danh sách hoá đơn (phân trang)](/docs/api/get-invoices) | `billing:read` |
| `GET` | `/v1/invoices/due` | [Hoá đơn đến hạn](/docs/api/get-invoices-due) | `billing:read` |
| `POST` | `/v1/invoices/payall` | [Thanh toán gộp hoá đơn](/docs/api/post-invoices-payall) | `billing:write` |
| `GET` | `/v1/payment` | [Phương thức thanh toán](/docs/api/get-payment) | `billing:read` |
| `GET` | `/v1/payment/fees` | [Phí phương thức thanh toán](/docs/api/get-payment-fees) | `billing:read` |

## Đặt hàng

| Method | Đường dẫn | Tên | Quyền |
| --- | --- | --- | --- |
| `POST` | `/v1/carts` | [Tạo giỏ hàng](/docs/api/post-carts) | `orders:write` |
| `GET` | `/v1/carts/@uuid` | [Xem giỏ hàng](/docs/api/get-carts-uuid) | `orders:write` |
| `PUT` | `/v1/carts/@uuid` | [Sửa giỏ hàng](/docs/api/put-carts-uuid) | `orders:write` |
| `POST` | `/v1/carts/@uuid/confirm` | [Chốt đơn từ giỏ](/docs/api/post-carts-uuid-confirm) | `orders:write` |
| `GET` | `/v1/carts/latest` | [Giỏ hàng gần nhất](/docs/api/get-carts-latest) | `orders:write` |
| `POST` | `/v1/order` | [Đặt mua nhiều dịch vụ](/docs/api/post-order) | `orders:write` |
| `POST` | `/v1/order/@product_id` | [Đặt mua một dịch vụ](/docs/api/post-order-product-id) | `orders:write` |
| `POST` | `/v1/quote` | [Báo giá đơn hàng](/docs/api/post-quote) | `orders:write` |
