Skip to main content

Place upgrade partner orders

Overview

Purchase upgrades in addition to new licenses and subscription renewals. The 2Checkout platform enables you to offer partners upgrades to:

  • A different subscription/product;
  • A newer version of the current subscription/product;
  • A distinct licensing option of the same subscription/product.

Requirements

  • It's mandatory to associate upgrades to the same price list as the original products (subscriptions/licenses), and to assign them to partners to provide access. Products that are not part of price lists assigned to partners will not be available as upgrade options.
  • Upgrades are only available for active subscriptions/licenses. As long as expired licenses/subscriptions are still in their grace period (featuring the Past due status), upgrading them is a valid option.
  • When defining the product which will act as the upgrade make sure to also generate a subscription under the Renewal tab. Products can only be upgraded to offerings for which a subscription was generated, when ordering on behalf of your partners. If the upgrade is not a subscription, select none as the Renewal interval. This creates a lifetime license.

Place partner upgrade orders

  1. Go to Orders & customers -> Place partner order.
  2. Select the partner for which you're ordering upgrades, either by typing the name in the Select partner box, or by using the drop down menu available. Alternatively, provided that you already placed orders on behalf of your partners, a list of Last used partners will be available in this area, and clicking on a name will automatically select it.
  3. Select Upgrade to move to the next stage.
  4. Search for subscriptions/licenses you want to upgrade. The results returned for the search include only active, upgradable subscriptions/licenses previously purchased by the selected partner. Expired or disabled subscriptions/licenses, as well as those for which you haven't defined an upgrade, will not be listed here. Upgrades need to be ordered individually, one at a time, unlike prolonging subscriptions, where you can bulk renew a number of selected items. The reason for this is the fact that each product subscription/license can have different upgrade options, requiring you to customize each item individually. However, once you add an upgrade to cart, you can continue doing so for more subscriptions/products. You'll be able to add to cart and order as many upgrades as you wish, but you have to do it one by one. The quantity/number of units of the upgrade is locked and cannot be modified, unlike additional options you configured.
  5. Editing functionality for upgrade orders involves options such as adding more upgrades, remove added items one by one or all at once, and communicate with your partner through comments. You can even edit the specific details of a subscription/license already added to cart, if you would like to modify the options selected initially, for example.
  6. Step 4: Add extra margin/discount options to decrease the cost of an upgrade for your partner. Extra margins and discounts are entirely optional and completely under your control.
    • Discount - Apply a discount to the product(s) value in this order. The discount is deducted from the total price of the products before partner margin is applied.
    • Extra margin - Offer an extra margin to your partner only for this order. The extra margin is deducted from the total price of the products after discount and partner margin are applied.
  7. Place the order. Hit the Place order button to place an upgrade order once all the details are final.
  8. Order confirmation. Orders placed by you on behalf of your partners are confirmed automatically, regardless of the order confirmation settings of the partner account.
  9. Attach end user information. For upgrades, the 2Checkout system is designed to copy the end user information attached to the original subscription/license. However, when such data is not available, you'll need to provide it for the order to move to the delivery/fulfillment stage (if they are required according to the Partner commercial settings). 2Checkout needs at least the email address of partners/shoppers to deliver keys for orders that require end user information.
  10. Attach reseller information. Reseller information is also copied automatically from the original subscription/licenses as a part of the upgrade process. Similarly, when such data is not available, you'll need to provide it for the order to move to the delivery/fulfillment stage, if the reseller information is required according to that partner's commercial settings.
  11. Pay partner invoices. Partner invoices can be generated manually or automatically, depending on your partner account settings. If the order is placed without any available credit, or your partners do not enjoy a credit limit - they will first need to pay the partner invoice that gets generated automatically when the order is confirmed, and only then will the process advance to the delivery/fulfillment stage. To manually issue a partner invoice, go to Partner invoices under Orders & customers.
  12. Click the item in the list of available orders on the left hand side of the page to add them to the partner invoice you're generating, and click Preview.
  13. Click Save to create the partner partner invoice. On the next screen you'll have the option to notify your partner of the newly generated partner invoice or to cancel it if necessary.
  14. Delivery/fulfillment: When delivery/fulfillment is handled by 2Checkout, not required or has been confirmed by you, the system will give green light to deliveries immediately for order that are paid in full or placed within available credit. Fulfillment for partner orders guidance is available here.

Error messages

UPGRADE_PRICELIST_UNAVAILABLE

Upgrade is not available for this license because the product is no longer available in the initial price list. Please revise the price settings for this product.

UPGRADE_TO_PRODUCT_NOT_IN_LIST

Upgrade is not available for this license because the upgrade options set for this product are not part of the initial purchase price list. Please revise the price settings for this product.

UPGRADE_LICENCE_DISABLED

License is disabled.

UPGRADE_TO_PRODUCTS_NO_RENEWAL Upgrade is not available because subscriptions are not being generated for any of the upgrade options.

Electronic delivery and payment receipt

Use the variables in the list below to customize the Electronic delivery and payment receipt shopper email according to your needs. Check the 'Mandatory' column to see the variables that are required in your customized version of the e-mail.

Variable name Description Test value Mandatory
ADDITIONAL_PRODUCT_INFO Additional product-level fulfillment information set in the Avangate Control Panel Additional delivery information for this product. No
ADDRESS1 First section of the billing address [123, Main Street] No
ADDRESS1_D First section of the delivery address [123, Main Street] No
ADDRESS2 Second section of the billing address 0 No
ADDRESS2_D Second section of the delivery address 0 No
ALLOW_MYACCOUNT_PROMO Include or exclude myAccount information in the email body 1 No
APPROVAL Issuer (bank) payment idetifier 0 No
ATTACHMENT Indicates whether or not you configured the product keys to be sent as an email attachment. Possible values:
TRUE if the email contains an attachment
FALSE if the email doesn't contain an attachment
0 No
AVANGATE_COMPANY_NAME Avangate company name Avangate No
AVANGATE_LOGO Avangate logo URL https://secure.avangate.com/images/e...endor_logo.png Yes
AVANGATE_WEBSITE Avangate website http://www.avangate.com Yes
AVANGATE_ON_BANK_STATEMENT_GENERIC This is mandatory content you need to keep in your emails, given Avangate acts as Reseller / Merchant of Record for online purchases on your website. The charge on your bank statement will appear as Avangate. Yes
AVS_MATCH Gateway AVS 0 No
BANK_STATEMENT Account statement descriptor 0 No
BANK_STATEMENT_DESCRIPTOR Account statement descriptor 0 No
BASE_URL Merchant's full host https://secure.avangate.com No
BUSINESS_COMPANY Avangate company name Avangate No
BUSINESS_HOTLINE Avangate support phone +31 88 0000008 No
BUSINESS_HOTLINEUS Avangate US hotline number +1 (650) 963-5701 / (888) 247-1614 No
BUSINESS_SUPEMAIL Avangate support email address support@avangate.com No
BUSINESS_WEBSITE Avangate website http://www.avangate.com No
CARD_LAST_DIGITS Last 4 digits of the card used to perform the payment 1234 No
CBANKACCOUNT Shopper's bank account used on the billing information 0 No
CBANKNAME Shopper's bank name used on the billing information 0 No
CITY Shopper's city used on the billing information Anytown No
CITY_D Shopper's city used on the delivery information Anytown No
CODES Product keys to be delivered to the shopper. Each item of the array has two values: key and description  0 No
CODES[index1].description Product key description. Key description No
CODES[index1].key Product key. 123-ABC-1key-example No
COMMERCIALNAME Merchant's commercial name [Software Company Name] No
COMPANY Shopper's company name used on the billing information [Customer company] No
COMPANY_D Shopper company name used on the delivery information. If no delivery information is available. no company name is displayed. [Customer company] No
COUNTRY Shopper's country used on the billing information [U.S.A] No
COUNTRY_D Shopper's country used on the delivery information [U.S.A] No
CURRENCY Order billing currency USD Yes
CURRENCY_ORIGINAL Original order currency (applicable to refunds) 0 No
CUSTOMEREMAIL Shopper's email address used on the billing information example@customer-email.com No
CVV2_MATCH Gateway CVV2 check response 0 No
DISPLAY_MY_ACCOUNT_INFO Include or exclude myAccount information in the email body 1 No
DOWNLOAD_INSURANCE

Indicates whether or not the purchase includes Download Insurance Service. Possible values

  • TRUE
  • FALSE
0 No
DOWNLOAD_LINK_DELIVERY Indicates whether or not a download link is available. Possible values:
TRUE
FALSE
1 No
EMAIL Shopper email address used on the delivery information. If no delivery information is available. the billing information is used. example@customer-email.com No
ENCRYPTED_MERCHANT_CODE Encrypted merchant code 0 No
FIRSTNAME Shopper's first name used on the billing information [John  
FIRSTNAME_D Shopper's first name used on the delivery information [John No
FIRST_NAME_BILLING Shopper's first name used on the billing information John Yes
FIRST_NAME_DELIVERY Shopper's first name used on the delivery information John No
FISCALCODE Shopper's fiscal code used on the billing information 0 No
GATEWAY_ERROR_CODE Gateway error code GW_PROCESSING_ERROR
See the full list of Possible Values
No
GATEWAY_ERROR_MESSAGE Reason why the transaction failed. (e.g. Invalid card, insufficient funds) Error processing the card transaction. The card account has not been debited. Card data is invalid or incomplete. No
GENERALTOTAL Total order price 135.2 No
GLOBALDISCOUNT Order total discount 8.33 No
HAS_RENEWAL_PRODUCTS Flag that indicates whether at least one product has renewal settings 0 No
HAVEPAYMENTRCPT Signals that the mail includes a payment receipt 1 No
INT_REF Global Collect internal reference 0 No
IS_RENEWAL Flag that indicates whether at least one product has renewal settings 0 No
LANGUAGE Order language (abbreviated) selected by shopper en No
LASTNAME Shopper's last name used on the billing information Doe] No
LASTNAME_D Shopper's last name used on the delivery information Doe] No
LAST_NAME_BILLING Shopper's last name used on the billing information Doe Yes
LAST_NAME_DELIVERY Shopper's last name used on the delivery information Doe No
LICENSE_TYPE Type of subscription generated by the purchase product 0 No
MERCHANT_COMMERCIAL_NAME Merchant's commercial name Software Company Name No
MERCHANT_SUPPORT_EMAIL Merchant support email address support@software-company-website.com No
MERCHANT_SUPPORT_PHONE Merchant support phone number 888-xxx-xxxx  
MOREINFO Additional product-level fulfillment information set in the Avangate Control Panel [Additional delivery information for this product.] No
MORE_EMAIL_INFO 0 0 No
MY_ACCOUNT_LOGIN_EMAIL Email address used by shopper to login/signup to myAccount example@customer-email.com No
MY_ACCOUNT_LOGIN_URL Avangate myAccount login/sign-up URL secure.sofware-company-website.com/myaccount/?lang=en Yes
NAMES_OF_PRODUCTS Names of all products in the order, comma separated 0 No
ORDERDATE Order placement date [2016-07-12] No
ORDER_AMOUNT Total order price 135.2 Yes
ORDER_AMOUNT_ORIGINAL Original order value (applicable to refunds) 0 No
ORDER_DATE Order placement date 42563 Yes
ORDER_DATE_STANDARD_FORMAT Standard format used for the order placement date 0 No
ORDER_FLOW Purchase flow used to place the order 0 No
ORDER_REFERENCE_NUMBER Order reference number 9xxxxxx Yes
ORDER_STATUS Order status 0 No
ORDER_WEBSITE Website where the shopper placed the order http://www.software-company-website.com Yes
PAYMENT_METHOD English name for the payment method used Visa/MasterCard/Eurocard Yes
PAYMENT_TYPE_INFO English payment method name. Includes last four card digits (if applicable). 0 No
PAYTYPESTR English name for the payment method used [Visa/MasterCard/Eurocard] No
PHONE Shopper's phone number used on the billing information 0 No
PHONE_D Shopper's phone number used on the delivery information [555-555-555] No
PRODUCTID Product ID number 0 No
PRODUCTNAME Product name [Test product name] Yes
PRODUCTQTY Purchased product quantity 0 No
PRODUCTS[index1].DISCOUNT Product discount value per product line 0 No
PRODUCTS[index1].ID Product ID number 1001 No
PRODUCTS[index1].INFO Additional product information defined by merchant when generating buy links Product info 1 No
PRODUCTS[index1].IS_TRIAL Indicates whether this is a trial product 1 No
PRODUCTS[index1].LICENSE_TYPE Type of purchased subscription TRIAL No
PRODUCTS[index1].PCODE Product code. [P_CODE_1] No
PRODUCTS[index1].PID Product ID number 1001 No
PRODUCTS[index1].PNAME Product name [Test product name 1] No
PRODUCTS[index1].PRICE Product unit price 100 No
PRODUCTS[index1].PRODUCTNAME   0 No
PRODUCTS[index1].PRODUCT_OPTIONS[index2].OptionText Ignore internal var. 0 No
PRODUCTS[index1].PROMONAME Name of the promotion applied to the product 0 No
PRODUCTS[index1].QUANTITY Purchased product quantity 1 No
PRODUCTS[index1].SHORT_DESCRIPTION Short product description 0 No
PRODUCTS[index1].TOTAL Total gross price per product line (before applying discounts) 120 No
PRODUCTS[index1].TOTAL_PRICE Total net price per product line (before applying discounts) 100 No
PRODUCTS[index1].TRIAL_PERIOD Product trial period. 7 No
PRODUCTS[index1].UNIT_PRICE Product unit price 100 No
PRODUCTS[index1].VAT VAT/Sales tax value per product line 20 No
PRODUCTS_DATA[index1].IdProduct Product ID number 0 No
PRODUCTS_DATA[index1].PRODUCT_SHORT_DESCRIPTION Short product description 0 No
PRODUCTS_NO Number of products in cart 0 No
PRODUCT_DATA[index1].CODES[index2].description   0 No
PRODUCT_DATA[index1].CODES[index2].key   0 No
PRODUCT_DATA[index1].DOWNLOAD_LINK   # No
PRODUCT_DATA[index1].HAS_CODES_ATTACHED   0 No
PRODUCT_DATA[index1].HAS_DOWNLOAD_LINK   1 No
PRODUCT_DATA[index1].MORE_EMAIL_INFO   Additional product information No
PRODUCT_DATA[index1].NAME   Test product name 1 No
PRODUCT_DATA[index1].PRODUCT_OPTIONS   0 No
PRODUCT_DATA[index1].PRODUCT_OPTIONS[index2].OptionText   0 No
REFNO Order reference number [9xxxxxx] No
REGISTRATIONNUMBER Shopper's registration number used on the billing information 0 No
RETRYLINK Payment retry link 0 No
RETRY_LINK Payment retry link 0 No
SELLERWEBSITE Website where the shopper placed the order http://www.software-company-website.com No
SHIPPING Shipping fee amount 0 No
SHIPPING_FEE Shipping fee amount 0 No
SHOPPER_ADDRESS_1_BILLING First section of the billing address 123, Main Street No
SHOPPER_ADDRESS_1_DELIVERY First section of the delivery address 123, Main Street No
SHOPPER_ADDRESS_2_BILLING Second section of the billing address 0 No
SHOPPER_ADDRESS_2_DELIVERY Second section of the delivery address 0 No
SHOPPER_CITY_BILLING Shopper's city used on the billing information Anytown No
SHOPPER_CITY_DELIVERY Shopper's city used on the delivery information Anytown No
SHOPPER_COMPANY_BILLING Shopper's company name used on the billing information Customer company No
SHOPPER_COMPANY_DELIVERY Shopper company name used on the delivery information. If no delivery information is available. no company name is displayed. Customer company No
SHOPPER_COUNTRY_BILLING Shopper's country used on the billing information U.S.A. No
SHOPPER_COUNTRY_DELIVERY Shopper's country used on the delivery information U.S.A. No
SHOPPER_EMAIL_ADDRESS_DELIVERY Shopper email address used on the delivery information. If no delivery information is available. the billing information is used. example@customer-email.com No
SHOPPER_STATE_BILLING Shopper's state used on the billing information Anystate No
SHOPPER_STATE_DELIVERY Shopper's state used on the delivery information Anystate No
SHOPPER_ZIP_CODE_BILLING Shopper's ZIP code used on the billing information 12345 No
SHOPPER_ZIP_CODE_DELIVERY Shopper's ZIP code used on the delivery information 12345 No
STATE Shopper's state used on the billing information Anystate] No
STATE_D Shopper's state used on the delivery information Anystate] No
SUBTOTAL The order amount without vat and shipping 112.67 No
TECHEMAIL Merchant support email address support@software-company-website.com No
TECHPHONE Merchant support phone number [888-xxx-xxxx] No
TOTALEQUIV The order amount converted to all the merchant's currencies 0 No
TOTAL_DISCOUNT Total order discount 8.33 No
TOTAL_VAT Total order VAT 12 No
UPLOADLINK File upload link 0 No
UPLOAD_LINK File upload link 0 No
USER_EMAIL Email address used by shopper to login/signup to myAccount example@customer-email.com No
USER_TOKEN Shopper token for Avangate myAccount access xxxxxxxxxxxx No
VALIDATION_CODE Global Collect validation code 0 No
WEBSITE Website where the shopper placed the order http://www.software-company-website.com No
ZIPCODE Shopper's ZIP code used on the billing information 12345 No
ZIPCODE_D Shopper's ZIP code used on the delivery information [12345 No

API Requests

Overview

Perform easy account management via API Requests. The 2Checkout API portfolio contains extended capabilities that can help you automate processes as creating products or promotions, placing orders (both with catalog and dynamic product information), issuing refunds, retrieving the shipping price for an order, handling subscriptions, and many others.

 

 

Remove products

Overview

Use deletePromotionProducts to remove products from an existing promotion.

Parameters

Parameter Type/Description

promotionCode

Required (string)

 

The code corresponding to the promotion that you want to remove products from.

promotionProducts

Required (object)

 

Code

Required (string)

 

 

System generated product code.

 

pricingConfigurationCode

Required (string)

 

 

System generated pricing configuration code.

 

pricingOptionCodes

Required (array of strings)

 

 

Pricing option codes that you control.

Response

Parameter Type/Description
Status Boolean
  True or False

Request

<?php

require ('PATH_TO_AUTH');

$promotionCode = 'MY_PROMO_CODE_1';

// Define the first product to remove from the promotion
$newProduct1 = new stdClass;
$newProduct1->Code = '';
$newProduct1->PricingConfigurationCode = '';
$newProduct1->PricingOptionCodes = ['',''];

// Define another product to remove from the promotion
$newProduct2 = new stdClass;
$newProduct2->Code = '';
$newProduct2->PricingOptionCodes = [''];

$productPromotion = [$newProduct1, $newProduct2];

$jsonRpcRequest = array (
'jsonrpc' => '2.0',
'id' => $i++,
'method' => 'deletePromotionProducts',
'params' => array($sessionID, $promotionCode, $productPromotion)
);
var_dump (callRPC($jsonRpcRequest, $host));

Create an upsell campaign

Overview

Use the createUpSellCampaign method to create an upsell campaign via JSON-RPC API 6.0.

Request parameters

Parameters Type Required/Optional Description

Name

String

Required

Name of campaign, max 500 characters.

StartDate

String

Optional

The date when the up-sell campaign starts, in the YYYY-MM-DD format. Can be NULL (starts immediately after enabling).

EndDate

String

Optional

The date when the up-sell campaign ends, in the YYYY-MM-DD format. Can be NULL (ends immediately after disabling).

DisplayForManualRenewals

Boolean/Integer

Required

Flag to control if the campaign will be displayed for manual subscription renewal orders. Can be set as true/false/0/1.

Discount

Object

Required

Discount definition object, details below:

      Type

String

Required

Type of discount. Can be FIXED or PERCENT.

      Value

Integer

Required

Percentage discount value (PERCENT discount only).

      Values

Array of objects

Required

List of currency discounts (FIXED discount only), details below:

            Currency

String

Required

Code of Currency for the related amount.

            Amount

Integer

Required

Discount amount value for the related currency.

      DefaultCurrency

String

Required

Code of default Currency (FIXED discount only).

PrimaryProduct

Object

Required

Main (primary) product object, details below:

      Code

String

Required

The code of the product that the recommendation is made for.

      Quantity

Integer

Required

The quantity for the primary product. Can be 0 (standing for any quantity).

      PriceOptions

Array of objects

Optional

Price options list for the primary product, details below:

            Code

String

Required

Price option group code.

            Options

Array of objects

Optional

Price options list, details below:

                  Code

String

Required

Price option code.

                  Value

Integer

Optional

Price option value (for scale interval price option group only).

RecommendedProduct

Object

Required

Recommended product object, details below:

      Code

String

Required

The code of the recommended product.

      Quantity

Integer

Required

The quantity for the recommended product. Can be 0 (standing for “match quantity” setting).

      PriceOptions

Array of objects

Optional

Price options list for the recommended product, details below:

            Code

String

Required

Price option group code.

            Options

Array of objects

Optional

Price options list, details below:

                Code

String

Required

Price option code.

                Value

Integer

Optional

Price option value (for scale interval price option group only).

Enabled

Boolean/Integer

Required

Sets the campaign enabled or disabled. Can be set as true/false/0/1.

Description

Array of objects

Required

List of campaign language descriptions, details below:

      Language

String

Required

Code of the language.

      Text

String

Required

The text of the description in the associated language.

Response parameters

Parameters Type Description

UpSell

Object

Object containing information related to the upsell campaigns, including product information and discount settings.

Request sample

<?php
require ('PATH_TO_AUTH');

$upsell = new \stdClass();

$upsell->Name = 'December 2020 upsell campaign’;
$upsell->StartDate = '2020-12-21';
$upsell->EndDate = '2020-12-25';
$upsell->DisplayForManualRenewals = false;

// setup percent discount
$discountPercent = new \stdClass();
$discountPercent->Type = 'PERCENT';
$discountPercent->Value = 5;

// setup fixed discount
$discountFixed = new \stdClass();
$discountFixed->Type = 'FIXED';
$discountValues = [
    'USD' => 10,
    'EUR' => 8,
    'TRY' => 80,
    'RUB' => 1100,
];
$dv = [];
foreach ($discountValues as $curr => $amt) {
    $disc = new \stdClass();
    $disc->Currency = $curr;
    $disc->Amount = $amt;

    $dv[] = $disc;
}
$discountFixed->Values = $dv;

// assign discount
$upsell->Discount = $discountPercent;
# OR
# $upsell->Discount = $discountFixed;


// setup primary product
$primaryProduct = new \stdClass();
$primaryProduct->Code = $productCode;
$primaryProduct->Quantity = 1;
$ppPriceOptionGroup1 = new \stdClass();
$ppPriceOptionGroup1->Code = 'OPTGRP2';
$ppPriceOptionGroup1Option = new \stdClass();
$ppPriceOptionGroup1Option->Code = 'OptGrp2Code2';
$ppPriceOptionGroup1->Options = [$ppPriceOptionGroup1Option];

$ppPriceOptionGroup2 = new \stdClass();
$ppPriceOptionGroup2->Code = 'interval_scale_grp1';
$ppPriceOptionGroup2Option = new \stdClass();
$ppPriceOptionGroup2Option->Code = 'interval_scale_grp1-1-10';
$ppPriceOptionGroup2Option->Value = '6';
$ppPriceOptionGroup2->Options = [$ppPriceOptionGroup2Option];

$primaryProduct->PriceOptions = [$ppPriceOptionGroup1, $ppPriceOptionGroup2];
$upsell->PrimaryProduct = $primaryProduct;

// setup recommended product
$recommProduct = new \stdClass();
$recommProduct->Code = $recProductCode;
$recommProduct->Quantity = 0; // stands for “match quantity” 
$rpPriceOptionGroup1 = new \stdClass();
$rpPriceOptionGroup1->Code = 'CHECKB_LIST';
$rpPriceOptionGroup1Option1 = new \stdClass();
$rpPriceOptionGroup1Option1->Code = 'chk1';
$rpPriceOptionGroup1Option2 = new \stdClass();
$rpPriceOptionGroup1Option2->Code = 'chk3';
$rpPriceOptionGroup1->Options = [$rpPriceOptionGroup1Option1, $rpPriceOptionGroup1Option2];
$recommProduct->PriceOptions = [$rpPriceOptionGroup1];
$upsell->RecommendedProduct = $recommProduct;

$upsell->Enabled = true;

// setup languagte descriptions / texts
$enDescription = new \stdClass();
$enDescription->Language = 'EN';
$enDescription->Text = 'Buy <!--{RECOMMENDED_PRODUCT_NAME}--> for just <!--{RECOMMENDED_PRODUCT_PRICE}--> until Dec 25th';
$upsell->Description = [$enDescription];

$jsonRpcRequest = new \stdClass();
$jsonRpcRequest->jsonrpc = '2.0';
$jsonRpcRequest->method = 'createUpsellCampaign';
$jsonRpcRequest->params = [$sessionID, $upsell];
$jsonRpcRequest->id = $i++;

$upsellResponse = callRPC($jsonRpcRequest, $host);

 

ConvertPlus Buy-Links Signature for Dynamic Products

Overview

You can generate links for dynamic products outside the Merchant Control Panel, using the ConvertPlus parameters explained in this article. Some of the ConvertPlus buy-link parameters require a signature, to prevent any interference in the ordering process. Optional parameters also require a signature if they are included in the generated buy-link.

 

ConvertPlus parameters that require a signature

Parameter Description
return-url URL to which customers are redirected after their finalized purchase. Learn more about Redirect URL on this article.

return-type

The return method used for redirecting your customers after a successful sale. Possible values:

  • Link in the Thank You page
  • Header Redirect
expiration

Buy link expiry date. The link becomes invalid after the date from this parameter. Send as a UTC timestamp.

Example: 

1537549421 

order-ext-ref Use this parameter to set an external reference to the order.
item-ext-ref Set product identifier for your dynamic products. You can send multiple values separated by semicolon ;. 
customer-ref The 2Checkout system generates default customer numerical (integer) IDs automatically for all orders of products that feature subscriptions. Can be used for new acquisitions aggregating new subscriptions under an existing Customer account.
customer-ext-ref The external customer reference.
currency Preselected billing currency 2Checkout uses to charge your customers.
prod

The name of the dynamic product. For multiple products, send them separated by a semicolon.

Example: name1;name2;name3.

price

For dynamic products, enter the product price.

For multiple dynamic items, send the values separated by a semicolon.

Example: price1;price2;price3.

qty

The number of units (quantity) for each product in checkout, separated by a semicolon;. Do not use spaces or blanks. Example: qty=2;1.

qty works in conjunction with prod, based on their respective order. The first value of the qty parameter controls the number of units for the products whose identifier is in the first position of the prod parameter. 

Example: https://secure.2checkout.com/checkou...rchant=2COLNC&prod=6FD08E61B5;E2932D0DE2&qty=4;3

type

The type of dynamic product. Possible values:

  • digital
  • physical
  • shipping
  • tax

If type is empty or not send, the default line item is considered product.

For multiple dynamic items, send the values separated by a semicolon.

opt Defines the product pricing options.

 

URL formating rules:

 

":" is considered a pair separator

  • 1 product with 1 price option with 1 value (includes scale option type)
    • prod=code1&opt=gr1:val1
  • 1 product with 1 price option with multiple values
    • prod=code1&opt=gr1:val1:val2

 

"," is considered a value separator

  • 1 product with 2 price options with 1 value each
    • prod=code1&opt=gr1:val1,gr2:val2
  • 1 product with 2 price options with multiple values each
    • prod=code1&opt=gr1:val1:val2,gr2:val3:val4

 

";" is considered a parameter separator between products

  • 2 products with 1 price option containing 1 value
    • prod=code1;code2&opt=gr1:val1;gr2:val2
  • 2 products with 1 price option containing multiple values
    • prod=code1;code2&opt=gr1:val1:val2;gr2:val3:val4
  • 2 products with 2 price options containing 1 value each
    • prod=code1;code2&opt=gr1:val1,gr2:val2;gr3:val3,gr4:val4
  • 2 products with 2 price options containing multiple values each
    • prod=code1;code2&opt=gr1:val1:val2,gr2:val3:val4;gr3:val5:val6,gr4:val7:val8
description For dynamic products, set a description that is displayed in the checkout page. The description field is displayed only for the 'One column with payment buttons' template. The description will not be visible in the default template.
recurrence

For dynamic products, set product recurring options.

Send multiple dynamic items separated by a semicolon.

Example: period1:unit1;period2:unit2;

 

Possible values for units:

  • DAY
  • WEEK
  • MONTH
  • YEAR
  • FOREVER

*This parameter is conditioned by two other parameters: duration and renewal-price.

duration For dynamic products, set the duration of the recurrence.
renewal-price For dynamic products, set the price that should be applied to the renewal order.

ConvertPlus parameters to be included in the signature - general rules

  1. General parameters included in the signature, regardless of the type of checkout (catalog products, dynamic products, renewal, unfinished payment): return-urlreturn-typeexpirationorder-ext-refcustomer-refcustomer-ext-ref.
  2. Parameters to be included in the signature for dynamic products buy-links: currencyprod, priceqtytypeoptdescriptionrecurrencedurationrenewal-price,  item-ext-ref.
  3. Parameters to be included in the signature for manual renewal buy-links: prodqtyopt.
  4. Parameters to be included for on-the-fly pricing for catalog products: prodpriceqtyopt, coupon.
  5. The parameter to be included in order to lock the cart for catalog products: lock.
  6. Parameters to be included when an approved URL is set: in this case, all parameters will be included in the signature, when redirected after successful completion of a sale.

Build the ConvertPlus signature

To sign a ConvertPlus buy-link, you need to follow these steps:

  1. Sort the parameters that require a signature alphabetically.
  2. Serialize the parameters and append to them the length of their values.
  3. Concatenate the resulting values.
  4. The serialized value is then encrypted with your Buy Link Secret Word using the HMAC method (algorithm sha256).
  5. The resulting value is added to the buy link under the signature parameter

Example

Let's consider the following parameters:

  •     merchant = 'MCODE'
  •     dynamic = '1'
  •     prod = 'Software'
  •     price = 10
  •     currency = 'USD'
  •     qty = 1
  •     type = 'digital'
  •     expiration = 1893456000

The regular buy-link will have the following structure:

https://www.2checkout.com/checkout/buy?merchant=2COLRNC&dynamic=1&prod=Software&price=10currency=USD&qty=1&type=digital&expiration=1893456000 

This link is missing one last parameter, a signature.

Let's take a look at the list of parameters that require a signature:

  •     merchant = '2COLRNC'
  •     dynamic = '1'
  •     prod = 'Software' <-- SIGNATURE REQUIRED
  •     price = 10        <-- SIGNATURE REQUIRED
  •     currency = 'USD'        <-- SIGNATURE REQUIRED
  •     qty = 1             <-- SIGNATURE REQUIRED
  •     type = 'digital'         <-- SIGNATURE REQUIRED
  •     expiration = '1893456000' <-- SIGNATURE REQUIRED

We extract only those parameters:

  •     prod = 'Software'
  •     price = 10
  •     currency = 'USD'
  •     qty = 1
  •     type = 'digital'
  •     expiration = 1893456000

Sort the parameters alphabetically

  •     currency = 'USD'
  •     expiration = 1893456000
  •     price = 10
  •     prod = 'Software'
  •     qty = 1
  •     type = 'digital'

Serialize the values

To serialize a value, you need to prepend to it the number of letters or digits a value has. For example, the currency parameter has the 'USD' value that will be serialized as '3USD', where 3 is the number of letters that make up the value. The value of the price parameter is '10', so the serialized value will be '210', where 2 is the number of digits that make up the value.

In case a value uses special characters, to serialize it, you need to prepend to it the number of bytes in the string, also known as the UTF-8 string length. To count the bytes in the string, you can use an online bytes counter. For example, if the prod parameter has the 'ελληνικά' value, this will be serialized as '16ελληνικά' and not as '8ελληνικά', due to the use of special characters, where '16' is the number of bytes in the string.

  •     currency = '3USD'
  •     expiration = 101893456000  
  •     price = 210
  •     prod = '8Software'
  •     qty = 11
  •     type = '7digital'

Concatenate the values

    '3USD1018934560002108Software117digital'

Encrypt using your Secret Word

The serialized value is then encrypted using the HMAC method.

    - the algorithm used is sha256

    - the key used when encrypting is the merchant secret word (in this example, the secret word is 'secret_wordbuylink')

This outputs a 64 character string:

c2225743f22e3b698b2f31052e35ec7602b787c804eaac1e0cd127a9a06b5762

Add the string in the buy-link

https://secure.2checkout.com/checkout/buy?merchant=2COLRNC&dynamic=1&prod=Software&price=10&currency=USD&qty=1&type=digital&expiration=1893456000&signature=c2225743f22e3b698b2f31052e35ec7602b787c804eaac1e0cd127a9a06b5762

Set grace period

Overview

Use the setSubscriptionGracePeriod method to set a custom grace period for an Active or Past Due subscription. This method changes per-subscription end user data and not customer details.

Parameters

Parameters Type/Description

sessionID

Required (string)

 

Session identifier, the output of the Login method. Include sessionID into all your requests. 2Checkout throws an exception if the values are incorrect.  The sessionID expires in 10 minutes.

subscriptionReference

Required (string)

 

Unique, system-generated subscription identifier. Needs to belong to an Active or Past Due subscription.

subscriptionGracePeriod

Required (int)

 

The number of days for the grace period, during which time, customers can still renew/upgrade expired subscriptions. During the grace period, subscriptions feature the Past Due status.

 

Can be NULL. When NULL, the grace period for a subscription is the same as that you defined in the per-product or per-account grace period settings. You can use this to set a custom grace period for a subscription.

 

Use 0 to remove the grace period from a subscription.

Response

Parameters Type/Description

Boolean

true or false depending on whether the changes were successful or not.

Request

<?php

require ('PATH_TO_AUTH');

$subscriptionReference = 'YOUR_SUBSCRIPTION_REFERENCE';
$gracePeriod = YOUR_GRACE_PERIOD;

$jsonRpcRequest = array (
'method' => 'setSubscriptionGracePeriod',
'params' => array($sessionID, $subscriptionReference, $gracePeriod),
'id' => $i++,
'jsonrpc' => '2.0');

var_dump (callRPC((Object)$jsonRpcRequest, $host, true));

Retrieve order fields

Overview

Use the getAdditionalOrderFields method to extract information about additional fields you set up for your account.

Parameters

Parameters Type/Description

sessionID

Required (string)

 

Session identifier, the output of the Login method. Include sessionID into all your requests. Avangate throws an exception if the values are incorrect.  The sessionID expires in 10 minutes.

Request

<?php

require ('PATH_TO_AUTH');

$jsonRpcRequest = array (
'jsonrpc' => '2.0',
'id' => $i++,
'method' => 'getAdditionalOrderFields ',
'params' => array($sessionID)
);
var_dump (callRPC((Object)$jsonRpcRequest, $host));

?>

Response

Parameters Type/Description

AdditionalFields

Array of orders

Increasing trial conversion rates

Is trial conversion a key part of your customer acquisition strategy? Whether you're currently offering a free software download or a 30-day free subscription, this case study with Absolute Software delivers valuable insights you can put into play to increase your trial activation rates and conversion rates.

Tune into this 27-minute webinar to learn how Absolute realized a 5x increase in their trial conversion rate.

Join 2Checkout and UpSellit to discuss metrics, tips, and best practices:

  • The most important KPIs in a trial funnel
  • How to drive trial activations
  • Ideas to optimize the user experience
  • Creative ways to increase distribution
  • How to optimize messaging based on the length of the trial
Join Our Webinar

 

6 Strategies to maximize your recurring revenue

Prevent Payment Failures

Intelligent Payment Routing enables you to match or route card transactions to the payment gateways best equipped to handle them and retry authorizations using a failover or back-up gateway. We recommend taking advantage of this feature to:

  • Provide automatic support for switching and optimization between multiple payment processors around the world.
  • Increase conversion rates.
  • Reduce the volume of unfinished payments.
  • Shift riskier transactions to secondary gateways to protect relationships with primary providers.

Analyzing a sample of 2Checkout vendors, we have seen an average uplift between 2% and 5% in their authorization rates using this fallback system.

An equally important aspect is routing transactions to local payment processors in countries such as the USA, Brazil or Turkey.

After using local payment processing, many of our vendors have seen up to 40% increase in authorization rates in the aforementioned markets.

Ensure Billing Continuity

The best way to handle the incoming wave of account number changes is to use an Account Updater.

Account Updater is a generic term for programs such as Visa's Account Updater or MasterCard Automatic Billing Updater that are offered by the credit card networks to automatically exchange updated credit card account information between participating issuers, acquirers, and merchants.

The programs record changes to credit card account numbers and expiration dates due to mergers, portfolio flips (e.g., Visa to MasterCard), re-issued cards (from loss or security breach) account closures, and product upgrades. Companies that participate in updater programs have several ways to check the information in their subscriber database:

  • Automated nightly updates that check any card you have processed in the past six months.
  • Requests for information on specific cards that have been declined.
  • Requests for information on a set of cards due for their next billing installment.

The 2Checkout Account Updater has so far helped our vendors grow their recurring revenue in multiple ways:

  • Salvage over 90% of otherwise unusable cards used for recurring billing.
  • Seamlessly update state (out of date) credit/card accounts.
  • Increase retention by up to 40%.
  • Increase customer loyalty by eliminating service disruption.

Increase Authorization Rates for Expired Cards

Credit cards in your database slip past their expiration date on a monthly basis. The account number hasn't changed, and the subscriber still wants to receive your service, but when you attempt to bill that card, the payment is declined -- or your gateway won't let you submit it at all -- because the card is expired.

2Checkout allows you to identify expired cards and update them on file (standard banking procedures to prolong expiration dates), so that stale expiration dates don't deny you revenues or threaten your relationship with a perfectly happy subscriber. You can retry those payments and recover up to 90% of payments that initially had been declined due to expired cards.

Our approach to expired card handling involves sending the card with the expired date first. If it's declined, we retry the payment up to four times in this sequence:

If the processor or gateway won't accept an expired date, then we jump immediately to adding three years to the expiration date. In case of errors, the 2Checkout Retry Logic comes into play and adds four years, then two years, then five years. Finally, we add one year to the expiration date.

We also recommend you create a report to track each retry attempt and its results. That way, you'll be able to see how many payments you're recovering at each step and notice any changes in the trend.

For instance, adding three years to the date tends to recover a higher percentage of payments now, but in the past adding two years was slightly more successful. The optimal approach is always a moving target, but with good tracking, you'll be able to adapt to the changes.

We’ve seen an average authorization rate uplift of 4% after some of our vendors started taking advantage of this mechanism.

 

Increase Recovery Rate and Minimize Payment Failures

Configurable Retry Logic enables you to automatically recover payments for soft card declines. Soft declines refer to temporary issues, with a high probability that a subsequent try would be successful.

We recommend that you adapt the number of retries and retention strategy to your business and customer base, and we can provide guidance on optimizing conversion rates.

Soft decline reasons include:

  • Insufficient funds
  • Card activity limit exceeded
  • Processing failures due to system, technical or infrastructure issues
  • Expired cards

 

2Checkout’s Retry Logic proved to successfully recover up to 20% of failed transactions due to soft declines.

More extreme situations may result in hard declines, due to stolen/lost cards and/or invalid card data. We no longer attempt authorizations for subscriptions for which the initial card charge results in a hard decline. Unless you target those customers with your own retention strategies, such subscriptions expire.

As part of the Revenue Recovery Tools, pre-expiration billing is available, allowing the configuration of renewal attempts before the subscription expiration.

Reduce Churn and Recapture Revenue

Use our Authorization and Revenue Recovery Dashboard to monitor the impact of your recovery strategies and use the insight to adjust and optimize your tactics to reduce churn and recapture more revenue.

  • Gain unmatched transparency and visibility into subscription renewals and recurring billing.
  • Access extensive authorization data to optimize retention strategies.
  • Gain granular-level insight at the subscription level into the activities of the Retry Logic and Account Updater tools.
  • Take advantage of data portability to support third-party marketing and retention campaigns.

Around 16% of successful automatic renewals registered by 2Checkout are currently recovered through our auto-renewal enrollment and churn prevention campaigns.

Recover Revenue from Unfinished Payments

Dunning is the process of methodically communicating with customers to ensure the collection of accounts receivable. Our dunning management tools help you reduce customer churn and recover lost revenue from failed authorizations. We notify customers via email about failed renewals, helping them update their payment information in myAccount.

We automatically attempt to authorize a recurring charge for a subscription according to its renewal deadline. If the authorization process fails with a hard decline - a permanent error from the payment processor/gateway indicating that any further authorizations would also be unsuccessful – then the dunning management tools come into play.

We send a single dunning management email immediately after each failed automatic authorization attempt made for subscriptions with the auto-renewal system enabled. As soon as the shoppers update their payment information, we automatically attempt to authorize the payment and renew the subscription.

2Checkout’s dunning management tools led to an average of 1% increase in authorization rates.

Need help?

Do you have a question? If you didn’t find the answer you are looking for in our documentation, you can contact our Support teams for more information. If you have a technical issue or question, please contact us. We are happy to help.

Not yet a Verifone customer?

We’ll help you choose the right payment solution for your business, wherever you want to sell, in-person or online. Our team of experts will happily discuss your needs.

Verifone logo