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 | The domain name of the reseller linked to the Customer Store (see Viewing and updating reseller domain information) |
plan_id | Required | The ID of the plan to which a subscription is ordered (see Viewing the list of plans) |
plan_period_id | Required | The 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 needs to 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. The key is case-sensitive, so it is important to specify it in a buy-link exactly as on the manager information page. For example, Links with the attribute |
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 attribute |
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 carter81:
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=carter81
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