tencent cloud

Billing Center

Release Notes and Announcements
Release Notes
Product Announcements
Billing Details
Billing Mode
Frozen Funds
Balance Notifications
Refunds
Billing Mode
Yearly/Monthly Subscription Products
Purchase Guide
Purchasing Cloud Services
Payment Methods
Beneficiary Account Bank Transfer
Top-up
Payment Methods for Prepaid Products
Post-paid Account Payment
Auto-payment
Transactions
Promo Vouchers
Savings Plan
Renewal Management
Bill Management
View bills
Bill Introduction
Fields in Bills
Usage Details
Billing Export Center
Bill subscription
Saving Bills to COS
Granting Billing-related CAM Access
Self-Service Invoice
Tax Management
FOCUS 1.0
FOCUS 1.0 Conformance Gaps
Cost Management
Consumption Bill Overview
Consumption Bill Description
Anomaly Detection
Fields in Consumption Bill
Cost Explorer
Budget Management
Cost Allocation Management
Cost Allocation Units
Cost Allocation Bill
Cost Allocation Tags
Cost Allocation Backtracking
API Documentation
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
FAQs
Bills
Promo Vouchers
Renewal

DescribeBillDetailForOrganization

PDF
포커스 모드
폰트 크기
마지막 업데이트 시간: 2026-03-17 12:21:02

1. API Description

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

This API is used to get pay-on-behalf bills of the admin account (bill details).
Note: 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.

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: DescribeBillDetailForOrganization.
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 Pagination offset. If Offset is 0, it indicates the first page. When Limit is 100, if Offset is 100, it indicates the second page; if Offset is 200, it indicates the third page, and so on.
Limit Yes Integer The number of entries returned at a time. The maximum value is 100.
Month No String The month is in the format of yyyy-mm. Either Month or BeginTime&EndTime must be specified. If BeginTime&EndTime is specified, the Month field is invalid. Data within the last 18 months can be pulled at most.
BeginTime No String The start time of the period in the format of yyyy-mm-dd hh:ii:ss. Either Month or BeginTime&EndTime must be specified. If BeginTime&EndTime is specified, the Month field is invalid. BeginTime and EndTime must be specified together and must be in the same month. Cross-month queries are not supported and the query results are data for the entire month. Data within the last 18 months can be pulled at most.
EndTime No String The end time of the period in the format of yyyy-mm-dd hh:ii:ss. Either Month or BeginTime&EndTime must be specified. If BeginTime&EndTime is specified, the Month field is invalid. BeginTime and EndTime must be specified together and must be in the same month. Cross-month queries are not supported and the query results are data for the entire month. Data within the last 18 months can be pulled at most.
NeedRecordNum No Integer Indicates whether the total number of records is required, used for pagination.
Valid values: 1 (required), 0 (not required).
PayMode No String Billing mode, which can be prePay (yearly/monthly subscription) or postPay (pay-as-you-go).
ResourceId No String ID of the instance to be queried.
ActionType No String Transaction type. This parameter needs to be input using the ActionTypeName value. Valid values:
Yearly/monthly subscription purchase
Yearly/monthly subscription renewal
Yearly/monthly subscription upgrade/downgrade
Yearly/monthly subscription refund
Pay-as-you-go deduction
Offline project deduction
Offline product deduction
Adjustment deduction
Adjustment compensation
Hourly pay-as-you-go
Daily pay-as-you-go
Monthly pay-as-you-go
Hourly spot instance
Offline project adjustment compensation
Offline product adjustment compensation
Offer deduction
Offer compensation
Pay-as-you-go resource migration in
Pay-as-you-go resource migration out
Yearly/monthly subscription resource migration in
Yearly/monthly subscription resource migration out
Prepaid
Hourly
RI refund
Pay-as-you-go reversal
Yearly/monthly subscription to pay-as-you-go
Minimum spend deduction
Hourly savings plan fee
ProjectId No Integer Project ID: The 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 response. You can view multiple pages when querying for data after May 2023 to speed up the query. We recommend you use this query method if your data volume is above 100 thousand entries, which can improve query speed by 2-10 times.

3. Output Parameters

Parameter Name Type Description
DetailSet Array of DistributionBillDetail Details list.
Total Integer Total number of records, which is cached every 24 hours and may be less than the actual total number of records.
Note: This field may return null, indicating that no valid values can be obtained.
Context String Context information of the current request, which can be used in the parameters of the next request to speed up the query.
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: DescribeOrganizationBillDetail
<Common request parameters>

{
    "Offset": 0,
    "Limit": 1,
    "Month": "2023-08",
    "NeedRecordNum": 1,
    "ResourceId": "nat-ftuh6xel"
}

Output Example

{
    "Response": {
        "Context": "TQpr+vp4d9EeM04pEI6ryHAVS3ZI84mbSVbUzlTD1F8EzZ6vYfNp+wKVhGw0dGkA2iAr5lSGYE4O+bTWApdUY6ZcLDZGpQVYCVApRrjx0IUf6NJGoV8FXlYLQxABqcSt",
        "DetailSet": [
            {
                "ActionType": "postpay_deduct_h",
                "ActionTypeName": "Hourly pay-as-you-go",
                "AssociatedOrder": null,
                "BillId": "20230816400705427744482",
                "BusinessCode": "p_nat",
                "BusinessCodeName": "NATNAT Gateway",
                "ComponentSet": [
                    {
                        "BlendedDiscount": "0.68040500",
                        "CashPayAmount": "0.34020250",
                        "ComponentCode": "v_nat_hour_instance",
                        "ComponentCodeName": "Instance",
                        "ComponentConfig": [],
                        "ContractPrice": "0.34020250",
                        "Cost": "0.50000000",
                        "DeductedMeasure": "-",
                        "Discount": "0.680405",
                        "IncentivePayAmount": "0",
                        "InstanceType": "",
                        "ItemCode": "sv_nat_hour_instance_small",
                        "ItemCodeName": "NATNAT Gateway - Small instance",
                        "OriginalCostWithRI": "0.00000000",
                        "OriginalCostWithSP": "0.00000000",
                        "PriceUnit": "USD/100 instances/hour",
                        "RealCost": "0.34020250",
                        "RealTotalMeasure": "-",
                        "ReduceType": "Discount",
                        "RiTimeSpan": "0.00000000",
                        "SPDeduction": "0.00000000",
                        "SPDeductionRate": "0.00000000",
                        "SinglePrice": "0.50000000",
                        "SpecifiedPrice": "0.50000000",
                        "TimeSpan": "1",
                        "TimeUnitName": "Hour",
                        "TransferPayAmount": "0",
                        "UsedAmount": "100",
                        "UsedAmountUnit": "Count",
                        "VoucherPayAmount": "0"
                    }
                ],
                "FeeBeginTime": "2023-08-16 20:00:00",
                "FeeEndTime": "2023-08-16 20:59:59",
                "Formula": "-",
                "FormulaUrl": "https://buy.tencentcloud.com/price/nat",
                "OperateUin": "700000686592",
                "OrderId": "20230816867705427744432",
                "OwnerUin": "700000686592",
                "PayModeName": "Pay-as-you-go",
                "PayTime": "2023-08-16 21:15:38",
                "PriceInfo": [],
                "ProductCode": "sp_nat",
                "ProductCodeName": "NATNAT Gateway",
                "ProjectId": 0,
                "ProjectName": "Default project",
                "RegionId": "4",
                "RegionName": "East China (Shanghai)",
                "ResourceId": "nat-ftuh6xel",
                "ResourceName": "migration-nat-test3",
                "Tags": [],
                "ZoneName": "Others"
            }
        ],
        "RequestId": "48f32947-8ef2-40b3-94ef-b8c08fc030da",
        "Total": 544
    }
}

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.

도움말 및 지원

문제 해결에 도움이 되었나요?

피드백