Compute
Elastic Cloud Server
Huawei Cloud Flexus
Bare Metal Server
Auto Scaling
Image Management Service
Dedicated Host
FunctionGraph
Cloud Phone Host
Huawei Cloud EulerOS
Networking
Virtual Private Cloud
Elastic IP
Elastic Load Balance
NAT Gateway
Direct Connect
Virtual Private Network
VPC Endpoint
Cloud Connect
Enterprise Router
Enterprise Switch
Global Accelerator
Management & Governance
Cloud Eye
Identity and Access Management
Cloud Trace Service
Resource Formation Service
Tag Management Service
Log Tank Service
Config
OneAccess
Resource Access Manager
Simple Message Notification
Application Performance Management
Application Operations Management
Organizations
Optimization Advisor
IAM Identity Center
Cloud Operations Center
Resource Governance Center
Migration
Server Migration Service
Object Storage Migration Service
Cloud Data Migration
Migration Center
Cloud Ecosystem
KooGallery
Partner Center
User Support
My Account
Billing Center
Cost Center
Resource Center
Enterprise Management
Service Tickets
HUAWEI CLOUD (International) FAQs
ICP Filing
Support Plans
My Credentials
Customer Operation Capabilities
Partner Support Plans
Professional Services
Analytics
MapReduce Service
Data Lake Insight
CloudTable Service
Cloud Search Service
Data Lake Visualization
Data Ingestion Service
GaussDB(DWS)
DataArts Studio
Data Lake Factory
DataArts Lake Formation
IoT
IoT Device Access
Others
Product Pricing Details
System Permissions
Console Quick Start
Common FAQs
Instructions for Associating with a HUAWEI CLOUD Partner
Message Center
Security & Compliance
Security Technologies and Applications
Web Application Firewall
Host Security Service
Cloud Firewall
SecMaster
Anti-DDoS Service
Data Encryption Workshop
Database Security Service
Cloud Bastion Host
Data Security Center
Cloud Certificate Manager
Edge Security
Managed Threat Detection
Blockchain
Blockchain Service
Web3 Node Engine Service
Media Services
Media Processing Center
Video On Demand
Live
SparkRTC
MetaStudio
Storage
Object Storage Service
Elastic Volume Service
Cloud Backup and Recovery
Storage Disaster Recovery Service
Scalable File Service Turbo
Scalable File Service
Volume Backup Service
Cloud Server Backup Service
Data Express Service
Dedicated Distributed Storage Service
Containers
Cloud Container Engine
SoftWare Repository for Container
Application Service Mesh
Ubiquitous Cloud Native Service
Cloud Container Instance
Databases
Relational Database Service
Document Database Service
Data Admin Service
Data Replication Service
GeminiDB
GaussDB
Distributed Database Middleware
Database and Application Migration UGO
TaurusDB
Middleware
Distributed Cache Service
API Gateway
Distributed Message Service for Kafka
Distributed Message Service for RabbitMQ
Distributed Message Service for RocketMQ
Cloud Service Engine
Multi-Site High Availability Service
EventGrid
Dedicated Cloud
Dedicated Computing Cluster
Business Applications
Workspace
ROMA Connect
Message & SMS
Domain Name Service
Edge Data Center Management
Meeting
AI
Face Recognition Service
Graph Engine Service
Content Moderation
Image Recognition
Optical Character Recognition
ModelArts
ImageSearch
Conversational Bot Service
Speech Interaction Service
Huawei HiLens
Video Intelligent Analysis Service
Developer Tools
SDK Developer Guide
API Request Signing Guide
Terraform
Koo Command Line Interface
Content Delivery & Edge Computing
Content Delivery Network
Intelligent EdgeFabric
CloudPond
Intelligent EdgeCloud
Solutions
SAP Cloud
High Performance Computing
Developer Services
ServiceStage
CodeArts
CodeArts PerfTest
CodeArts Req
CodeArts Pipeline
CodeArts Build
CodeArts Deploy
CodeArts Artifact
CodeArts TestPlan
CodeArts Check
CodeArts Repo
Cloud Application Engine
MacroVerse aPaaS
KooMessage
KooPhone
KooDrive
Querying Monthly Bills

Querying Monthly Bills

Updated on 2024-05-28 GMT+08:00

Function

This API is used to query monthly bills.

NOTE:

This API will be brought offline. For details about how to query the monthly bills, see Querying Monthly Bills.

Web UI

Partners can log in to the Partner Center to query their monthly bills.

  1. In the top navigation, select Sales > Financial Information > Partner Bills
  2. In the Amount Due pane, you can query the amount to be paid, including the unpaid fees of current month and those of previous months.

    NOTE:
    • Click Repay to pay the bill. For details, see Repayment.
    • You can click Unpaid Bills to see the bills that you need to pay.
    • You can click Payment record to switch to the Revenue & Expenditure page to view the payment records.

  1. In the Monthly Bills pane, select the month and query the bills of this month.

  2. Export partner bills.

    • Exporting the bills.

      In the Monthly Bills area, select Export Bill Summary to PDF File. The system displays "Records exported successfully."

    • Export bill details.

      In the Monthly Bills area, select Export Bill Details to XLSX File. The system displays "Records exported successfully."

    • View the export history.
      1. Select View Export to go to the Export History page.
      2. Click Download in the Operation column to download and view the exported bills.

REST API

The partner sales platform displays the monthly bills, and then you can settle the bills with HUAWEI CLOUD.

NOTE:
  • This API can be invoked only by the partner account AK/SK or token.
  • The partner bill for each month is generated before 12:00 (Beijing Time) on the fifth day of the next month.

  1. URI

    GET /v1.0/{partner_id}/partner/account-mgr/postpaid-bill-summary

    The following table describes the parameter.

    Table 1 URI parameters

    Parameter

    Mandatory

    Maximum Length of Characters

    Description

    partner_id

    Yes

    A maximum of 64 characters

    Partner ID (assigned by Huawei).

    For details about how to obtain the partner ID, see How Do I Check the Partner ID?.

    Table 2 Request parameter

    Parameter

    Mandatory

    Type

    Maximum Length of Characters

    Description

    consume_month

    Yes

    String

    A maximum of 10 characters

    Month in the yyyy-MM format.

  1. Request

    Request Parameters

    None

    Example Request

    GET https://bss-intl.myhuaweicloud.com/v1.0/{partner_id}/partner/account-mgr/postpaid-bill-summary?consume_month=2019-01 HTTP/1.1
    Content-Type: application/json
    X-Auth-Token: MIIPAgYJKoZIhvcNAQcCo...ggg1BBIINPXsidG9rZ

  1. Response

    Response Parameters

    Parameter

    Mandatory

    Type

    Maximum Length of Characters

    Description

    error_code

    No

    String

    A maximum of 16 characters

    Error code. For details, see 4. This parameter is returned only when a failure occurs.

    error_msg

    No

    String

    A maximum of 1024 characters

    Error description. This parameter is returned only when a failure occurs.

    billCycle

    No

    String

    A maximum of 10 characters

    Billing cycle. This parameter is returned only when the query is successful. It indicates the month for which the bills are queried.

    Format: YYYY-MM

    creditDebtAmount

    No

    BigDecimal

    -

    Bill amount, which is calculated based on the special commercial discount of the partner. This parameter is returned only when the query is successful. The value does not contain the tax.

    consumeAmount

    No

    BigDecimal

    -

    Consumption amount, which is calculated based on the special commercial discount of the partner. This parameter is returned only when the query is successful. The value does not contain the tax.

    writeoffdebt

    No

    BigDecimal

    -

    Write-off amount (negative value), which is calculated based on the special commercial discount of the partner. This parameter is returned only when the query is successful. The value does not contain the tax.

    unsubscribeAmount

    No

    BigDecimal

    -

    Unsubscription amount (negative value), which is calculated based on the special commercial discount of the partner. This parameter is returned only when the query is successful. The value does not contain the tax.

    measureId

    No

    Integer

    -

    Unit. This parameter is returned only when the query is successful.

    1: Dollar

    currency

    No

    String

    A maximum of 8 characters

    This parameter is returned only when the query is successful.

    USD

    taxAmount

    No

    BigDecimal

    -

    Tax amount, which is the tax amount in the creditDebtAmount field. Currently, this field is reserved and no value is returned.

    unclearedAmount

    No

    BigDecimal

    -

    Bill amount that is not settled, which is calculated based on the special commercial discount of the partner. This parameter is returned only when the query is successful.

    dueDate

    No

    String

    A maximum of 32 characters

    Due date for bills. This parameter is returned only when the query is successful.

    billList

    No

    List<PostpaidBillInfo>

    -

    Bill list. For details, see Table 3. This parameter is returned only when the query is successful.

    Table 3 PostpaidBillInfo

    Parameter

    Mandatory

    Type

    Maximum Length of Characters

    Description

    billType

    Yes

    String

    A maximum of 1 character

    Bill type:

    • 0: Expenditure
    • 1: Unsubscription
    • 2: Huawei write-off

    cloudServiceTypeCode

    Yes

    String

    A maximum of 100 characters

    Cloud service type code. For example, the cloud service type code of OBS is hws.service.type.obs. To obtain a specific service type, call the API in Querying Cloud Service Types.

    resourceTypeCode

    Yes

    String

    A maximum of 100 characters

    Resource type code. For example, the VM resource type code of ECS is hws.resource.type.vm. To obtain a specific resource type, call the API in Querying Resource Types.

    payMethod

    Yes

    String

    A maximum of 1 character

    Billing mode. The options are as follows:

    0: Yearly/monthly

    1: Pay-per-use

    2: Reserved instance–upfront payment

    3: Reserved instance–hourly billing

    creditDebtAmount

    Yes

    BigDecimal

    -

    Transaction amount/unsubscription amount/refund amount of the customer, including the vouchers, flexi-purchase coupons, reserved flexi-purchase coupons, and stored-value cards. Flexi-purchase coupons and stored-value cards are not supported currently.

    For bill types with billType being 1 and 2, the value is negative.

    customerAmountDue

    Yes

    BigDecimal

    -

    Transaction amount/unsubscription amount/refund amount of the customer, not including the vouchers, flexi-purchase coupons, reserved flexi-purchase coupons, or stored-value cards. Flexi-purchase coupons and stored-value cards are not supported currently.

    For bill types with billType being 1 and 2, the value is negative.

    settlementType

    Yes

    Integer

    -

    Settlement product type. The optional values are as follows:

    0: List-price offering

    1: Promotional offering

    2: Hybrid hosting products

    5: Stored-value card

    6: KooGallery

    7: Spot ECSs

    8: FCS (reserved)

    partnerRatio

    No

    Bigdecimal

    -

    Partner discount percentage. This parameter is valid only when partnerPreferentialType is set to 0.

    partnerAmount

    Yes

    Bigdecimal

    -

    Amount that the partner needs to refund/Amount that the partner has refund

    For bill types with billType being 1 and 2, the value is negative.

    periodType

    No

    Integer

    -

    Yearly/monthly unit.

    0: Daily

    1: Weekly

    2: Monthly

    3: Yearly

    periodNum

    No

    Integer

    -

    Number of yearly/monthly periods.

    categoryCode

    No

    String

    64

    Product category code.

    salePrice

    No

    BigDecimal

    -

    Fixed Price

    This parameter is valid only when partnerPreferentialType is set to 1.

    stepNum

    No

    Integer

    -

    Step size of fixed unit price.

    This parameter is valid only when partnerPreferentialType is set to 1.

    stepNumMeasureId

    No

    Integer

    -

    Unit for the step size of fixed unit price.

    This parameter is valid only when partnerPreferentialType is set to 1.

    partnerPreferentialType

    No

    Integer

    [0-1]

    Partner preferential type. The options are as follows:

    • 0: Discount
    • 1: Fixed unit price. If this parameter is left empty, the product discount is used by default

    Example Response

    HTTP/1.1 200 OK
    Content-Type: application/json;charset=UTF-8
    Content-Length: length
    Date: response time
      
    {
        "billCycle": "2019-01",
        "creditDebtAmount": 22500,
        "consumeAmount": 22500,
        "writeoffdebt": 0,
        "unsubscribeAmount": 0,
        "measureId": 1,
        "currency": "USD",
        "taxAmount": null,
        "unclearedAmount": 10,
        "dueDate": "2019-02-15",
        "billList": [
            {
                "billType": "0",
                "cloudServiceTypeCode": "hws.service.type.kms",
                "resourceTypeCode": "hws.resource.type.dev.codehub",
                "payMethod": "1",
                "creditDebtAmount": 30000,
                "customerAmountDue": 30000,
                "settlementType": 0,
                "partnerRatio": 0.75,
                "partnerAmount": 22500,
                "periodType":3,
                "periodNum":1,
                "categoryCode": "hws.resource.storage1.evs",
                "salePrice": null,
                "stepNum": null,
                "stepNumMeasureId": null,
                "partnerPreferentialType": 0
            }
        ]
    }

  1. Status Code
    NOTE:
    • 4xx: This class of HTTP status code is intended for situations in which the error seems to have been caused by the client, for example, the request contains bad syntax or incorrect parameters. You must ensure the request is correct.
    • 5xx: This class of HTTP status code is intended for cases in which the Huawei Cloud server is aware that it has encountered an error or is otherwise incapable of performing the request. In this case, contact Huawei Cloud customer service.

    HTTP Status Code

    Error Code

    Description

    400

    CBC.0100

    Invalid input parameter.

    403

    CBC.0151

    Access denied.

    500

    CBC.0999

    Other errors.

We use cookies to improve our site and your experience. By continuing to browse our site you accept our cookie policy. Find out more