tencent cloud

All product documents
APIs
DescribeBillSummaryByPayMode
Last updated: 2024-05-16 15:10:03
DescribeBillSummaryByPayMode
Last updated: 2024-05-16 15:10:03

1. API Description

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.

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: 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

3. Output Parameters

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.

4. Example

Example1 Getting the bill summarized by billing mode

This example shows you how to get the bill summarized by billing mode.

Input Example

POST / HTTP/1.1Host: billing.tencentcloudapi.comContent-Type: application/jsonX-TC-Action: DescribeBillSummaryByPayMode<Common request parameters>{    "EndTime": "2018-11",    "BeginTime": "2018-11"}

Output Example

{
    "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"
    }
}

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
InternalError Internal error.
InternalError.GatewayError Gateway error.
InternalError.UnknownError Undefined exception.
InvalidParameter Invalid parameter.
InvalidParameterValue Invalid parameter value.
Was this page helpful?
You can also Contact Sales or Submit a Ticket for help.
Yes
No

Feedback

Contact Us

Contact our sales team or business advisors to help your business.

Technical Support

Open a ticket if you're looking for further assistance. Our Ticket is 7x24 avaliable.

7x24 Phone Support
Hong Kong, China
+852 800 906 020 (Toll Free)
United States
+1 844 606 0804 (Toll Free)
United Kingdom
+44 808 196 4551 (Toll Free)
Canada
+1 888 605 7930 (Toll Free)
Australia
+61 1300 986 386 (Toll Free)
EdgeOne hotline
+852 300 80699
More local hotlines coming soon