Domain name for API request: billing.tencentcloudapi.com.
This API is used to get the bill summarized by billing mode.
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: DescribeBillSummaryByPayMode. |
Version | Yes | String | Common Params. The value used for this API: 2018-07-09. |
Region | No | String | Common Params. This parameter is not required. |
BeginTime | Yes | String | The value must be of the same month as EndTime . Query period must start and end on the same month and the query result returned will be of the entire month. For example, if both BeginTime and EndTime are 2018-09 , the data returned will be for the entire month of September 2018. |
EndTime | Yes | String | The value must be of the same month as BeginTime . Query period must start and end on the same month and the query result returned will be of the entire month. For example, if both BeginTime and EndTime are 2018-09 , the data returned will be for the entire month of September 2018. |
PayerUin | No | String | Query bill data user's UIN |
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. |
SummaryOverview | Array of PayModeSummaryOverviewItem | Detailed cost distribution for all billing modes Note: This field may return null, indicating that no valid value was found. |
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 the bill summarized by billing mode.
POST / HTTP/1.1Host: billing.tencentcloudapi.comContent-Type: application/jsonX-TC-Action: DescribeBillSummaryByPayMode<Common request parameters>{ "EndTime": "2018-11", "BeginTime": "2018-11"}
{
"Response": {
"Ready": 1,
"SummaryOverview": [
{
"PayMode": "prePay",
"PayModeName": "Monthly subscription",
"RealTotalCost": "3228.80000000",
"TotalCost": "5064.00000000",
"CashPayAmount": "0.00000000",
"IncentivePayAmount": "3228.80000000",
"VoucherPayAmount": "0.00000000",
"TransferPayAmount": "0.00000000",
"RealTotalCostRatio": "99.49",
"Detail": [
{
"ActionType": "prepay_renew",
"ActionTypeName": "Monthly subscription renewal",
"RealTotalCost": "3228.80000000",
"TotalCost": "5064.00000000",
"CashPayAmount": "0.00000000",
"IncentivePayAmount": "3228.80000000",
"VoucherPayAmount": "0.00000000",
"TransferPayAmount": "0.00000000",
"RealTotalCostRatio": "100.00",
"BillMonth": "2021-12"
}
]
},
{
"PayMode": "postPay",
"PayModeName": "Pay-as-you-go",
"RealTotalCost": "16.44000000",
"TotalCost": "27.64446128",
"CashPayAmount": "0.00000000",
"IncentivePayAmount": "16.44000000",
"VoucherPayAmount": "0.00000000",
"TransferPayAmount": "0.00000000",
"RealTotalCostRatio": "0.51",
"Detail": [
{
"ActionType": "postpay_deduct_h",
"ActionTypeName": "Hourly settlement",
"RealTotalCost": "19.32711686",
"TotalCost": "29.73402790",
"CashPayAmount": "3.83470332",
"IncentivePayAmount": "15.49241354",
"VoucherPayAmount": "0.00000000",
"TransferPayAmount": "0.00000000",
"RealTotalCostRatio": "96.00",
"BillMonth": "2021-12"
},
{
"ActionType": "postpay_deduct_d",
"ActionTypeName": "Daily settlement",
"RealTotalCost": "0.80604458",
"TotalCost": "1.24113445",
"CashPayAmount": "0.00000000",
"IncentivePayAmount": "0.80604458",
"VoucherPayAmount": "0.00000000",
"TransferPayAmount": "0.00000000",
"RealTotalCostRatio": "4.00",
"BillMonth": "2021-12"
},
{
"ActionType": "postpay_deduct_m",
"ActionTypeName": "Monthly settlement",
"RealTotalCost": "0.00000000",
"TotalCost": "0.36246037",
"CashPayAmount": "0.00000000",
"IncentivePayAmount": "0.00000000",
"VoucherPayAmount": "0.00000000",
"TransferPayAmount": "0.00000000",
"RealTotalCostRatio": "0.00",
"BillMonth": "2021-12"
},
{
"ActionType": "billVirtualId",
"ActionTypeName": "Monthly precision difference adjustment",
"RealTotalCost": "-3.69316144",
"TotalCost": "-3.69316144",
"CashPayAmount": "-3.83470332",
"IncentivePayAmount": "0.14154188",
"VoucherPayAmount": "0.00000000",
"TransferPayAmount": "0.00000000",
"RealTotalCostRatio": "0.00",
"BillMonth": "2021-12"
}
]
}
],
"RequestId": "5d83209a-3223-497f-a36b-32330d88e454"
}
}
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 |
---|---|
InternalError | Internal error. |
InternalError.GatewayError | Gateway error. |
InternalError.UnknownError | Undefined exception. |
InvalidParameter | Invalid parameter. |
InvalidParameterValue | Invalid parameter value. |
문제 해결에 도움이 되었나요?