Skip to main content
knowledgecenter.avangate.com

Upgrade links

Overview

Create upgrade links and offer them to your customers. 

Availability

All Avangate accounts. 

Requirements

Configure upgrades for your products/subscription plans.

Create the upgrade link

To build upgrade links you need the following two elements:

  1. The main upgrade link 
    https://secure.avangate.com/order/upgrade.php?
  2. The unique subscription identifier from the Avangate system: LICENSE=1234567.

The simplest upgrade link you can build is:

https://secure.avangate.com/order/upgrade.php?LICENSE=1234567

Query parameters

The following table summarizes the query parameters that you can insert into links to customize upgrades.

 
Parameters Type / Description
LICENSE Required
 

Specifies the subscription to be upgraded.

Example: https://secure.avangate.com/order/upgrade.php?LICENSE=1234567
LANG Optional
 

ISO country code of the language used for the order processing interface and shopper emails.

Default value: EN.

CURRENCY Optional
  Preselects the billing currency to be used in the transaction.
SHOPURL Optional
  Custom URL used for "Back to shopping" link.
OPTIONS Optional
 

Preselects the pricing options for the subscription, using the pricing options codes (the IDs you set for each option individually).

Example: OPTIONS5211=5usr,2year.
UPGRADEPROD

Required in conjunction with UPGRADEOPT.

Optional otherwise.

  Product ID of the target product used in the upgrade process.
UPGRADEOPT

Optional

  Product option code of the target product used in the upgrade process. Can only be used in conjunction with UPGRADEPROD.
DESIGN_TYPE Optional
  Use DESIGN_TYPE=1 to change the layout of the shopping cart template interface, positioning the payment methods selector in a more prominent position, above the billing details area.
LAYOUT_TYPE Optional
 

Enables you to control which version of the shopping cart Avangate serves to shoppers.

Possible values:

  • CLASSIC - the desktop variant of the shopping cart (Avangate serves the desktop version of the cart even to mobile device users.)
  • MOBILE - Avangate mobile cart (Avangate serves the mobile version of the shopping cart, even to users of desktop browsers.)
REF Optional
  External order reference (string). Add a string identifier to every URL (less than 100 characters). Avangate saves the string at order-level, in addition to the system generated order reference. If there is a need for longer references, use a md5 hash. To access external reference info navigate to the order details page.
SRC Optional
  Identifies the source of a sale by assigning a unique URL identifier. For instance, if there are two buy links on your website, one in the product page and another one in the download page, you can track the source page by entering the following parameters:
  • SRC=prodpage for the product page
  • SRC=dlpage for the link on the download page
COUPON Optional
 

Promotion coupon code applied to the order. Use commas (,) to separate multiple values.

Example: [...]&COUPON=voucher1,voucher2[...] 
CARD Optional
 

Possible values:

  • 1 to display the payment form in the selected landing page. Shoppers get to place orders from the Review page.
  • 2 to display the payment form in the selected landing page, and shoppers to place orders immediately after entering their payment data, excluding the Review page.
ORDERSTYLE Optional
  Allows you to set the desired ordering interface template, overriding the default template assigned to the product group. Each template defined in the Interface Templates area of the Control Panel has a unique identifier associated which is visible in the browser address bar when previewing the shopping cart.
AUTO_PREFILL=1 Optional
 

Requires Avangate activation before using.

 

Use AUTO_PREFILL=1 to set the ZIP code and country fields as mandatory. Address, City and State details are calculated automatically by the Avangate system. The address can be excluded completely. Using the AUTO_PREFILL=1 parameter without the feature being enabled for your account will result in shoppers following the classic purchase flow, where all billing address data is mandatory. 

Example

https://secure.avangate.com/order/upgrade.php?LICENSE=1234567&CURRENCY=EUR

Upgrade a specific subscription

To trigger the upgrade of a specific subscription, include the LICENSE parameter in the upgrade link, where 1A22223BC4 represents the Avangate Subscription Reference.

https://secure.avangate.com/order/upgrade.php?LICENSE=1A22223BC4

Domain use

  1. secure.avangate.com. If your account is using the Avangate's secure.avangate.com domain, then your custom on-demand renewal links would look like this: https://secure.avangate.com/order/upgrade.php?
  2. Custom domains such as store.YourDomain.com. If your account is using a custom domain such as store.YourDomain.com, then your custom on-demand renewal links would look like this: https://store.YourDomain.com /order/upgrade.php?

Build on-demand upgrade links

On-demand upgrade links allow you to create your own rules in terms of product upgrades, overriding existing upgrade settings through URL parameters.

You can define:

  • the upgrade product
  • upgrade price
  • pricing options
  • time interval added to the subscription lifetime

Build your upgrade links using the following parameters.

Parameter Type/Description
LICENSE Required
 

Specifies the subscription to be upgraded.

Example: https://secure.avangate.com/order/upgrade.php?LICENSE=1234567
PROD Required
  Product ID of the target product used in the upgrade process.
PRICES PRODUCTID[CURRENCY] Optional
 

Price and currency to be used for the upgrade product.

Example: PRICES4692644[USD]=999
PERIOD Optional
  Period of time to replace the subscription lifetime. Starts when the order is finalized. Requires PRICES parameter.
OPTIONS PRODUCTID Optional
 

Product pricing options to be applied to the upgrade product.

Example: OPTIONS4692644=option1,option2
PHASH Required if using PRICE, PERIOD and/or OPTIONS.
  All custom upgrade links require digital signing, similar to current manual renewal links.

Upgrade a subscription with a specific price and period of time

For this example, let's assume that we need a custom on-demand upgrade link for Subscription A (monthly subscription expiring on June 30th, 2013 with the reference ABC1D2E345) associated with Product A with the ID 1234567.

Product A is offered to customers in two versions:

  • 1 user (code: 1user) - $99.99; (the customer using Subscription A opted for this particular pricing option).
  • 2 users (code: 2users) - $149.99.

You're looking to prolong the subscription lifetime with 30 days, and charge the customer $50. We'll use the some of the parameters listed above:

LICENSE=ABC1D2E345

PROD=1234567

OPTIONS=1user

PRICES[USD]=50

PERIOD=30

https://secure.avangate.com/order/upgrade.php?LICENSE=ABC1D2E345&PROD=1234567&OPTIONS=1user&PRICES[USD]=50&PERIOD=30

Build the PHASH for the link above.

  1. Using the parameters above, you get the following sequence: LICENSE=ABC1D2E345&PROD=1234567&OPTIONS=1user&PRICES[USD]=50&PERIOD=30.
  2. You need to add the length of the character sequence at its beginning, to calculate the hash, namely 70. The resulting BASE STRING is 70LICENSE=ABC1D2E345&PROD=1234567&OPTIONS=1user&PRICES[USD]=50&PERIOD=30.
  3. For the purpose of this demo, let's assume that your secret key is SECRET_KEY.
  4. Use the secret key and the base string to calculate the HMAC-MD5 HASH. The result should be: ea470112390e374629a8f05e0df36e0ab41ee056 (valid exclusively for this example).
  5. Build your complete link:
https://secure.avangate.com/order/upgrade.php?LICENSE=ABC1D2E345&PROD=1234567&OPTIONS=1user&PRICES[USD]=50&PERIOD=30&PHASH=ea470112390e374629a8f05e0df36e0ab41ee056