Partner CenterPartner Center

Compute
Elastic Cloud Server
Bare Metal Server
Auto Scaling
Image Management Service
Dedicated Host
FunctionGraph
Networking
Virtual Private Cloud
Elastic IP
Elastic Load Balance
NAT Gateway
Direct Connect
Virtual Private Network
Domain Name Service
VPC Endpoint
Cloud Connect
Enterprise Switch
Security & Compliance
Anti-DDoS
Web Application Firewall
Host Security Service
Data Encryption Workshop
Database Security Service
Advanced Anti-DDoS
Data Security Center
Container Guard Service
Situation Awareness
Managed Threat Detection
Compass
Cloud Certificate Manager
Anti-DDoS Service
Databases
Relational Database Service
Document Database Service
Data Admin Service
Data Replication Service
GaussDB NoSQL
GaussDB(for MySQL)
Distributed Database Middleware
GaussDB(for openGauss)
Developer Services
ServiceStage
Distributed Cache Service
Simple Message Notification
Application Performance Management
Application Operations Management
Blockchain Service
API Gateway
Cloud Performance Test Service
Distributed Message Service for Kafka
Distributed Message Service for RabbitMQ
Distributed Message Service for RocketMQ
Cloud Service Engine
DevCloud
ProjectMan
CodeHub
CloudRelease
CloudPipeline
CloudBuild
CloudDeploy
Cloud Communications
Message & SMS
Cloud Ecosystem
Marketplace
Partner Center
User Support
My Account
Billing Center
Cost Center
Resource Center
Enterprise Management
Service Tickets
HUAWEI CLOUD (International) FAQs
ICP License Service
Support Plans
Customer Operation Capabilities
Partner Support Plans
Professional Services
enterprise-collaboration
Meeting
IoT
IoT
Intelligent EdgeFabric
DeveloperTools
SDK Developer Guide
API Request Signing Guide
Terraform
HCloud CLI
Updated at: Apr 27, 2022 GMT+08:00

Paying Yearly/Monthly Product Orders

Function

A customer can invoke this API to pay yearly-monthly product orders in the pending payment status.

Customers can follow the instructions described in Payment to pay yearly/monthly product orders in the pending payment status in Billing Center.

  • This API supports both monthly settlement and balance payment. Monthly settlement is preferred.
  • Balance payment includes cash account payment and credit account payment. If both accounts have balance, the cash account payment is preferred.
  • Restrictions for using a discount and coupon at the same time:
    • If the restriction attribute of a coupon contains field simultaneousUseWithEmpowerDiscount with a value of 0, the discount and coupon cannot be used at the same time.
    • If the restriction attribute of a coupon contains field minConsumeDiscount and the values of discount_ratio for all the order items are less than the value of minConsumeDiscount, the discount and coupon cannot be used at the same time.

Constraints

This API can be invoked only by the customer AK/SK or token.

URI

POST /v2/orders/customer-orders/pay

Request

Request Parameters

Parameter

Mandatory

Type

Value Range

Description

order_id

Yes

String

A maximum of 64 characters

Order ID.

The value is the same as the order_id value in the response message of invoking the API described in Querying Orders or the order_ids value in the response message of API described in Renewing Subscription to Yearly/Monthly Resources.

coupon_infos

No

List<CouponSimpleInfo>

A maximum of three coupons are supported.

This parameter is reserved.

For details, see Table 1.

discount_infos

No

List<DiscountSimpleInfo>

1

Discount ID list.

For details, see Table 2.

Table 1 CouponSimpleInfo

Parameter

Mandatory

Type

Value Range

Description

id

Yes

String

A maximum of 64 characters

Coupon ID.

type

Yes

Integer

300 to 303

Discount type.

  • 300: Discount coupon (reserved)
  • 301: Promotion coupon
  • 302: Promotion flexi-purchase coupon (reserved)
  • 303: Promotion stored-value card (reserved)
Table 2 DiscountSimpleInfo

Parameter

Mandatory

Type

Value Range

Description

id

Yes

String

A maximum of 64 characters

Discount ID.

type

Yes

Integer

[0-3,609]

Discount type.

  • 0: promotion discount
  • 1: contract discount
  • 2: commercial discount
  • 3: discount granted by a partner
  • 609: discount for adjusting an order price
    NOTE:

    Once the discount 609 (discount for adjusting an order price) is used during order payment, the discount must be used and the discount type cannot be changed.

Example Request

POST https://bss-intl.myhuaweicloud.com/v2/orders/customer-orders/pay HTTP/1.1
Content-Type: application/json
X-Auth-Token: MIIPAgYJKoZIhvcNAQcCo...ggg1BBIINPXsidG9rZ
{
    "coupon_infos": [
        {
            "id": "CP200527025610NGSC",
            "type": 301
        }
    ],
   "discount_infos": [
        {
            "id": "PDP2011260815047721TYT48G0BA02EI",
            "type": 1
        }
    ],
    "order_id": "CS20052715001E4CR"
}

Response

Response Parameters

Status code: 204

Success is returned by default.

Status code: 400

Parameter

Type

Value Range

Description

error_code

String

A maximum of 10 characters

Status code.

For details, see Returned Values.

error_msg

String

A maximum of 256 characters

Error description.

quota_infos

List<QuotaInfo>

-

List of the resources whose quota or capacity is insufficient.

For details, see Table 3.

This parameter is valid only when error_code is set to CBC.99003141.

  • If the quota is insufficient, notify the customer to submit a service ticket on the HUAWEI CLOUD official website to increase the quota and then pay the order.
  • If the capacity is insufficient, notify the customer to place an order again.
  • If the specifications have changed, notify the customer to place an order again.

enterprise_project_auth_result

List<EnterpriseProject>

-

Information about the enterprise project whose fund is insufficient.

For details, see Table 4.

This parameter is valid only when error_code is set to CBC.99003155.

Table 3 QuotaInfo

Parameter

Type

Description

region

String

Cloud service region code, for example, ap-southeast-1. Obtain the value from the Region column in Regions and Endpoints.

service_type_code

String

Cloud service type code. For example, the cloud service type code of OBS is hws.service.type.obs.

resource_type_code

String

Resource type code. For example, the resource type code of VM is hws.resource.type.vm.

The relationship between ResourceType and CloudServiceType is as follows: A resource type represents a resource contained in the cloud service type, and the cloud service type is a combination of multiple resource types.

resource_spec_code

String

Resource specifications of the subscribed cloud service products.

For example, the resource specification of a small-scale VM is s2.small.1.linux.

service_type_name

String

Cloud service type. For example, the cloud service type of ECS is Elastic Cloud Server.

resource_type_name

String

Resource type. For example, the resource type of ECS is Cloud Host.

auth_result

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.

available_zone

String

AZ ID.

For details, see the AZ names of regions listed on the Regions and Endpoints, for example, cn-north-1a.

Table 4 EnterpriseProject

Parameter

Type

Description

enterprise_project_id

String

ID of the enterprise project where an order belongs.

  • 0: ID of a default project
  • –1: Non-project ID

enterprise_project_name

String

Enterprise project name.

auth_status

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 204 No Content
Content-Type: application/json;charset=UTF-8
Content-Length: length
Date: response time 

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 Value

Error Code

Description

400

CBC.99000046

Insufficient budget.

400

CBC.30000010

Operation now allowed because the order is invalid or does not exist.

400

CBC.99003106

The order status has changed and no payment can be made.

400

CBC.99003108

This discount cannot be used for this order.

400

CBC.99003110

The order has not been paid before the expiration time. Please re-submit the order.

400

CBC.99003112

The coupon or stored-value card has been used.

400

CBC.99003115

An error occurred. Try again later.

400

CBC.99003116

The restriction to selected coupon regulates that the coupon cannot be used with the discount at the same time.

400

CBC.99003117

The selected discount is less than the minimum discount rate configured for the selected coupon.

Note: For example, if the minimum discount rate configured for a coupon is 90% and the selected discount is less than 90% in all order lines, the discount cannot be used.

400

CBC.99003141

The cloud service quota or capacity is insufficient, or the resource specifications have changed.

400

CBC.99003151

This discount cannot be used together with other discounts.

400

CBC.99003155

The enterprise project's fund quota is insufficient, or the project is invalid.

400

CBC.99003156

Coupons applicable to Marketplace products cannot be used together with dedicated coupons.

400

CBC.99003162

The add-on package that you purchased does not meet the payment requirement.

400

CBC.99005003

Insufficient balance.

400

CBC.99005036

The customer does not support payment via interface.

500

CBC.0999

Other errors.

Did you find this page helpful?

Failed to submit the feedback. Please try again later.

Which of the following issues have you encountered?







Please complete at least one feedback item.

Content most length 200 character

Content is empty.

OK Cancel