tencent cloud

APIs

CreateTokenPlanTeamOrderAndBuy

Download
聚焦模式
字号
最后更新时间: 2026-08-25 10:02:57

1. API Description

Domain name for API request: tokenhub.intl.tencentcloudapi.com.

Purchase a package (This API is also used to reactivate and renew expired packages. The teamId of the expired package is required. After the renewal is successful, the total cycle count of the package will include historical cycles. The actual effective cycle of the package is determined by the effective time and expiration time.)

Initiate an order for a TokenPlan package and complete payment. Return the order ID and associated sub-orders and resource information upon success.

A maximum of 20 requests can be initiated per second for this API.

We recommend you to use API Explorer
Try it
API Explorer provides a range of capabilities, including online call, signature authentication, SDK code generation, and API quick search. It enables you to view the request, response, and auto-generated examples.

2. Input Parameters

The following request parameter list only provides API request parameters and some common parameters. For the complete common parameter list, see Common Request Parameters.

Parameter Name Required Type Description
Action Yes String Common Params. The value used for this API: CreateTokenPlanTeamOrderAndBuy.
Version Yes String Common Params. The value used for this API: 2026-03-22.
Region Yes String Common Params. For more information, please see the list of regions supported by the product.
ProductType Yes String

Package type. Value: enterprise (enterprise edition professional package), enterprise-auto (enterprise edition lite package).

TeamName Yes String

Package name. It can only contain Chinese, letters, digits, underscores, and hyphens. It must start with a Chinese character or a letter and end with a Chinese character, letter, or digit. The length should be 2-50 characters.

TimeSpan Yes Integer

Purchase duration. Unit: Month. It must be greater than 0, supporting 1 to 12 months.

CreditOrToken Yes Integer

Specification of the purchased package. If the package type is enterprise, the measurement unit is point; if the package type is enterprise-auto, the measurement unit is tokens.

EnableAutoRenew No Boolean

Whether to enable auto-renewal. Not enabled by default.

TeamId No String

Existing package ID (if not empty, the renewal process is performed; if empty, a new purchase is performed)

3. Output Parameters

Parameter Name Type Description
BigOrderId String

Tencent Cloud order ID. Used to associate all sub-orders under a purchase operation.

RequestId String The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.

4. Example

Example1 Successful Call

Input Example

POST / HTTP/1.1
Host: tokenhub.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: CreateTokenPlanTeamOrderAndBuy
<Common request parameters>

{
    "ProductType": "enterprise",
    "TeamName": "test-team",
    "TimeSpan": 1,
    "CreditOrToken": 500000,
    "EnableAutoRenew": false
}

Output Example

{
    "Response": {
        "BigOrderId": "big-order-id",
        "RequestId": "83c3a50c-370f-42da-bb89-8231fe73d125"
    }
}

5. Developer Resources

SDK

TencentCloud API 3.0 integrates SDKs that support various programming languages to make it easier for you to call APIs.

Command Line Interface

6. Error Code

The following only lists the error codes related to the API business logic. For other error codes, see Common Error Codes.

Error Code Description
InternalError.InternalError InternalError.InternalError
InvalidParameter.InvalidParameter InvalidParameter.InvalidParameter
InvalidParameterValue.InvalidParameterValue InvalidParameterValue.InvalidParameterValue
MissingParameter.MissingParameter MissingParameter.MissingParameter
UnauthorizedOperation.UnauthorizedOperation UnauthorizedOperation.UnauthorizedOperation

帮助和支持

本页内容是否解决了您的问题?

填写满意度调查问卷,共创更好文档体验。

文档反馈