# Mua và kích hoạt Cloud Phone theo tháng

Mua và kích hoạt từ 1 đến 10 Cloud Phone theo tháng trong 30 ngày.
- **Cảnh báo tính phí**: **thao tác này thực sự trừ số dư của nhóm.**
- **Quyền**: thành viên phải có quyền **Quản lý chi phí/thanh toán**, nếu không sẽ trả `99012`.
- **Tạo trước**: dùng [`/cloudphone/create`](./open-api.yaml#operation/createUsingPOST); bước tạo chỉ sinh bản ghi chưa kích hoạt và không tính phí.
- **Quy tắc chọn**: ID phải khác nhau, thuộc nhóm và dùng sản phẩm 30 ngày còn hiệu lực. Có thể trộn các SKU theo tháng. Trạng thái hoặc đơn hàng không tương thích, đơn đang chờ từ ứng dụng và mua đồng thời sẽ từ chối toàn bộ yêu cầu.
- **Tính phí và khôi phục**: xác thực và tính phí là toàn bộ hoặc không gì cả. Nếu cùng một đơn đã thanh toán, hệ thống khôi phục quyền hiện có và không thu lại. Local API, Open API và ứng dụng dùng chung trạng thái đơn.
- **Hoàn tất**: xác nhận 30 ngày cho tất cả; không bật máy và không bật tự động gia hạn.
- **Chưa xác nhận kích hoạt**: với `33422`, `data.results` vẫn đầy đủ và đúng thứ tự. Kiểm tra `status`, `expireTime`, `errorCode`.
- **Thử lại**: sau timeout, truy vấn [`/cloudphone/info`](./open-api.yaml#operation/infoUsingPOST) hoặc [`/cloudphone/page`](./open-api.yaml#operation/pageUsingPOST).

Lỗi đã ghi nhận: `20002`, `20003`, `20004`, `20008`, `20041`, `20055`, `20068`, `20070`, `20071`, `33420`, `33421`, `33422`, `99001`, `99002`, `99012`. Xem [Error Codes](../Getting%20Started/error-codes.md).

Endpoint: POST /cloudphone/monthly/activate
Version: 2026-09-05
Security: Authorization

## Security:

  - `Authorization` (unknown)
    http bearer JWT

## Request fields (application/json):

  - `ids` (array, required)
    One to ten distinct positive Cloud Phone IDs, encoded as strings to preserve 64-bit precision

## Response 200:

  - `200` (unknown)
    Request processed; inspect `code`, and inspect `data.results` when returned

## Response 200 fields (application/json):

  - `code` (integer, required)
    Business result code; `0` indicates success
    Example: 0

  - `msg` (string | null, required)
    Error message; null when successful
    Example: null

  - `requestId` (string, required)
    Request ID for troubleshooting
    Example: 1d4f3ea968664593860b94b35d4ebf5e

  - `data` (object)

  - `data.orderId` (string, required)
    Paid balance-order ID

  - `data.orderStatus` (integer, required)
    Order status; 1 means completed
    Enum: "1"

  - `data.results` (array, required)
    One result per requested ID, in request order

  - `data.results.id` (string, required)
    Cloud Phone ID

  - `data.results.status` (string, required)
    Activation result
    Enum: "ACTIVATED", "FAILED", "UNKNOWN"

  - `data.results.expireTime` (string | null)
    Unix time in milliseconds; present for a successful activation

  - `data.results.errorCode` (integer | null)
    Business error code for a failed item

