Buy-link template for ordering a Service via Storefront
When a customer orders a new Service via Storefront, a buy-link attached to the Buy now (or Try it) button on the Product page (see Product page) is used. A buy-link is generated using a template and includes information required for ordering a Service. By clicking the button, a customer is redirected to the Customer Control Panel for creating a Sales Order.
In this article:
Template
A buy-link for ordering a Service via Storefront is generated using the following template:
https://{base_url}/external_dispatcher/settle?shopping_cart_items[][plan_id]={plan_id}&shopping_cart_items[][plan_period_id]={plan_period_id}&shopping_cart_items[][type]=application&manager_key={manager_key}&shopping_cart_items[][type]=topup&shopping_cart_items[][amount]={topup_amount}&skip_all_steps=1
Attributes in a buy-link are specified via &
. Some attributes are optional (see the description and examples below). The attribute &shopping_cart_items[][type]=application
does not require modifications and should always be specified as is.
Attributes
Attribute | Required/Optional | Description |
---|---|---|
base_url | Required | Domain name of the Reseller linked to the Customer Store (see Viewing and updating Reseller domain information) |
plan_id | Required | ID of the Plan to which a Subscription is ordered (see Viewing the List of Plans) |
plan_period_id | Required | ID of the Plan Period to which a Subscription is ordered (see Updating Plan Periods) In Storefront, on the Product page, the ID of a Plan Period corresponding to a Subscription with the minimal price within the Plan is automatically linked to the Buy now button. The ID of a trial Plan Period is automatically linked to the Try it button (see Product page). A customer can change the Plan Period on the Subscription configuration step in the Customer Control Panel. |
manager_key | Optional | The key of a Manager if it is necessary to link the customer's Account to a given Manager. In Storefront, the Manager's key is not displayed in the URLs of its pages. A Manager should manually provide a customer with a link that includes the key. The Manager's key can be added to a link with the URL of any page of Storefront. |
topup_amount | Optional | The amount of a top-up Payment in the Reseller currency required to start the Service provisioning. The attribute can only be used for ordering a prepaid Subscription with the Pay as you go billing type (see Pay as you go. Charges generation) without any Resource fees. When a customer orders a new Service via Storefront, using a link with the |
skip_all_steps=1 | Optional | When a customer orders a new Service via Storefront, using a link with the |
Examples
A buy-link to order a Subscription from the test.activeplatform.com Reseller to a Plan with the ID = 425 and a Plan Period with the ID = 1840:
https://test.activeplatform.com/external_dispatcher/settle?shopping_cart_items[][plan_id]=425&shopping_cart_items[][plan_period_id]=1840&shopping_cart_items[][type]=application
A buy-link to order a Subscription from the test.activeplatform.com Reseller to a Plan with the ID = 425 and a Plan Period with the ID = 1840, the Manager's key is ivanov22:
https://test.activeplatform.com/external_dispatcher/settle?shopping_cart_items[][plan_id]=425&shopping_cart_items[][plan_period_id]=1840&shopping_cart_items[][type]=application&manager_key=ivanov22
A buy-link to order a prepaid Subscription with the Pay as you go (internal) billing type from the test.activeplatform.com Reseller to a Plan with the ID = 569 and a Plan Period with the ID = 2072, the top-up amount is 1000:
https://test.activeplatform.com/external_dispatcher/settle?shopping_cart_items[][plan_id]=569&shopping_cart_items[][plan_period_id]=2072&shopping_cart_items[][type]=application&shopping_cart_items[][type]=topup&shopping_cart_items[][amount]={1000}&skip_all_steps=1