The examples are based on logging in as administrator and then performing the functions with client permissions. You can learn about authorization methods in the Service management via API article.
Glossary
cart — new cart. Each client has one shopping cart for each provider. For example, a client belongs to one provider, therefore it has one shopping cart and all items the client orders go into that cart.
lineitem.id — new cart item.
order — one or more items from the cart, for which a payment is created.
Adding an item to cart
The API of a new order is similar to the API of the old order, so the values of addons and parameters are passed in the same way, whereas additional and differing parameters are described in the table below.
For SSL and Domain product types, use functions like "{ITEMTYPE}.order.param". To add these services to the cart via API using quick order, use the old order API with parameters "clicked_button=quickbasket" and "force_use_new_cart=on".
Name
Description
Meaning
Example
func *
Order function
v2.{ITEMTYPE}.order.param
{ITEMTYPE} — internal product type name
func=v2.soft.order.param
func=v2.vds.order.param
func=v2.dedic.order.param
order_period *
Order period
Assumes one of the following values:
1 — month
3 — 3 months
6 — 6 months
12 — year
24 — 2 years
36 — 3 years
order_period=1
pricelist *
Tariff ID
Integer
pricelist=111
sok *
Confirm the operation
ok
sok=ok
clicked_button *
Operation subtype
order
clicked_button=order
autoprolong
Enable auto-renewal
Flag
Assumes one of the following values:
on
off
autoprolong=on
datacenter
ID of the data center where the service will be opened
Integer
datacenter=2
force_use_new_cart
Enable use of the new shopping cart
Flag
Assumes one of the following values:
on
off
force_use_new_cart=on
out
Response format
Assumes one of the following values:
xml
xjson
devel
text
out=xml
addon_{ADDON_PRICELIST_ID}
Addon value
The value depends on the setting of the addon in the tariff plan
Tariff addons are passed through the API via the addon_ parameter. For example, addon_5=10, where
5 is the addon code,
10 - value.
To find the addon code, enter Products → Tariff plan → Options →Id field
addon_12=126
skipbasket
Enable payment for the service from the personal account without placing it in the cart
By clicking on the link the client will be directed to the cart with the selected item (lineitem.id) and its price, and can proceed to payment for the ordered item or continue shopping.
Use this interaction option if:
a payer is required for payment, but the client has not created one yet. When placing an order, the client will specify all the necessary data for the payer through the billing platform interface;
phone or mail confirmation is required before payment. When placing an order, the client will be prompted to undergo verification.
Free item activation
You can activate a free item in two ways: specify skipbasket=on when ordering a service or use a request:
storedmethod_id — ID of the saved client's payment method
Integer
Specify paymethod_id=0 to use personal account as a payment method
paymethod_id=15
storedmethod_id=455
profile_id
Payer ID
Specified if a payer is required for the selected payment method
Integer
profile_id=42
store_paymethod
If the parameter assumes the value "on" and the payment method supports the option to save the selected payment method, the method of this payment will be saved for the client