Updated on 2024-07-05 GMT+08:00
Canceling Orders in the Pending Payment Status

Canceling Orders in the Pending Payment Status

Function

A customer can invoke this API to cancel orders in the pending payment status.

This API will be brought offline. For details about the new API for canceling orders in the pending payment status, see Canceling Orders in the Pending Payment Status.

Web UI

A customer can switch to the Orders page in the Billing Center to cancel orders in the pending payment status.

  1. Go to the Orders page.
  2. Click the Pending Payment tab.
  3. Click Cancel for the target order.

  4. In the Confirm dialog box, click OK.

REST API

A customer can cancel subscription to yearly-monthly product orders in the pending payment status on the partner sales platform.

  • Only the orders in the pending payment status can be canceled.
  • This API can be invoked using the customer AK/SK or token only.

  1. URI

    PUT /v1.0/{domain_id}/customer/order-mgr/orders/actions

    The following table describes the parameters.

    Table 1 Path parameters

    Parameter

    Mandatory

    Value Range

    Description

    domain_id

    Yes

    A maximum 64 characters

    Customer account ID. For details, see How Do I Obtain Customer's customer_id and domain_id Values?

    Table 2 Query parameters

    Parameter

    Mandatory

    Value Range

    Description

    action_id

    Yes

    [cancel]

    Cancels orders:

    cancel

  2. Request

    Request Parameters

    Parameter

    Mandatory

    Type

    Value Range

    Description

    orderId

    Yes

    String

    A maximum 64 characters

    Order ID.

    The value is the same as the value of orderId in the response of the API described in Querying Orders (Old).

    Example Request

    PUT https://bss-intl.myhuaweicloud.com/v1.0/{domain_id}/customer/order-mgr/orders/actions?action_id=cancel HTTP/1.1
    Content-Type: application/json
    X-Auth-Token: MIIPAgYJKoZIhvcNAQcCo...ggg1BBIINPXsidG9rZ
    
    {
      "orderId":"CS170926155954NO7"
    }

  3. Response

    Response Parameters

    Table 3 Response parameters

    Parameter

    Type

    Value Range

    Description

    error_code

    String

    A maximum of 10 characters

    Status code.

    For details, see 4.

    error_msg

    String

    A maximum of 256 characters

    Error description.

    Example Response

    HTTP/1.1 200 OK
    Content-Type: application/json;charset=UTF-8
    Content-Length: length
    Date: response time 
    
    {
        "error_code": "CBC.0000",
        "error_msg": "success"
    }

  1. Returned Values
    • 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

    200

    CBC.0000

    Success.

    200

    CBC.0100

    Invalid input parameter.

    403

    CBC.0151

    Access denied.

    500

    CBC.0999

    Other errors.

    200

    CBC.5010

    The order in this status cannot be canceled.

    400

    CBC.99000089

    Operation failed. Sub orders of a combine order cannot be processed independently.