Last updated: 2022-01-20 10:10:17

1. API Description

Domain name for API request:

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.
This document describes the parameters for Signature V1. It's recommended to use the V3 signature, which provides higher security. Note that for Signature V3, the common parameters need to be placed in the HTTP Header. See details.

Parameter Name Required Type Description
Action Yes String Common parameter. The value used for this API: DescribePayType.
Version Yes String Common parameter. The value used for this API: 2018-06-06.
Region No String Common parameter. 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-request
In case the billing mode is changed in the day, if there is bandwidth consumption occurred in the current day, the billing mode returned is the new billing mode for the next day. If no bandwidth consumption occurs, it indicates the current billing mode.
BillingCycle String Billing cycle:
day: daily settlement
month: monthly settlement
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 outside Mainland China:
all: unified billing for all regions
multiple: separate billing for different regions
CurrentPayType String The current billing mode in effect:
flux: bill-by-traffic
bandwidth: bill-by-bandwidth
request: bill-by-request
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.
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.