Domain name for API request: billing.tencentcloudapi.com.
This API is used to get bill details by product, project, region, billing mode, and tag by passing in parameters.
A maximum of 20 requests can be initiated per second for this API.
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: DescribeBillSummary. |
Version | Yes | String | Common Params. The value used for this API: 2018-07-09. |
Region | No | String | Common Params. This parameter is not required. |
Month | Yes | String | Bill month in the format of "yyyy-mm" |
GroupType | Yes | String | Bill dimension. Valid values: business , project , region , payMode , and tag |
TagKey.N | No | Array of String | Tag key, which is used when GroupType is tag . |
Parameter Name | Type | Description |
---|---|---|
Ready | Integer | Indicates whether the data is ready. 0 : Not ready. 1 : Ready. If Ready is 0 , it indicates that the current UIN is initializing billing for the first time. Wait for 5-10 minutes and try again. |
SummaryDetail | Array of SummaryDetail | Detailed summary of costs by multiple dimensions |
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. |
This example shows you how to get bill details by region.
POST / HTTP/1.1
Host: billing.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: DescribeBillSummary
<Common request parameters>
{
"Month": "2023-04",
"GroupType": "region"
}
{
"Response": {
"Ready": 1,
"RequestId": "a93087e2-c03a-4058-b09b-0ecc8dd493cb",
"SummaryDetail": [
{
"Business": [
{
"BusinessCode": "p_rav",
"BusinessCodeName": "Tencent Real-Time Communication (TRTC)",
"CashPayAmount": "5661.16",
"IncentivePayAmount": "0.00",
"RealTotalCost": "5661.16",
"TotalCost": "24600.63",
"TransferPayAmount": "0.00",
"VoucherPayAmount": "0.00"
},
{
"BusinessCode": "p_cdh",
"BusinessCodeName": "CVM Dedicated Host (CDH)CDH",
"CashPayAmount": "4254.21",
"IncentivePayAmount": "0.00",
"RealTotalCost": "4254.21",
"TotalCost": "10920.00",
"TransferPayAmount": "0.00",
"VoucherPayAmount": "0.00"
}
],
"CashPayAmount": "9915.37",
"GroupKey": "1",
"GroupValue": "South China (Guangzhou)",
"IncentivePayAmount": "0.00",
"RealTotalCost": "9915.37",
"TotalCost": "35520.63",
"TransferPayAmount": "0.00",
"VoucherPayAmount": "0.00"
},
{
"Business": [
{
"BusinessCode": "p_cvm",
"BusinessCodeName": "Cloud Virtual Machine (CVM)CVM",
"CashPayAmount": "3231.21",
"IncentivePayAmount": "0.00",
"RealTotalCost": "3359.21",
"TotalCost": "9809.48",
"TransferPayAmount": "0.00",
"VoucherPayAmount": "128.00"
}
],
"CashPayAmount": "3231.21",
"GroupKey": "25",
"GroupValue": "Asia Pacific (Japan)",
"IncentivePayAmount": "0.00",
"RealTotalCost": "3359.21",
"TotalCost": "9809.48",
"TransferPayAmount": "0.00",
"VoucherPayAmount": "128.00"
},
{
"Business": [
{
"BusinessCode": "p_dcdb",
"BusinessCodeName": "TDSQL for MySQL",
"CashPayAmount": "2094.29",
"IncentivePayAmount": "0.00",
"RealTotalCost": "2094.29",
"TotalCost": "4915.20",
"TransferPayAmount": "0.00",
"VoucherPayAmount": "0.00"
}
],
"CashPayAmount": "2094.29",
"GroupKey": "11",
"GroupValue": "South China (Shenzhen Finance)",
"IncentivePayAmount": "0.00",
"RealTotalCost": "2094.29",
"TotalCost": "4915.20",
"TransferPayAmount": "0.00",
"VoucherPayAmount": "0.00"
}
]
}
}
This example shows you how to get bill details by project.
POST / HTTP/1.1
Host: billing.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: DescribeBillSummary
<Common request parameters>
{
"Month": "2023-04",
"GroupType": "project"
}
{
"Response": {
"Ready": 1,
"RequestId": "8e0a185f-a64c-4dca-ba23-ba8778d5ef6f",
"SummaryDetail": [
{
"Business": [
{
"BusinessCode": "p_rav",
"BusinessCodeName": "Tencent Real-Time Communication (TRTC)",
"CashPayAmount": "5661.16",
"IncentivePayAmount": "0.00",
"RealTotalCost": "5661.16",
"TotalCost": "24600.63",
"TransferPayAmount": "0.00",
"VoucherPayAmount": "0.00"
},
{
"BusinessCode": "p_cdh",
"BusinessCodeName": "CVM Dedicated Host (CDH)CDH",
"CashPayAmount": "4254.20",
"IncentivePayAmount": "0.00",
"RealTotalCost": "4254.20",
"TotalCost": "10919.99",
"TransferPayAmount": "0.00",
"VoucherPayAmount": "0.00"
}
],
"CashPayAmount": "9915.36",
"GroupKey": "0",
"GroupValue": "Default project",
"IncentivePayAmount": "0.00",
"RealTotalCost": "9915.36",
"TotalCost": "35520.62",
"TransferPayAmount": "0.00",
"VoucherPayAmount": "0.00"
},
{
"Business": [
{
"BusinessCode": "p_cvm",
"BusinessCodeName": "Cloud Virtual Machine (CVM)CVM",
"CashPayAmount": "689.87",
"IncentivePayAmount": "0.00",
"RealTotalCost": "847.87",
"TotalCost": "1667.57",
"TransferPayAmount": "0.00",
"VoucherPayAmount": "158.00"
},
{
"BusinessCode": "p_eip",
"BusinessCodeName": "Public IP IP",
"CashPayAmount": "9.69",
"IncentivePayAmount": "0.01",
"RealTotalCost": "9.71",
"TotalCost": "263.25",
"TransferPayAmount": "0.00",
"VoucherPayAmount": "0.00"
},
{
"BusinessCode": "p_cbs",
"BusinessCodeName": "Cloud Block Storage (CBS)CBS",
"CashPayAmount": "3.15",
"IncentivePayAmount": "0.00",
"RealTotalCost": "3.15",
"TotalCost": "6.83",
"TransferPayAmount": "0.00",
"VoucherPayAmount": "0.00"
}
],
"CashPayAmount": "702.71",
"GroupKey": "1279809",
"GroupValue": "PCPC game",
"IncentivePayAmount": "0.01",
"RealTotalCost": "860.72",
"TotalCost": "1937.65",
"TransferPayAmount": "0.00",
"VoucherPayAmount": "158.00"
}
]
}
}
This example shows you how to get bill details by product.
POST / HTTP/1.1
Host: billing.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: DescribeBillSummary
<Common request parameters>
{
"Month": "2023-04",
"GroupType": "business"
}
{
"Response": {
"Ready": 1,
"RequestId": "db6f4a8c-c8b3-4d86-836a-b0897e772b22",
"SummaryDetail": [
{
"Business": null,
"CashPayAmount": "5661.16",
"GroupKey": "p_rav",
"GroupValue": "Tencent Real-Time Communication (TRTC)",
"IncentivePayAmount": "0.00",
"RealTotalCost": "5661.16",
"TotalCost": "24600.63",
"TransferPayAmount": "0.00",
"VoucherPayAmount": "0.00"
},
{
"Business": null,
"CashPayAmount": "4783.65",
"GroupKey": "p_cvm",
"GroupValue": "Cloud Virtual Machine (CVM)CVM",
"IncentivePayAmount": "0.00",
"RealTotalCost": "5069.65",
"TotalCost": "13178.28",
"TransferPayAmount": "0.00",
"VoucherPayAmount": "286.00"
}
]
}
}
This example shows you how to get bill details by tag.
POST / HTTP/1.1
Host: billing.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: DescribeBillSummary
<Common request parameters>
{
"Month": "2023-05",
"GroupType": "tag",
"TagKey": [
"Test key",
"Department category"
]
}
{
"Response": {
"Ready": 1,
"RequestId": "fdb44563-4a70-4c41-88a4-68b628a221a8",
"SummaryDetail": [
{
"Business": [
{
"BusinessCode": "p_tencentmeeting_saas",
"BusinessCodeName": "Tencent Meeting (SaaS)",
"CashPayAmount": "3284.27",
"IncentivePayAmount": "0.00",
"RealTotalCost": "3284.27",
"TotalCost": "7308.00",
"TransferPayAmount": "0.00",
"VoucherPayAmount": "0.00"
},
{
"BusinessCode": "p_cbs",
"BusinessCodeName": "Cloud Block Storage (CBS)CBS",
"CashPayAmount": "2583.11",
"IncentivePayAmount": "0.00",
"RealTotalCost": "2583.43",
"TotalCost": "6383.01",
"TransferPayAmount": "0.00",
"VoucherPayAmount": "0.32"
}
],
"CashPayAmount": "5867.38",
"GroupKey": "Test key",
"GroupValue": "",
"IncentivePayAmount": "0.00",
"RealTotalCost": "5867.70",
"TotalCost": "13691.01",
"TransferPayAmount": "0.00",
"VoucherPayAmount": "0.32"
},
{
"Business": [
{
"BusinessCode": "p_nat",
"BusinessCodeName": "NATNAT Gateway",
"CashPayAmount": "127.44",
"IncentivePayAmount": "0.00",
"RealTotalCost": "127.44",
"TotalCost": "188.93",
"TransferPayAmount": "0.00",
"VoucherPayAmount": "0.00"
},
{
"BusinessCode": "p_cls",
"BusinessCodeName": "Cloud Log Service (CLS)CLS",
"CashPayAmount": "0.71",
"IncentivePayAmount": "0.00",
"RealTotalCost": "0.71",
"TotalCost": "1.08",
"TransferPayAmount": "0.00",
"VoucherPayAmount": "0.00"
}
],
"CashPayAmount": "128.15",
"GroupKey": "Test key",
"GroupValue": "123456",
"IncentivePayAmount": "0.00",
"RealTotalCost": "128.15",
"TotalCost": "190.01",
"TransferPayAmount": "0.00",
"VoucherPayAmount": "0.00"
},
{
"Business": [
{
"BusinessCode": "p_tencentmeeting_saas",
"BusinessCodeName": "Tencent Meeting (SaaS)",
"CashPayAmount": "3284.27",
"IncentivePayAmount": "0.00",
"RealTotalCost": "3284.27",
"TotalCost": "7308.00",
"TransferPayAmount": "0.00",
"VoucherPayAmount": "0.00"
},
{
"BusinessCode": "p_cbs",
"BusinessCodeName": "Cloud Block Storage (CBS)CBS",
"CashPayAmount": "2583.11",
"IncentivePayAmount": "0.00",
"RealTotalCost": "2583.43",
"TotalCost": "6383.01",
"TransferPayAmount": "0.00",
"VoucherPayAmount": "0.32"
}
],
"CashPayAmount": "5867.38",
"GroupKey": "Department category",
"GroupValue": "",
"IncentivePayAmount": "0.00",
"RealTotalCost": "5867.70",
"TotalCost": "13691.01",
"TransferPayAmount": "0.00",
"VoucherPayAmount": "0.32"
},
{
"Business": [
{
"BusinessCode": "p_ckafka",
"BusinessCodeName": "TDMQCKafka",
"CashPayAmount": "1076.00",
"IncentivePayAmount": "0.00",
"RealTotalCost": "1076.00",
"TotalCost": "1076.00",
"TransferPayAmount": "0.00",
"VoucherPayAmount": "0.00"
}
],
"CashPayAmount": "1076.00",
"GroupKey": "Department category",
"GroupValue": "Purchase department",
"IncentivePayAmount": "0.00",
"RealTotalCost": "1076.00",
"TotalCost": "1076.00",
"TransferPayAmount": "0.00",
"VoucherPayAmount": "0.00"
},
{
"Business": [
{
"BusinessCode": "p_yunjing",
"BusinessCodeName": "T-Sec-Cloud Workload Protection Platform (CWPP)",
"CashPayAmount": "123.18",
"IncentivePayAmount": "0.00",
"RealTotalCost": "123.18",
"TotalCost": "180.00",
"TransferPayAmount": "0.00",
"VoucherPayAmount": "0.00"
}
],
"CashPayAmount": "123.18",
"GroupKey": "Department category",
"GroupValue": "Logistics department",
"IncentivePayAmount": "0.00",
"RealTotalCost": "123.18",
"TotalCost": "180.00",
"TransferPayAmount": "0.00",
"VoucherPayAmount": "0.00"
},
{
"Business": [
{
"BusinessCode": "p_clb",
"BusinessCodeName": "Cloud Load Balancer (CLB)CLB",
"CashPayAmount": "38.31",
"IncentivePayAmount": "0.00",
"RealTotalCost": "38.31",
"TotalCost": "112.20",
"TransferPayAmount": "0.00",
"VoucherPayAmount": "0.00"
},
{
"BusinessCode": "p_cos",
"BusinessCodeName": "COS Cloud Object Storage (COS)",
"CashPayAmount": "0.00",
"IncentivePayAmount": "0.00",
"RealTotalCost": "0.00",
"TotalCost": "0.00",
"TransferPayAmount": "0.00",
"VoucherPayAmount": "0.00"
}
],
"CashPayAmount": "38.31",
"GroupKey": "Department category",
"GroupValue": "Business department",
"IncentivePayAmount": "0.00",
"RealTotalCost": "38.31",
"TotalCost": "112.20",
"TransferPayAmount": "0.00",
"VoucherPayAmount": "0.00"
},
{
"Business": [
{
"BusinessCode": "p_cvm",
"BusinessCodeName": "Cloud Virtual Machine (CVM)CVM",
"CashPayAmount": "-43.67",
"IncentivePayAmount": "0.00",
"RealTotalCost": "-43.67",
"TotalCost": "-43.67",
"TransferPayAmount": "0.00",
"VoucherPayAmount": "0.00"
}
],
"CashPayAmount": "-43.67",
"GroupKey": "Department category",
"GroupValue": "Finance department",
"IncentivePayAmount": "0.00",
"RealTotalCost": "-43.67",
"TotalCost": "-43.67",
"TransferPayAmount": "0.00",
"VoucherPayAmount": "0.00"
}
]
}
}
This example shows you how to get bill details by billing mode.
POST / HTTP/1.1
Host: billing.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: DescribeBillSummary
<Common request parameters>
{
"Month": "2023-04",
"GroupType": "payMode"
}
{
"Response": {
"Ready": 1,
"RequestId": "9ddf63cd-89ce-4a0e-9332-7402926fe1a1",
"SummaryDetail": [
{
"Business": [
{
"BusinessCode": "p_rav",
"BusinessCodeName": "Tencent Real-Time Communication (TRTC)",
"CashPayAmount": "5661.16",
"IncentivePayAmount": "0.00",
"RealTotalCost": "5661.16",
"TotalCost": "24600.63",
"TransferPayAmount": "0.00",
"VoucherPayAmount": "0.00"
},
{
"BusinessCode": "p_cvm",
"BusinessCodeName": "Cloud Virtual Machine (CVM)CVM",
"CashPayAmount": "4780.18",
"IncentivePayAmount": "0.00",
"RealTotalCost": "5066.18",
"TotalCost": "13111.78",
"TransferPayAmount": "0.00",
"VoucherPayAmount": "286.00"
}
],
"CashPayAmount": "10441.34",
"GroupKey": "prePay",
"GroupValue": "Monthly subscription",
"IncentivePayAmount": "0.00",
"RealTotalCost": "10727.34",
"TotalCost": "37712.41",
"TransferPayAmount": "0.00",
"VoucherPayAmount": "286.00"
},
{
"Business": [
{
"BusinessCode": "p_edgeone",
"BusinessCodeName": "Tencent Cloud EdgeOne",
"CashPayAmount": "1205.63",
"IncentivePayAmount": "0.00",
"RealTotalCost": "1205.63",
"TotalCost": "2706.77",
"TransferPayAmount": "0.00",
"VoucherPayAmount": "0.00"
},
{
"BusinessCode": "p_nat",
"BusinessCodeName": "NATNAT Gateway",
"CashPayAmount": "1145.13",
"IncentivePayAmount": "1.72",
"RealTotalCost": "1146.85",
"TotalCost": "1700.27",
"TransferPayAmount": "0.00",
"VoucherPayAmount": "0.00"
}
],
"CashPayAmount": "2350.76",
"GroupKey": "postPay",
"GroupValue": "Pay-as-you-go",
"IncentivePayAmount": "1.72",
"RealTotalCost": "2352.48",
"TotalCost": "4407.04",
"TransferPayAmount": "0.00",
"VoucherPayAmount": "0.00"
}
]
}
}
TencentCloud API 3.0 integrates SDKs that support various programming languages to make it easier for you to call APIs.
The following only lists the error codes related to the API business logic. For other error codes, see Common Error Codes.
Error Code | Description |
---|---|
FailedOperation.TagKeyNotExist | This cost allocation tag key does not exist. |
InternalError | Internal error. |
InternalError.GatewayError | Gateway error. |
InvalidParameter | Invalid parameter. |
InvalidParameterValue | Invalid parameter value. |
문제 해결에 도움이 되었나요?