tencent cloud



Last updated: 2022-08-25 10:14:19

1. API Description

Domain name for API request: cdn.tencentcloudapi.com.

This API (DescribePayType) is used to query billing information of the current account, such as billing mode and billing cycle.

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: DescribePayType.
Version Yes String Common Params. The value used for this API: 2018-06-06.
Region No String Common Params. This parameter is not required for this API.
Area No String Specifies a service region.
mainland: queries billing methods within Mainland China;
overseas: queries billing methods outside Mainland China.
Default value: mainland.
Product No String Specifies the product to query, either cdn (default) or ecdn.

3. Output Parameters

Parameter Name Type Description
PayType String Billing modes:
flux: Bill by traffic
bandwidth: Bill by bandwidth
request: Bill by the number of requests
flux_sep: Disused field
bandwidth_sep: Disused field
When you change a daily billing mode to another, and there is network usage on the day of change, this field shows the new billing mode, which takes effect from the next day. If there is no network usage on the day of change, this field shows the new billing mode directly.
BillingCycle String Billing cycle:
day: Daily
month: Monthly
hour: Hourly
StatType String monthMax: Billed by the monthly average of daily peak traffic (monthly settlement)
day95: Billed by the daily 95th percentile bandwidth (monthly settlement)
month95: Billed by the monthly 95th percentile bandwidth (monthly settlement)
sum: Billed by the total traffic/total requests (daily or monthly settlement)
max: Billed by the peak bandwidth (daily settlement)
RegionType String Billing method for regions outside the Chinese mainland:
all: Unified billing for all regions
multiple: Region-specific billing
CurrentPayType String The current billing mode in effect:
flux: Billed by traffic
bandwidth: Billed by bandwidth
request: Billed by the number of requests
flux_sep: Disused field
bandwidth_sep: Disused field
RequestId String The unique request ID, which is returned for each request. RequestId is required for locating a problem.

4. Example

Example1 Querying billing mode

Input Example

&<Common request parameters>

Output Example

    "Response": {
        "RequestId": "1732a0dd-48d8-4ff1-8dcb-7f04ca139825",
        "PayType": "flux",
        "StatType": "sum",
        "BillingCycle": "day",
        "RegionType": "all",
        "CurrentPayType": "flux"

5. Developer Resources


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.CdnDbError Internal data error. Please submit a ticket for troubleshooting.
InternalError.CdnSystemError System error. Please submit a ticket for troubleshooting.
InternalError.DataSystemError Error with the data query. Please submit a ticket for troubleshooting.
InvalidParameter.CdnInterfaceError Internal API error. Please submit a ticket for troubleshooting.
InvalidParameter.CdnParamError Parameter error. Please see the sample parameters in the documentation.
InvalidParameter.EcdnInterfaceError API internal error. Please try again or contact the customer service for assistance.
ResourceNotFound.CdnUserNotExists The CDN service has not been activated. Please activate it first before using this API.
UnauthorizedOperation.CdnUserNoWhitelist You are not in the beta whitelist and thus have no permission to use this function.
UnauthorizedOperation.OperationTooOften Too many calling attempts.
Contact Us

Contact our sales team or business advisors to help your business.

Technical Support

Open a ticket if you're looking for further assistance. Our Ticket is 7x24 avaliable.

7x24 Phone Support