tencent cloud

费用中心

动态与公告
产品动态
产品公告
计费说明
计费方式
账户冻结说明
余额预警指引
云服务退货说明
购买模式
包年包月模式产品列表
购买指南
购买
支付方式
银企直连专属账号打款功能说明
充值流程说明
预付费产品付款方式
后付费账户支付
自动付款功能
收支明细
代金券
节省计划
续费管理
账单管理
账单查看
账单介绍
账单字段说明
用量明细
账单导出中心
账单订阅
账单存储至 COS 桶
计费 CAM 权限设置指引
线上自助开票功能说明
税务管理
FOCUS 1.0
FOCUS 1.0 差异说明
成本管理
消耗账单介绍
消耗功能说明
异常检测
消耗账单字段说明
成本分析
预算管理
分账管理
分账单元
分账账单
分账标签
分账回溯
API 文档
API Category
Funds Management APIs
Order Management APIs
Resource Management APIs
Bill Management APIs
Cost Allocation Management APIs
Cost Management APIs
Making API Requests
Organization Account APIs
Data Types
Error Codes
常见问题
账单常见问题
代金券常见问题
续费常见问题

DescribeBillDetail

PDF
聚焦模式
字号
最后更新时间: 2026-03-26 14:28:04

1. API Description

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

u200cThis API is used to get bill details.
Note:

  1. The API request may fail due to network instability or other exceptions. In this case, we recommend you manually retry the request when the API request fails.
    2.If the volume of your bill data is high (for example, if over 200 thousand bill entries are generated for a month), bill data query via APIs may be slow. We recommend you enable bill storage so that you can obtain bill files from COS buckets for analysis. For details, see Saving Bills to COS.

A maximum of 5 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: DescribeBillDetail.
Version Yes String Common Params. The value used for this API: 2018-07-09.
Region No String Common Params. This parameter is not required.
Offset Yes Integer Offset
Limit Yes Integer Quantity, maximum is 300
Month No String Month; format: yyyy-mm. You only have to enter either Month or BeginTime and EndTime. When you enter values for BeginTime and EndTime, Month becomes invalid. This value must be no earlier than the month when Bill 2.0 is activated; last 24 months data are available.
BeginTime No String The start time of the query range, which should be in the format Y-m-d H:i:s . The query range must be in the last 18 months and cannot be earlier than May 2018 (when Bill 2.0 was introduced). The start time and end time must be in the same month.

Example: tccli billing DescribeBillDetail --cli-unfold-argument --Offset 1 --Limit 100 --BeginTime '2023-04-01 12:05:15' --EndTime '2023-04-18 12:00:10' --ProjectId 1000000731 --version "2018-07-09"

Alternatively, you can use Month to query the billing details of a month.
Example:
ccli billing DescribeBillDetail --cli-unfold-argument --Offset 1 --Limit 100 --Month 2023-04 --version "2018-07-09" --ResourceId "disk-oj9okstm"
EndTime No String The end time of the query range, which should be in the format Y-m-d H:i:s. The query range must be in the last 18 months and cannot be earlier than May 2018 (when Bill 2.0 was introduced). The start time and end time must be in the same month.

Example: tccli billing DescribeBillDetail --cli-unfold-argument --Offset 1 --Limit 100 --BeginTime '2023-04-01 12:05:15' --EndTime '2023-04-18 12:00:10' --ProjectId 1000000731 --version "2018-07-09"

Alternatively, you can use Month to query the billing details of a month.
Example:
ccli billing DescribeBillDetail --cli-unfold-argument --Offset 1 --Limit 100 --Month 2023-04 --version "2018-07-09" --ResourceId "disk-oj9okstm"
NeedRecordNum No Integer Indicates whether or not the total number of records of accessing the list is required, used for frontend pages.
1 = yes, 0 = no
PayMode No String Billing mode: prePay/postPay
ResourceId No String Queries information on a specified resource
ActionType No String Hourly settlement
Daily settlement
Yearly/monthly subscription
Spot
New yearly/monthly subscription
Yearly/monthly subscription renewal
Yearly/monthly subscription specification adjustment
Yearly/monthly subscription refund
Adjustment - deduction
Adjustment - refund
Hourly RI fee
One-off RI Fee
Hourly Savings Plan fee
Offline project deduction
Offline product deduction
ProjectId No Integer Project ID: ID of the project to which the resource belongs
BusinessCode No String Product code
Note: To query the product codes used in the current month, call DescribeBillSummaryByProduct.
Context No String Context information returned by the last request. You can set Month to 2023-05 or later to accelerate queries. We recommend users whose data volume is over 100 thousand entries use the paginated query feature, which can help greatly speed up your queries.
PayerUin No String The account ID of the payer, which is the unique identifier of a Tencent Cloud user. This account is allowed to query its own bills by default. If an organization admin account needs to query the self-pay bills of members, this field should be specified as the member account ID.

3. Output Parameters

Parameter Name Type Description
DetailSet Array of BillDetail Details list
Total Integer
Note: This field may return null, indicating that no valid values can be obtained.
Context String Note: This field may return null, indicating that no valid values can be obtained.
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 Getting Bill Details

This example shows you how to get bill details.

Input Example

POST / HTTP/1.1
Host: billing.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: DescribeBillDetail
<Common request parameters>{
    "Offset": 0,
    "Limit": 1,
    "Month": "2024-07",
    "NeedRecordNum": 1,
    "ResourceId": "eip-02udpkde"
}

Output Example

{
    "Response": {
        "Context": "6WFy9vRCrVEsm9xlmfvhY1Wb2TckX7PMKhnhdar2Sq/b3a1sdSmZjlFaC+2oAl7LMWc/ZZv4yYnPT12ELlVroTzdBUUNqU2043x8heMFLjAf6NJGoV8FXlYLQxABqcSt",
        "DetailSet": [
            {
                "ActionType": "postpay_deduct_h",
                "ActionTypeName": "Hourly settlement",
                "BillDay": "2024-07-01 00:00:00",
                "BillId": "20240701724095533205322",
                "BillMonth": "2024-07-01 00:00:00",
                "BusinessCode": "p_eip",
                "BusinessCodeName": "Cloud Public IP",
                "ComponentSet": [
                    {
                        "BlendedDiscount": "0.03514100",
                        "CashPayAmount": "0.00118741",
                        "ComponentCode": "v_eip_hour",
                        "ComponentCodeName": "Public IP Resource",
                        "ComponentConfig": [],
                        "ContractPrice": "0.00108937",
                        "Cost": "0.03100000",
                        "Currency": "USD",
                        "DeductedMeasure": "-",
                        "Discount": "0.035141",
                        "IncentivePayAmount": "0",
                        "InstanceType": "",
                        "ItemCode": "sv_eip_hour",
                        "ItemCodeName": "Public IP Resource",
                        "OriginalCostWithRI": "0.00000000",
                        "OriginalCostWithSP": "0.00000000",
                        "PriceUnit": "USD/pcs/Hour",
                        "RealCost": "0.00118741",
                        "RealTotalMeasure": "-",
                        "ReduceType": "discount",
                        "RiTimeSpan": "0.00000000",
                        "SPDeductionRate": "0.00000000",
                        "SinglePrice": "0.03100000",
                        "TaxAmount": "0.00009804",
                        "TaxRate": "0.09000000",
                        "TimeSpan": "1",
                        "TimeUnitName": "Hour",
                        "TransferPayAmount": "0",
                        "UsedAmount": "1",
                        "UsedAmountUnit": "pcs",
                        "VoucherPayAmount": "0"
                    }
                ],
                "DiscountContent": "",
                "DiscountObject": "",
                "DiscountType": "",
                "FeeBeginTime": "2024-07-01 01:00:00",
                "FeeEndTime": "2024-07-01 01:59:59",
                "Formula": "-",
                "FormulaUrl": "",
                "Id": "7831455483928246017",
                "OperateUin": "100010445724",
                "OrderId": "eip-02udpkde",
                "OwnerUin": "100010445724",
                "PayModeName": "Pay-As-You-Go resources",
                "PayTime": "2024-07-01 02:09:51",
                "PayerUin": "100010445724",
                "PriceInfo": [],
                "ProductCode": "sp_eip",
                "ProductCodeName": "Cloud Public IP",
                "ProjectId": 0,
                "ProjectName": "default",
                "RegionId": "1",
                "RegionName": "South China (Guangzhou)",
                "RegionType": "domestic",
                "RegionTypeName": "Domestic",
                "ReserveDetail": "",
                "ResourceId": "eip-02udpkde",
                "ResourceName": "",
                "Tags": [],
                "ZoneName": "other"
            }
        ],
        "RequestId": "8d9860e5-48f5-4399-b153-334510b96944",
        "Total": 744
    }
}

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
FailedOperation.QueryCountFailed Failed to get the number of data entries.
InternalError Internal error.
InternalError.GatewayError Gateway error.
InternalError.UnknownError Undefined exception.
InvalidParameter Invalid parameter.
InvalidParameterValue Invalid parameter value.
UnsupportedOperation Operation unsupported.

帮助和支持

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

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

文档反馈