Paying Yearly/Monthly Product Orders (Old)
Function
A customer can invoke this API to pay yearly/monthly product orders in the pending payment status.
This API will be brought offline. For details about how to pay yearly/monthly product orders, see Paying Yearly/Monthly Product Orders (Old).
Web UI
A customer can switch to the Orders page in the Billing Center to pay yearly-monthly product orders in the pending payment status.
- Go to the Orders page.
- Click the Pending Payment tab.
- Select a payment option.
- Single payment: Click Pay for a desired order.
- Combine payment: Select desired orders and click Combine Payment.
- Single payment: Click Pay for a desired order.
- Select preferences and a payment option, and click Pay.
For customers who enable protection for sensitive operations, a secondary authentication is required for order payment.
- Preferences include discounts and coupons.
- Discounts include commercial discounts, partner authorized discounts, partner adjusted discounts, offline contract discounts, and discount coupons. These types of discounts are mutually exclusive to each other.
- When a customer places an order using a promotional discount or discount coupon, if the promotional or discount coupon is about to expire before the order expiration time (7 days later), the order expiration time is changed to be the same as the coupon expiration time.
A customer places an order at 2018/11/26 23:12:32 using a discount coupon, which is valid between 2018-11-01 00:00:00 and 2018-11-30 23:59:59. In this case, the order expiration time is changed to 2018/11/30 23:59:59. (In normal circumstances, an order is valid for 7 days and the order in this example will expire 7 days later, that is, at 2018/12/03 23:12:32.)
- When a customer places an order using a commercial discount or a partner authorized discount, this discount will be always valid until the order expires, even if the discount expiration time is earlier than the order expiration time.
A customer places an order at 2018/11/26 23:12:32 using a commercial discount, which is originally valid between 2018-11-01 00:00:00 and 2018-11-30 23:59:59. In this circumstance, this commercial discount will be still valid before the order expiration time, 2018/12/03 23:12:32.
- When a customer places an order using a promotional discount or discount coupon, if the promotional or discount coupon is about to expire before the order expiration time (7 days later), the order expiration time is changed to be the same as the coupon expiration time.
- Coupons include cash coupons and flexi-purchase coupons.
For specification changes of ECS, EVS, and VPC, select available discounts on the order confirmation page. Discounts cannot be changed later on the payment page, but cash coupons and flexi-purchase coupons can be added to the payment.
After a partner sets a discount for an associated customer's order, the customer cannot reset it when paying the order.
- Discounts include commercial discounts, partner authorized discounts, partner adjusted discounts, offline contract discounts, and discount coupons. These types of discounts are mutually exclusive to each other.
- Three payment methods are supported: payment from balance, online payment, and monthly settlement.
- Preferences include discounts and coupons.
REST API
A customer can pay yearly/monthly product orders in the pending payment status on the self-built platform.
- This API can be invoked only using the AK/SK or token of the customer.
- Only coupons can be used for payment.
- This API cannot be invoked by unified accounting members or resource management accounts.
- URI
POST /v1.0/{domain_id}/customer/order-mgr/order/pay
The following table describes the parameters.
Table 1 URI parameters Parameter
Mandatory
Maximum Length of Characters
Description
domain_id
Yes
64
Customer account ID. For details, see How Do I Obtain Customer's customer_id and domain_id Values?
- Request
Parameter
Mandatory
Type
Maximum Length of Characters/Value Range
Description
orderId
Yes
String
A maximum of 64 characters
Order ID.
The value is the same as the order_ids value in the response message of API described in Renewing Subscription to Yearly/Monthly Resources (Old).
payAccountType
No
Integer
[1|2]
Payment account type.
- 1: HUAWEI CLOUD account that the customer directly tops up.
- 2: Account that the customer receives the budget configured by the partner.
For common customers, do not configure this parameter or set the value to 1.
For customers associated to the partner in the Reseller mode, do not configure this parameter or set the value to 2.
For customers associated with the partner in the Referral model, do not configure this parameter or set the value to 1.
If this parameter is not included in the request parameters or is set to null, the system makes payment based on the account type.
couponIds
No
List<String>
[0-3]
This parameter is reserved.
If this parameter is not included in request parameters, is set to null, or is set to an empty array, no coupons are used in payment.
Example Request
POST https://bss-intl.myhuaweicloud.com/v1.0/{domain_id}/customer/order-mgr/order/pay HTTP/1.1 Content-Type: application/json X-Auth-Token: MIIPAgYJKoZIhvcNAQcCo...ggg1BBIINPXsidG9rZ { "orderId": "CS1712271317IT8C4", "payAccountType": 2 }
- Response
Parameter
Type
Maximum Length of Characters
Description
error_code
String
A maximum of 10 characters
Error code.
For details, see 4.
error_msg
String
A maximum of 256 characters
Error description.
tradeNo
String
A maximum of 64 characters
Payment SN corresponding to the order.
quotaInfos
List<QuotaInfo>
-
List of the resources whose quota or capacity is insufficient.
For details, see Table 2.
This parameter is valid only when error_code is set to CBC.3141.
If the quota is insufficient, submit a service ticket on the HUAWEI CLOUD official website to increase the quota and then pay the order.
If the capacity is insufficient, place an order again.
If the specifications have changed, place an order again.
enterpriseProjectAuthResult
List<EnterpriseProject>
-
Information about the enterprise project whose fund is insufficient.
For details, see Table 3.
This parameter is valid only when error_code is set to CBC.3155.
Table 2 QuotaInfo Parameter
Type
Description
regionCode
String
Cloud service region code, for example, cn-north-1. Obtain the value from the Region column in Regions and Endpoints.
cloudServiceType
String
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.
resourceType
String
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.
resourceSpecCode
String
Resource specifications of the subscribed cloud service products.
For example, the resource specification of a VM is s2.small.1.linux.
authResult
Integer
Verification result of the change of the cloud service quota, capacity, or specifications.
1: The quota is insufficient.
2: The capacity is insufficient.
3: The resource specifications are incorrect. This value is valid only when the resource specifications change between the time when a customer places an order and the time when the customer pays the order.
4: The associated resource information is incorrect. This value is valid only when the resource specifications change between the time when a customer places an order and the time when the customer pays the order.
99: Other errors. This value is valid only when the resource specifications change between the time when a customer places an order and the time when the customer pays the order.
availableZoneId
String
AZ ID.
For details, see the AZ names of regions listed on the Regions and Endpoints, for example, cn-north-1a.
Table 3 EnterpriseProject Parameter
Type
Description
enterpriseProjectId
String
ID of the enterprise project to which the order belongs.
enterpriseProjectName
String
Enterprise project name.
authStatus
Integer
Verification result of the enterprise project's fund quota.
10: The fund quota is insufficient or the project is invalid.
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", "quotaInfos": [], "enterpriseProjectAuthResult": [], "tradeNo": "f141b*****0fe6" }
- Status Code
- 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
Succeeded.
400
CBC.0100
Incorrect parameter.
403
CBC.0151
Access denied.
500
CBC.0999
Other errors.
400
CBC.3106
The order status has changed and no payment can be made.
400
CBC.3112
The coupon or stored-value card has been used.
400
CBC.3141
The cloud service quota or capacity is insufficient, or the resource specifications have changed.
400
CBC.3155
Insufficient enterprise project fund quota.
400
CBC.99003156
Coupons applicable to KooGallery products cannot be used together with dedicated coupons.
400
CBC.99003198
Insufficient organization budget.
400
CBC.3162
The validity period set for the bandwidth add-on package cannot be earlier than the system time.
400
CBC.5003
Insufficient balance.
400
CBC.7281
Renewal, unsubscription, or payment not supported. Your account has been frozen.
200
CBC.5023
The account type does not match the association type.
Change the value of payAccountType based on the description of request parameter payAccountType in 2, or do not configure the parameter.
500
CBC.30000010
Operation not allowed because the order is invalid or does not exist.
400
CBC.99000089
Operation failed. Sub orders of a combine order cannot be processed independently.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot