Domain name for API request: billing.intl.tencentcloudapi.com.
u200cThis API is used to get bill details.
Note:
A maximum of 5 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: 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 | Pagination offset. Offset=0 indicates the first page. If Limit=100, Offset=100 indicates the second page, Offset=200 indicates the third page, and so on. |
| Limit | Yes | Integer | The number of entries returned at a time. The maximum value is 300. |
| 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 | Total number of records for access list needed for frontend pagination 1: needed, 0: not needed |
| 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: Project ID of the resource |
| BusinessCode | No | String | Product name code Remark: If needed to obtain BusinessCode used in current month, invoke API: Get fee distribution by product |
| Context | No | String | Context information returned from the last request. Paginated query of data for months with Month>=2023-05 can speed up query speed. Recommended for users with data volume at tens of thousands level. Query speed can be improved by 2-10x. |
| PayerUin | No | String | Account ID of the payer (Account ID is the unique account identifier for the user in Tencent Cloud). By default, the query returns the account statement of the current account. If the group management account needs to query the self-pay bills of member accounts, enter the member account UIN in this field. |
| Parameter Name | Type | Description |
|---|---|---|
| DetailSet | Array of BillDetail | Detail list |
| Total | Integer | Total record count, cached once every 24 hours, may be less than the actual total record count |
| Context | String | Context information of this request can be used in the request parameter of the next request to accelerate query speed. |
| 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.
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": "2023-07",
"NeedRecordNum": 1,
"ResourceId": "ins-wxf3fmq8"
}
{
"Response": {
"Context": "m7u3i6W6Xt6VmK1NGvNzCXEBwkmoH/Y3ROhw2ICs3RkxMDTe6z/M5dFHpIoeEc+MOBKEhnly44tsqyRJRRL0ZNpmtARd8SDzLfknCLcJtVkf6NJGoV8FXlYLQxABqcSt",
"DetailSet": [
{
"ActionType": "pre_to_post",
"ActionTypeName": "Monthly subscription to pay-as-you-go",
"AssociatedOrder": {
"PrepayPurchase": "20230707400000442656611",
"PrepayRenew": "20230707400000442695851,20230707400000442708571"
},
"BillDay": "2023-07-17 00:00:00",
"BillId": "20230707400000442821061",
"BusinessCode": "p_cvm",
"BusinessCodeName": "Cloud Virtual Machine CVM"
"BillMonth": "2023-07-01 00:00:00",
"ComponentSet": [
{
"BlendedDiscount": "1.00000000",
"CashPayAmount": "-80.43264806",
"ComponentCode": "virtual_v_cvm_compute",
"ComponentCodeName": "Computing component"
"ComponentConfig": [
{
"Name": "Project"
"Value": "element_test"
},
{
"Name": "Host"
"Value": "ins-wxf3fmq8"
},
{
"Name": "Private IP Address"
"Value": "10.12.0.42"
},
{
"Name": "Network"
"Value": "VPC"
},
{
"Name": "Availability Zone"
"Value": "Guangzhou Zone 2"
}
],
"ContractPrice": "-80.89000000",
"Cost": "-80.89000000",
"DeductedMeasure": "1",
"Discount": "1",
"IncentivePayAmount": "-0.45735194",
"InstanceType": "ri",
"ItemCode": "virtual_v_cvm_compute_s2",
"ItemCodeName": "Computing Component-Standard S2-2 Core 4G"
"OriginalCostWithRI": "0.00000000",
"OriginalCostWithSP": "0.00000000",
"PriceUnit": "CNY/each/month",
"RealCost": "-80.89000000",
"RealTotalMeasure": "1",
"ReduceType": "Discount"
"RiTimeSpan": "0.00000000",
"SPDeduction": "0.00000000",
"SPDeductionRate": "0.00000000",
"SinglePrice": "-80.89000000",
"SpecifiedPrice": "-80.89000000",
"TimeSpan": "1",
"TimeUnitName": "Month"
"TransferPayAmount": "0",
"UsedAmount": "1",
"UsedAmountUnit": "unit"
"VoucherPayAmount": "0"
}
],
"FeeBeginTime": "2023-07-07 16:14:21",
"FeeEndTime": "2023-07-07 16:14:21",
"Formula": "Refund: 343.12 CNY, cash voucher: 0 CNY, vouchers/discount coupons are non-refundable (order number 20230707400000442656611: Component cvm: cash payment 88.81 CNY - Used first tier pay-as-you-go: 0.02 CNY = remaining 88.79 CNY; order number 20230707400000442656611: Component bandwidth: cash payment 0 CNY = remaining 0 CNY; order number 20230707400000442695851: Component cvm: cash payment 172.92 CNY = remaining 172.92 CNY; order number 20230707400000442695851: Component bandwidth: cash payment 0 CNY = remaining 0 CNY; order number 20230707400000442708571: Component cvm: cash payment 84.12 CNY - original price 95.6 * usage time 3.2258% * discount: 88 = remaining 81.41 CNY;",
"FormulaUrl": "https://buy.tencentcloud.com/price/cvm",
"Id": "1725547686519644160",
"OperateUin": "909619400",
"OrderId": "20230707400000442821061",
"OwnerUin": "909619400",
"PayModeName": "Monthly Subscription",
"PayTime": "2023-07-07 16:14:18",
"PayerUin": "909619400",
"PriceInfo": [
OS: linux
Continuous usage duration T: No tiers
Platform: Cloud Platform
],
"ProductCode": "sp_cvm_s2",
"ProductCodeName": "Cloud Virtual Machine (CVM) - Standard S2"
"ProjectId": 1002227,
"ProjectName": "element_test",
"RegionId": "1",
"RegionName": "South China (Guangzhou)",
"ResourceId": "ins-wxf3fmq8",
"ResourceName": "ins-wxf3fmq8",
"Tags": [],
"ZoneName": "Guangzhou Zone 2"
}
],
"RequestId": "ca7573cb-473d-40f3-8c58-7be43ae60195",
"Total": 14
}
}
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.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. |
Esta página foi útil?
Você também pode entrar em contato com a Equipe de vendas ou Enviar um tíquete em caso de ajuda.
comentários