All Products
Search
Document Center

Edge Security Acceleration:PurchaseRatePlan

Last Updated:Mar 17, 2026

Call PurchaseRatePlan to purchase a rate plan.

Operation description

  1. Retrieve the plan name and plan code by calling DescribeRatePlanPrice.

  2. If the acceleration region is not overseas, your site must have a valid ICP filing.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

esa:PurchaseRatePlan

create

*All Resource

*

None None

Request parameters

Parameter

Type

Required

Description

Example

PlanName

string

No

Plan name.

Alibaba Cloud China Website (www.aliyun.com)

  • Free Edition: entranceplan

  • Basic Plan: basic

  • Standard Edition: medium

  • Premium Edition: high

Alibaba Cloud International Website (www.alibabacloud.com)

  • Entrance: entranceplan_intl

  • Pro: basicplan_intl

  • Premium: vipplan_intl

basic

PlanCode

string

No

Plan code.

Alibaba Cloud China Website (www.aliyun.com)

  • Free Edition: entranceplan

  • Basic Plan: basicplan

  • Standard Edition: standardplan

  • Premium Edition: advancedplan

Alibaba Cloud International Website (www.alibabacloud.com)

  • Entrance: entranceplan

  • Pro: standardplan

  • Premium: advancedpla

basicplan

SiteName

string

No

Site name.

test.com

Coverage

string

No

Acceleration region:

  • domestic: Mainland China only.

  • global: Worldwide.

  • overseas: Worldwide except mainland China.

domestic

Type

string

No

Site access type:

  • NS: NS record access.

  • CNAME: CNAME record access.

CNAME

AutoRenew

boolean

No

Enable auto-renewal:

  • true: Enable auto-renewal.

  • false: Disable auto-renewal.

true

Period

integer

No

Subscription period in months.

1

ChargeType

string

No

Billing method:

  • PREPAY: Subscription.

  • POSTPAY: Pay-as-you-go.

PREPAY

AutoPay

boolean

No

Enable automatic payment.

true

Amount

integer

No

Number of plans to purchase.

1

Channel

string

No

Response elements

Element

Type

Description

Example

object

Response structure.

RequestId

string

Request ID.

30423A7F-A83D-1E24-B80E-86DD25790758

OrderId

string

Order ID.

123123

InstanceId

string

Instance ID.

esa-site-ads11w

Examples

Success response

JSON format

{
  "RequestId": "30423A7F-A83D-1E24-B80E-86DD25790758",
  "OrderId": "123123",
  "InstanceId": "esa-site-ads11w"
}

Error codes

HTTP status code

Error code

Error message

Description

400 CheckOrderFailed Invalid order parameter. Invalid order parameter.
400 InternalError An internal exception occurred, please try again later. An inner exception was triggered. Please try again later.
400 InvalidSiteICP The specified website does not have an ICP filing or the filing information is invalid. Make sure your website is filed and try again. The specified website does not have an ICP filing or the filing information is invalid. Make sure your website is filed and try again.
400 InvalidSiteName Invalid website name. Check and try again. Invalid website name. Check and try again.
400 SYSTEM.NoSpecificCodeFailed Invalid subscription duration. Check and try again. Invalid subscription duration. Check and try again.
400 CheckPlanFailed Invalid plan name or code. Check and try again. Invalid plan name or code. Check and try again.
400 SubSiteUnavailable Subdomains are allowed only in Enterprise plans. Upgrade your plan to add a subdomain to ESA. Subdomains are allowed only in Enterprise plans. Upgrade your plan to add a subdomain to ESA.
400 InsufficientAvailableQuota Your account balance is insufficient. Your account is in arrears, please pay the arrears before purchasing.
400 InsufficientBalance Your account balance is insufficient. Your account balance is insufficient, please recharge before purchasing.
400 InvalidComponent The order parameters is invalid. The order parameters is invalid.
400 RamAuthFailed The sub-account has no operation permission.
400 BuyWithSiteAmountErr Site-based purchase plans do not support bulk purchasing. Site-based purchase plans do not support bulk purchasing.
400 EnterpriseAmountErr Enterprise plans do not support bulk purchase. Enterprise plans do not support bulk purchase.
400 TrialService.HasOpened You have already activated the trial service. You have activated the trial service and cannot activate it again.
400 UserQuantityExceed Your current purchase quantity exceeds the available quantity. Please select a new quantity. Your current purchase quantity exceeds the available quantity. Please select a new quantity.
400 BASIC_INFO_UNCOMPLETED You have not completed your personal basic information. Please complete the information and try again. You have not completed your basic personal information. Please complete the information and re-operate. (If the current account is a managed sub-account, please contact the main account and click this link to complete the information.) 400 NoRealNameAuthentication You have not completed real-name authentication. You have not completed real-name authentication.
400 NoAvaliablePaymentMethod No payment method is specified for your account. We recommend that you add a payment method. No payment method has been specified for your account. We recommend that you add a payment method.
400 CloudUserCannotBuyNotInnerCommodity No group cloud product label, can not be purchased. No group cloud product label, can not be purchased.
400 AccountStatusIllegal The account status is illegal. The account status is illegal.
400 ContainForbiddenLabelError Placing an order is blocked due to an applied restriction label. There is a label that prohibits placing an order and cannot place an order.
400 AmountExceed.Entranceplan The parameter Amount exceeds the number of entrance plan that can be purchased. The parameter Amount exceeds the number of free versions that can be purchased.
400 QuotaExceed.FreePlan Your account has reached the maximum allowed quota for free plan purchases. Your account has reached the maximum allowed quota for free plan purchases.
400 PlanOrderUnpaid You have an unpaid ESA order. Please complete or void the order at the User Center before placing another order. You have an unpaid ESA order. Please complete or void the order at the User Center before placing another order.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.