Skip to main content

Remove translations

Overview

Use the deletePromotionTranslations method to remove all localized texts from an existing promotion.

Parameters

Parameter Type/Description

sessionID

Required (string)

 

Output of the Login method.

promotionCode

Required (string)

 

The code corresponding to the promotion that you want to add translations to.

Response

Parameters Type/Description

Status

Boolean

  True or false.

Request

<?php

require ('PATH_TO_AUTH');

// Promotion code corresponding to the promotion you want to remove translations from
$promotionCode = '';

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

 

Retrieve product groups

Overview

Use the getProductGroups method to extract information about the product groups you created for your account.

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.

Response

Parameters Type/Description

ProductGroup

Array of objects

Request

 <?php

require ('PATH_TO_AUTH');

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

?>

Generate SKU schema

Overview

Use the getSchema method to create a new SKU schema and define the combination criteria. The SKU number is a unique combination of Product ID (Product Code) plus all or minimum one of the following:

  • Currencies
  • Volume Discounts
  • Purchase Types
  • Pricing Options

Request Parameters

Parameters Required Type/Description
productCode Required String.  Product code as available in the Merchant Control Panel.
currencies Required String.
purchaseTypes Required String. The type of purchase applicable to the product: NEW_PRODUCT, RENEWAL, TRIAL, UPGRADE.
pricingConfigurationCodes Required  
                               code Required  
                               volumeDiscounts Required  
                               optionGroups Required  

Request Example

<?php

require ('PATH_TO_AUTH');

$inputSchema = new \stdClass();
$inputSchema->Products = [];
$inputSchema->Products[0] = new \stdClass();
$inputSchema->Products[0]->Code = '6B3CB17DDA_COPY1';
$inputSchema->Products[0]->Currencies = ['USD', 'EUR', 'GBP', 'BGN'];
$inputSchema->Products[0]->PurchaseTypes = ['NEW_PRODUCT', 'RENEWAL'];
$inputSchema->Products[0]->PricingConfigurationCodes = [];
$inputSchema->Products[0]->PricingConfigurationCodes[0] = new \stdClass();
$inputSchema->Products[0]->PricingConfigurationCodes[0]->Code = 'E684EC99B0';
$inputSchema->Products[0]->PricingConfigurationCodes[0]->VolumeDiscounts = [[1, 3], [4, 7]];
$inputSchema->Products[0]->PricingConfigurationCodes[0]->OptionGroups = [];
$inputSchema->Products[0]->PricingConfigurationCodes[0]->OptionGroups[0] = new \stdClass();
$inputSchema->Products[0]->PricingConfigurationCodes[0]->OptionGroups[0]->Code = 'GRUP_1';

$jsonRpcRequest = array (
    'method' => 'getSchema',
    'params' => array($sessionID, $inputSchema),
    'id' => $i++,
    'jsonrpc' => '2.0'
);

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

Response Parameters

Parameters Type/Description
productCode Product code as available in the Merchant Control Panel.
pricingConfigurationCode  
productSku Empty when the list is generated by the platform and with unique values (per vendor) for each line of the file.
currency If currency is not selected to be included in the list (empty or null value) the the API defaults to "ANY". If currency is selected as an element of the SKU list creation, then it will be included - minimum one currency.
fromQty

The minimum value of the intervals set at product level for the specific Pricing configuration (volume discounts). In case volume discounts are not defined, the default value will be '1'.

toQty

The maximum value of the intervals set at product level for the specific Pricing configuration (volume discounts). In case volume discounts are not defined, the default value will be '99999'.

 

The intervals will be defined in the SKU list (at creation and upload) considering the product settings. In case intervals that are not defined in the Control Panel are included in the request, the request will return an error. 

'Expand quantities' should consider distinct SKUs for each qty of the interval. (optional)

purchaseType Purchase types will have one or multiple of the following values: 'NEW_PRODUCT', 'RENEWAL', TRIAL', 'UPGRADE' - limited to what is defined at product level.
pricingOptionGroups

Can be multiple and each of them will have the GroupCode and for each pricing options group:

pricingOptions

Can be multiple and will contain 'Name' and 'Value' as output, the only valid input is the option group code.

 

Response Example

array(1) {
  [0] =>
  class stdClass#7 (2) {
    public $ProductCode =>
    string(16) "6B3CB17DDA_COPY1"
    public $SkuPricingOptions =>
    array(1) {
      [0] =>
      class stdClass#8 (3) {
        public $Code =>
        string(10) "E684EC99B0"
        public $Details =>
        array(64) {
          [0] =>
          class stdClass#9 (7) {
            public $ProductSKU =>
            string(0) ""
            public $Currency =>
            string(3) "USD"
            public $FromQty =>
            int(1)
            public $ToQty =>
            int(3)
            public $PurchaseType =>
            string(11) "NEW_PRODUCT"
            public $Groups =>
            array(1) {
              [0] =>
              class stdClass#10 (2) {
                public $GroupCode =>
                string(6) "GRUP_1"
                public $Options =>
                array(1) {
                  [0] =>
                  class stdClass#11 (2) {
                    public $Name =>
                    string(13) "option name 1"
                    public $Value =>
                    string(13) "option_code_1"
                  }
                }
              }
            }
            public $Options =>
            string(76) "eJwBLADT/6G10uOW07exk6mNk7KvrpaSc4l1lbXToqi5sriTcbOXseWu3ZGrlXauuZOojh8cww=="
          }
          [1] =>
          class stdClass#12 (7) {
            public $ProductSKU =>
            string(0) ""
            public $Currency =>
            string(3) "USD"
            public $FromQty =>
            int(1)
            public $ToQty =>
            int(3)
            public $PurchaseType =>
            string(11) "NEW_PRODUCT"
            public $Groups =>
            array(1) {
              [0] =>
              class stdClass#13 (2) {
                public $GroupCode =>
                string(6) "GRUP_1"
                public $Options =>
                array(1) {
                  [0] =>
                  class stdClass#14 (2) {
                    public $Name =>
                    string(13) "option name 2"
                    public $Value =>
                    string(13) "option_code_2"
                  }
                }
              }
            }
            public $Options =>
            string(76) "eJwBLADT/6G10uOW07exk6mNk7KvrpaSc4l1lbXToqi5sriTcbOXseWu3ZGrmXauuZOojjccxw=="
          }
          [2] =>
          class stdClass#15 (7) {
            public $ProductSKU =>
            string(0) ""
            public $Currency =>
            string(3) "USD"
            public $FromQty =>
            int(1)
            public $ToQty =>
            int(3)
            public $PurchaseType =>
            string(11) "NEW_PRODUCT"
            public $Groups =>
            array(1) {
              [0] =>
              class stdClass#16 (2) {
                public $GroupCode =>
                string(6) "GRUP_1"
                public $Options =>
                array(1) {
                  [0] =>
                  class stdClass#17 (2) {
                    public $Name =>
                    string(13) "option name 3"
                    public $Value =>
                    string(13) "option_code_3"
                  }
                }
              }
            }
            public $Options =>
            string(76) "eJwBLADT/6G10uOW07exk6mNk7KvrpaSc4l1lbXToqi5sriTcbOXseWu3ZGrnXauuZOojk8cyw=="
          }
          [3] =>
          class stdClass#18 (7) {
            public $ProductSKU =>
            string(0) ""
            public $Currency =>
            string(3) "USD"
            public $FromQty =>
            int(1)
            public $ToQty =>
            int(3)
            public $PurchaseType =>
            string(11) "NEW_PRODUCT"
            public $Groups =>
            array(1) {
              [0] =>
              class stdClass#19 (2) {
                public $GroupCode =>
                string(6) "GRUP_1"
                public $Options =>
                array(1) {
                  [0] =>
                  class stdClass#20 (2) {
                    public $Name =>
                    string(4) "NONE"
                    public $Value =>
                    string(4) "NONE"
                  }
                }
              }
            }
            public $Options =>
            string(0) ""
          }
          [4] =>
          class stdClass#21 (7) {
            public $ProductSKU =>
            string(0) ""
            public $Currency =>
            string(3) "USD"
            public $FromQty =>
            int(1)
            public $ToQty =>
            int(3)
            public $PurchaseType =>
            string(7) "RENEWAL"
            public $Groups =>
            array(1) {
              [0] =>
              class stdClass#22 (2) {
                public $GroupCode =>
                string(6) "GRUP_1"
                public $Options =>
                array(1) {
                  [0] =>
                  class stdClass#23 (2) {
                    public $Name =>
                    string(13) "option name 1"
                    public $Value =>
                    string(13) "option_code_1"
                  }
                }
              }
            }
            public $Options =>
            string(76) "eJwBLADT/6G10uOW07exk6mNk7KvrpaSc4l1lbXToqi5sriTcbOXseWu3ZGrlXauuZOojh8cww=="
          }
          [5] =>
          class stdClass#24 (7) {
            public $ProductSKU =>
            string(0) ""
            public $Currency =>
            string(3) "USD"
            public $FromQty =>
            int(1)
            public $ToQty =>
            int(3)
            public $PurchaseType =>
            string(7) "RENEWAL"
            public $Groups =>
            array(1) {
              [0] =>
              class stdClass#25 (2) {
                public $GroupCode =>
                string(6) "GRUP_1"
                public $Options =>
                array(1) {
                  [0] =>
                  class stdClass#26 (2) {
                    public $Name =>
                    string(13) "option name 2"
                    public $Value =>
                    string(13) "option_code_2"
                  }
                }
              }
            }
            public $Options =>
            string(76) "eJwBLADT/6G10uOW07exk6mNk7KvrpaSc4l1lbXToqi5sriTcbOXseWu3ZGrmXauuZOojjccxw=="
          }
          [6] =>
          class stdClass#27 (7) {
            public $ProductSKU =>
            string(0) ""
            public $Currency =>
            string(3) "USD"
            public $FromQty =>
            int(1)
            public $ToQty =>
            int(3)
            public $PurchaseType =>
            string(7) "RENEWAL"
            public $Groups =>
            array(1) {
              [0] =>
              class stdClass#28 (2) {
                public $GroupCode =>
                string(6) "GRUP_1"
                public $Options =>
                array(1) {
                  [0] =>
                  class stdClass#29 (2) {
                    public $Name =>
                    string(13) "option name 3"
                    public $Value =>
                    string(13) "option_code_3"
                  }
                }
              }
            }
            public $Options =>
            string(76) "eJwBLADT/6G10uOW07exk6mNk7KvrpaSc4l1lbXToqi5sriTcbOXseWu3ZGrnXauuZOojk8cyw=="
          }
          [7] =>
          class stdClass#30 (7) {
            public $ProductSKU =>
            string(0) ""
            public $Currency =>
            string(3) "USD"
            public $FromQty =>
            int(1)
            public $ToQty =>
            int(3)
            public $PurchaseType =>
            string(7) "RENEWAL"
            public $Groups =>
            array(1) {
              [0] =>
              class stdClass#31 (2) {
                public $GroupCode =>
                string(6) "GRUP_1"
                public $Options =>
                array(1) {
                  [0] =>
                  class stdClass#32 (2) {
                    public $Name =>
                    string(4) "NONE"
                    public $Value =>
                    string(4) "NONE"
                  }
                }
              }
            }
            public $Options =>
            string(0) ""
          }
          [8] =>
          class stdClass#33 (7) {
            public $ProductSKU =>
            string(0) ""
            public $Currency =>
            string(3) "USD"
            public $FromQty =>
            int(4)
            public $ToQty =>
            int(7)
            public $PurchaseType =>
            string(11) "NEW_PRODUCT"
            public $Groups =>
            array(1) {
              [0] =>
              class stdClass#34 (2) {
                public $GroupCode =>
                string(6) "GRUP_1"
                public $Options =>
                array(1) {
                  [0] =>
                  class stdClass#35 (2) {
                    public $Name =>
                    string(13) "option name 1"
                    public $Value =>
                    string(13) "option_code_1"
                  }
                }
              }
            }
            public $Options =>
            string(76) "eJwBLADT/6G10uOW07exk6mNk7KvrpaSc4l1lbXToqi5sriTcbOXseWu3ZGrlXauuZOojh8cww=="
          }
          [9] =>
          class stdClass#36 (7) {
            public $ProductSKU =>
            string(0) ""
            public $Currency =>
            string(3) "USD"
            public $FromQty =>
            int(4)
            public $ToQty =>
            int(7)
            public $PurchaseType =>
            string(11) "NEW_PRODUCT"
            public $Groups =>
            array(1) {
              [0] =>
              class stdClass#37 (2) {
                public $GroupCode =>
                string(6) "GRUP_1"
                public $Options =>
                array(1) {
                  [0] =>
                  class stdClass#38 (2) {
                    public $Name =>
                    string(13) "option name 2"
                    public $Value =>
                    string(13) "option_code_2"
                  }
                }
              }
            }
            public $Options =>
            string(76) "eJwBLADT/6G10uOW07exk6mNk7KvrpaSc4l1lbXToqi5sriTcbOXseWu3ZGrmXauuZOojjccxw=="
          }
          [10] =>
          class stdClass#39 (7) {
            public $ProductSKU =>
            string(0) ""
            public $Currency =>
            string(3) "USD"
            public $FromQty =>
            int(4)
            public $ToQty =>
            int(7)
            public $PurchaseType =>
            string(11) "NEW_PRODUCT"
            public $Groups =>
            array(1) {
              [0] =>
              class stdClass#40 (2) {
                public $GroupCode =>
                string(6) "GRUP_1"
                public $Options =>
                array(1) {
                  [0] =>
                  class stdClass#41 (2) {
                    public $Name =>
                    string(13) "option name 3"
                    public $Value =>
                    string(13) "option_code_3"
                  }
                }
              }
            }
            public $Options =>
            string(76) "eJwBLADT/6G10uOW07exk6mNk7KvrpaSc4l1lbXToqi5sriTcbOXseWu3ZGrnXauuZOojk8cyw=="
          }
          [11] =>
          class stdClass#42 (7) {
            public $ProductSKU =>
            string(0) ""
            public $Currency =>
            string(3) "USD"
            public $FromQty =>
            int(4)
            public $ToQty =>
            int(7)
            public $PurchaseType =>
            string(11) "NEW_PRODUCT"
            public $Groups =>
            array(1) {
              [0] =>
              class stdClass#43 (2) {
                public $GroupCode =>
                string(6) "GRUP_1"
                public $Options =>
                array(1) {
                  [0] =>
                  class stdClass#44 (2) {
                    public $Name =>
                    string(4) "NONE"
                    public $Value =>
                    string(4) "NONE"
                  }
                }
              }
            }
            public $Options =>
            string(0) ""
          }
          [12] =>
          class stdClass#45 (7) {
            public $ProductSKU =>
            string(0) ""
            public $Currency =>
            string(3) "USD"
            public $FromQty =>
            int(4)
            public $ToQty =>
            int(7)
            public $PurchaseType =>
            string(7) "RENEWAL"
            public $Groups =>
            array(1) {
              [0] =>
              class stdClass#46 (2) {
                public $GroupCode =>
                string(6) "GRUP_1"
                public $Options =>
                array(1) {
                  [0] =>
                  class stdClass#47 (2) {
                    public $Name =>
                    string(13) "option name 1"
                    public $Value =>
                    string(13) "option_code_1"
                  }
                }
              }
            }
            public $Options =>
            string(76) "eJwBLADT/6G10uOW07exk6mNk7KvrpaSc4l1lbXToqi5sriTcbOXseWu3ZGrlXauuZOojh8cww=="
          }
          [13] =>
          class stdClass#48 (7) {
            public $ProductSKU =>
            string(0) ""
            public $Currency =>
            string(3) "USD"
            public $FromQty =>
            int(4)
            public $ToQty =>
            int(7)
            public $PurchaseType =>
            string(7) "RENEWAL"
            public $Groups =>
            array(1) {
              [0] =>
              class stdClass#49 (2) {
                public $GroupCode =>
                string(6) "GRUP_1"
                public $Options =>
                array(1) {
                  [0] =>
                  class stdClass#50 (2) {
                    public $Name =>
                    string(13) "option name 2"
                    public $Value =>
                    string(13) "option_code_2"
                  }
                }
              }
            }
            public $Options =>
            string(76) "eJwBLADT/6G10uOW07exk6mNk7KvrpaSc4l1lbXToqi5sriTcbOXseWu3ZGrmXauuZOojjccxw=="
          }
          [14] =>
          class stdClass#51 (7) {
            public $ProductSKU =>
            string(0) ""
            public $Currency =>
            string(3) "USD"
            public $FromQty =>
            int(4)
            public $ToQty =>
            int(7)
            public $PurchaseType =>
            string(7) "RENEWAL"
            public $Groups =>
            array(1) {
              [0] =>
              class stdClass#52 (2) {
                public $GroupCode =>
                string(6) "GRUP_1"
                public $Options =>
                array(1) {
                  [0] =>
                  class stdClass#53 (2) {
                    public $Name =>
                    string(13) "option name 3"
                    public $Value =>
                    string(13) "option_code_3"
                  }
                }
              }
            }
            public $Options =>
            string(76) "eJwBLADT/6G10uOW07exk6mNk7KvrpaSc4l1lbXToqi5sriTcbOXseWu3ZGrnXauuZOojk8cyw=="
          }
          [15] =>
          class stdClass#54 (7) {
            public $ProductSKU =>
            string(0) ""
            public $Currency =>
            string(3) "USD"
            public $FromQty =>
            int(4)
            public $ToQty =>
            int(7)
            public $PurchaseType =>
            string(7) "RENEWAL"
            public $Groups =>
            array(1) {
              [0] =>
              class stdClass#55 (2) {
                public $GroupCode =>
                string(6) "GRUP_1"
                public $Options =>
                array(1) {
                  [0] =>
                  class stdClass#56 (2) {
                    public $Name =>
                    string(4) "NONE"
                    public $Value =>
                    string(4) "NONE"
                  }
                }
              }
            }
            public $Options =>
            string(0) ""
          }
          [16] =>
          class stdClass#57 (7) {
            public $ProductSKU =>
            string(0) ""
            public $Currency =>
            string(3) "EUR"
            public $FromQty =>
            int(1)
            public $ToQty =>
            int(3)
            public $PurchaseType =>
            string(11) "NEW_PRODUCT"
            public $Groups =>
            array(1) {
              [0] =>
              class stdClass#58 (2) {
                public $GroupCode =>
                string(6) "GRUP_1"
                public $Options =>
                array(1) {
                  [0] =>
                  class stdClass#59 (2) {
                    public $Name =>
                    string(13) "option name 1"
                    public $Value =>
                    string(13) "option_code_1"
                  }
                }
              }
            }
            public $Options =>
            string(76) "eJwBLADT/6G10uOW07exk6mNk7KvrpaSc4l1lbXToqi5sriTcbOXseWu3ZGrlXauuZOojh8cww=="
          }
          [17] =>
          class stdClass#60 (7) {
            public $ProductSKU =>
            string(0) ""
            public $Currency =>
            string(3) "EUR"
            public $FromQty =>
            int(1)
            public $ToQty =>
            int(3)
            public $PurchaseType =>
            string(11) "NEW_PRODUCT"
            public $Groups =>
            array(1) {
              [0] =>
              class stdClass#61 (2) {
                public $GroupCode =>
                string(6) "GRUP_1"
                public $Options =>
                array(1) {
                  [0] =>
                  class stdClass#62 (2) {
                    public $Name =>
                    string(13) "option name 2"
                    public $Value =>
                    string(13) "option_code_2"
                  }
                }
              }
            }
            public $Options =>
            string(76) "eJwBLADT/6G10uOW07exk6mNk7KvrpaSc4l1lbXToqi5sriTcbOXseWu3ZGrmXauuZOojjccxw=="
          }
          [18] =>
          class stdClass#63 (7) {
            public $ProductSKU =>
            string(0) ""
            public $Currency =>
            string(3) "EUR"
            public $FromQty =>
            int(1)
            public $ToQty =>
            int(3)
            public $PurchaseType =>
            string(11) "NEW_PRODUCT"
            public $Groups =>
            array(1) {
              [0] =>
              class stdClass#64 (2) {
                public $GroupCode =>
                string(6) "GRUP_1"
                public $Options =>
                array(1) {
                  [0] =>
                  class stdClass#65 (2) {
                    public $Name =>
                    string(13) "option name 3"
                    public $Value =>
                    string(13) "option_code_3"
                  }
                }
              }
            }
            public $Options =>
            string(76) "eJwBLADT/6G10uOW07exk6mNk7KvrpaSc4l1lbXToqi5sriTcbOXseWu3ZGrnXauuZOojk8cyw=="
          }
          [19] =>
          class stdClass#66 (7) {
            public $ProductSKU =>
            string(0) ""
            public $Currency =>
            string(3) "EUR"
            public $FromQty =>
            int(1)
            public $ToQty =>
            int(3)
            public $PurchaseType =>
            string(11) "NEW_PRODUCT"
            public $Groups =>
            array(1) {
              [0] =>
              class stdClass#67 (2) {
                public $GroupCode =>
                string(6) "GRUP_1"
                public $Options =>
                array(1) {
                  [0] =>
                  class stdClass#68 (2) {
                    public $Name =>
                    string(4) "NONE"
                    public $Value =>
                    string(4) "NONE"
                  }
                }
              }
            }
            public $Options =>
            string(0) ""
          }
          [20] =>
          class stdClass#69 (7) {
            public $ProductSKU =>
            string(0) ""
            public $Currency =>
            string(3) "EUR"
            public $FromQty =>
            int(1)
            public $ToQty =>
            int(3)
            public $PurchaseType =>
            string(7) "RENEWAL"
            public $Groups =>
            array(1) {
              [0] =>
              class stdClass#70 (2) {
                public $GroupCode =>
                string(6) "GRUP_1"
                public $Options =>
                array(1) {
                  [0] =>
                  class stdClass#71 (2) {
                    public $Name =>
                    string(13) "option name 1"
                    public $Value =>
                    string(13) "option_code_1"
                  }
                }
              }
            }
            public $Options =>
            string(76) "eJwBLADT/6G10uOW07exk6mNk7KvrpaSc4l1lbXToqi5sriTcbOXseWu3ZGrlXauuZOojh8cww=="
          }
          [21] =>
          class stdClass#72 (7) {
            public $ProductSKU =>
            string(0) ""
            public $Currency =>
            string(3) "EUR"
            public $FromQty =>
            int(1)
            public $ToQty =>
            int(3)
            public $PurchaseType =>
            string(7) "RENEWAL"
            public $Groups =>
            array(1) {
              [0] =>
              class stdClass#73 (2) {
                public $GroupCode =>
                string(6) "GRUP_1"
                public $Options =>
                array(1) {
                  [0] =>
                  class stdClass#74 (2) {
                    public $Name =>
                    string(13) "option name 2"
                    public $Value =>
                    string(13) "option_code_2"
                  }
                }
              }
            }
            public $Options =>
            string(76) "eJwBLADT/6G10uOW07exk6mNk7KvrpaSc4l1lbXToqi5sriTcbOXseWu3ZGrmXauuZOojjccxw=="
          }
          [22] =>
          class stdClass#75 (7) {
            public $ProductSKU =>
            string(0) ""
            public $Currency =>
            string(3) "EUR"
            public $FromQty =>
            int(1)
            public $ToQty =>
            int(3)
            public $PurchaseType =>
            string(7) "RENEWAL"
            public $Groups =>
            array(1) {
              [0] =>
              class stdClass#76 (2) {
                public $GroupCode =>
                string(6) "GRUP_1"
                public $Options =>
                array(1) {
                  [0] =>
                  class stdClass#77 (2) {
                    public $Name =>
                    string(13) "option name 3"
                    public $Value =>
                    string(13) "option_code_3"
                  }
                }
              }
            }
            public $Options =>
            string(76) "eJwBLADT/6G10uOW07exk6mNk7KvrpaSc4l1lbXToqi5sriTcbOXseWu3ZGrnXauuZOojk8cyw=="
          }
          [23] =>
          class stdClass#78 (7) {
            public $ProductSKU =>
            string(0) ""
            public $Currency =>
            string(3) "EUR"
            public $FromQty =>
            int(1)
            public $ToQty =>
            int(3)
            public $PurchaseType =>
            string(7) "RENEWAL"
            public $Groups =>
            array(1) {
              [0] =>
              class stdClass#79 (2) {
                public $GroupCode =>
                string(6) "GRUP_1"
                public $Options =>
                array(1) {
                  [0] =>
                  class stdClass#80 (2) {
                    public $Name =>
                    string(4) "NONE"
                    public $Value =>
                    string(4) "NONE"
                  }
                }
              }
            }
            public $Options =>
            string(0) ""
          }
          [24] =>
          class stdClass#81 (7) {
            public $ProductSKU =>
            string(0) ""
            public $Currency =>
            string(3) "EUR"
            public $FromQty =>
            int(4)
            public $ToQty =>
            int(7)
            public $PurchaseType =>
            string(11) "NEW_PRODUCT"
            public $Groups =>
            array(1) {
              [0] =>
              class stdClass#82 (2) {
                public $GroupCode =>
                string(6) "GRUP_1"
                public $Options =>
                array(1) {
                  [0] =>
                  class stdClass#83 (2) {
                    public $Name =>
                    string(13) "option name 1"
                    public $Value =>
                    string(13) "option_code_1"
                  }
                }
              }
            }
            public $Options =>
            string(76) "eJwBLADT/6G10uOW07exk6mNk7KvrpaSc4l1lbXToqi5sriTcbOXseWu3ZGrlXauuZOojh8cww=="
          }
          [25] =>
          class stdClass#84 (7) {
            public $ProductSKU =>
            string(0) ""
            public $Currency =>
            string(3) "EUR"
            public $FromQty =>
            int(4)
            public $ToQty =>
            int(7)
            public $PurchaseType =>
            string(11) "NEW_PRODUCT"
            public $Groups =>
            array(1) {
              [0] =>
              class stdClass#85 (2) {
                public $GroupCode =>
                string(6) "GRUP_1"
                public $Options =>
                array(1) {
                  [0] =>
                  class stdClass#86 (2) {
                    public $Name =>
                    string(13) "option name 2"
                    public $Value =>
                    string(13) "option_code_2"
                  }
                }
              }
            }
            public $Options =>
            string(76) "eJwBLADT/6G10uOW07exk6mNk7KvrpaSc4l1lbXToqi5sriTcbOXseWu3ZGrmXauuZOojjccxw=="
          }
          [26] =>
          class stdClass#87 (7) {
            public $ProductSKU =>
            string(0) ""
            public $Currency =>
            string(3) "EUR"
            public $FromQty =>
            int(4)
            public $ToQty =>
            int(7)
            public $PurchaseType =>
            string(11) "NEW_PRODUCT"
            public $Groups =>
            array(1) {
              [0] =>
              class stdClass#88 (2) {
                public $GroupCode =>
                string(6) "GRUP_1"
                public $Options =>
                array(1) {
                  [0] =>
                  class stdClass#89 (2) {
                    public $Name =>
                    string(13) "option name 3"
                    public $Value =>
                    string(13) "option_code_3"
                  }
                }
              }
            }
            public $Options =>
            string(76) "eJwBLADT/6G10uOW07exk6mNk7KvrpaSc4l1lbXToqi5sriTcbOXseWu3ZGrnXauuZOojk8cyw=="
          }
          [27] =>
          class stdClass#90 (7) {
            public $ProductSKU =>
            string(0) ""
            public $Currency =>
            string(3) "EUR"
            public $FromQty =>
            int(4)
            public $ToQty =>
            int(7)
            public $PurchaseType =>
            string(11) "NEW_PRODUCT"
            public $Groups =>
            array(1) {
              [0] =>
              class stdClass#91 (2) {
                public $GroupCode =>
                string(6) "GRUP_1"
                public $Options =>
                array(1) {
                  [0] =>
                  class stdClass#92 (2) {
                    public $Name =>
                    string(4) "NONE"
                    public $Value =>
                    string(4) "NONE"
                  }
                }
              }
            }
            public $Options =>
            string(0) ""
          }
          [28] =>
          class stdClass#93 (7) {
            public $ProductSKU =>
            string(0) ""
            public $Currency =>
            string(3) "EUR"
            public $FromQty =>
            int(4)
            public $ToQty =>
            int(7)
            public $PurchaseType =>
            string(7) "RENEWAL"
            public $Groups =>
            array(1) {
              [0] =>
              class stdClass#94 (2) {
                public $GroupCode =>
                string(6) "GRUP_1"
                public $Options =>
                array(1) {
                  [0] =>
                  class stdClass#95 (2) {
                    public $Name =>
                    string(13) "option name 1"
                    public $Value =>
                    string(13) "option_code_1"
                  }
                }
              }
            }
            public $Options =>
            string(76) "eJwBLADT/6G10uOW07exk6mNk7KvrpaSc4l1lbXToqi5sriTcbOXseWu3ZGrlXauuZOojh8cww=="
          }
          [29] =>
          class stdClass#96 (7) {
            public $ProductSKU =>
            string(0) ""
            public $Currency =>
            string(3) "EUR"
            public $FromQty =>
            int(4)
            public $ToQty =>
            int(7)
            public $PurchaseType =>
            string(7) "RENEWAL"
            public $Groups =>
            array(1) {
              [0] =>
              class stdClass#97 (2) {
                public $GroupCode =>
                string(6) "GRUP_1"
                public $Options =>
                array(1) {
                  [0] =>
                  class stdClass#98 (2) {
                    public $Name =>
                    string(13) "option name 2"
                    public $Value =>
                    string(13) "option_code_2"
                  }
                }
              }
            }
            public $Options =>
            string(76) "eJwBLADT/6G10uOW07exk6mNk7KvrpaSc4l1lbXToqi5sriTcbOXseWu3ZGrmXauuZOojjccxw=="
          }
          [30] =>
          class stdClass#99 (7) {
            public $ProductSKU =>
            string(0) ""
            public $Currency =>
            string(3) "EUR"
            public $FromQty =>
            int(4)
            public $ToQty =>
            int(7)
            public $PurchaseType =>
            string(7) "RENEWAL"
            public $Groups =>
            array(1) {
              [0] =>
              class stdClass#100 (2) {
                public $GroupCode =>
                string(6) "GRUP_1"
                public $Options =>
                array(1) {
                  [0] =>
                  class stdClass#101 (2) {
                    public $Name =>
                    string(13) "option name 3"
                    public $Value =>
                    string(13) "option_code_3"
                  }
                }
              }
            }
            public $Options =>
            string(76) "eJwBLADT/6G10uOW07exk6mNk7KvrpaSc4l1lbXToqi5sriTcbOXseWu3ZGrnXauuZOojk8cyw=="
          }
          [31] =>
          class stdClass#102 (7) {
            public $ProductSKU =>
            string(0) ""
            public $Currency =>
            string(3) "EUR"
            public $FromQty =>
            int(4)
            public $ToQty =>
            int(7)
            public $PurchaseType =>
            string(7) "RENEWAL"
            public $Groups =>
            array(1) {
              [0] =>
              class stdClass#103 (2) {
                public $GroupCode =>
                string(6) "GRUP_1"
                public $Options =>
                array(1) {
                  [0] =>
                  class stdClass#104 (2) {
                    public $Name =>
                    string(4) "NONE"
                    public $Value =>
                    string(4) "NONE"
                  }
                }
              }
            }
            public $Options =>
            string(0) ""
          }
          [32] =>
          class stdClass#105 (7) {
            public $ProductSKU =>
            string(0) ""
            public $Currency =>
            string(3) "GBP"
            public $FromQty =>
            int(1)
            public $ToQty =>
            int(3)
            public $PurchaseType =>
            string(11) "NEW_PRODUCT"
            public $Groups =>
            array(1) {
              [0] =>
              class stdClass#106 (2) {
                public $GroupCode =>
                string(6) "GRUP_1"
                public $Options =>
                array(1) {
                  [0] =>
                  class stdClass#107 (2) {
                    public $Name =>
                    string(13) "option name 1"
                    public $Value =>
                    string(13) "option_code_1"
                  }
                }
              }
            }
            public $Options =>
            string(76) "eJwBLADT/6G10uOW07exk6mNk7KvrpaSc4l1lbXToqi5sriTcbOXseWu3ZGrlXauuZOojh8cww=="
          }
          [33] =>
          class stdClass#108 (7) {
            public $ProductSKU =>
            string(0) ""
            public $Currency =>
            string(3) "GBP"
            public $FromQty =>
            int(1)
            public $ToQty =>
            int(3)
            public $PurchaseType =>
            string(11) "NEW_PRODUCT"
            public $Groups =>
            array(1) {
              [0] =>
              class stdClass#109 (2) {
                public $GroupCode =>
                string(6) "GRUP_1"
                public $Options =>
                array(1) {
                  [0] =>
                  class stdClass#110 (2) {
                    public $Name =>
                    string(13) "option name 2"
                    public $Value =>
                    string(13) "option_code_2"
                  }
                }
              }
            }
            public $Options =>
            string(76) "eJwBLADT/6G10uOW07exk6mNk7KvrpaSc4l1lbXToqi5sriTcbOXseWu3ZGrmXauuZOojjccxw=="
          }
          [34] =>
          class stdClass#111 (7) {
            public $ProductSKU =>
            string(0) ""
            public $Currency =>
            string(3) "GBP"
            public $FromQty =>
            int(1)
            public $ToQty =>
            int(3)
            public $PurchaseType =>
            string(11) "NEW_PRODUCT"
            public $Groups =>
            array(1) {
              [0] =>
              class stdClass#112 (2) {
                public $GroupCode =>
                string(6) "GRUP_1"
                public $Options =>
                array(1) {
                  [0] =>
                  class stdClass#113 (2) {
                    public $Name =>
                    string(13) "option name 3"
                    public $Value =>
                    string(13) "option_code_3"
                  }
                }
              }
            }
            public $Options =>
            string(76) "eJwBLADT/6G10uOW07exk6mNk7KvrpaSc4l1lbXToqi5sriTcbOXseWu3ZGrnXauuZOojk8cyw=="
          }
          [35] =>
          class stdClass#114 (7) {
            public $ProductSKU =>
            string(0) ""
            public $Currency =>
            string(3) "GBP"
            public $FromQty =>
            int(1)
            public $ToQty =>
            int(3)
            public $PurchaseType =>
            string(11) "NEW_PRODUCT"
            public $Groups =>
            array(1) {
              [0] =>
              class stdClass#115 (2) {
                public $GroupCode =>
                string(6) "GRUP_1"
                public $Options =>
                array(1) {
                  [0] =>
                  class stdClass#116 (2) {
                    public $Name =>
                    string(4) "NONE"
                    public $Value =>
                    string(4) "NONE"
                  }
                }
              }
            }
            public $Options =>
            string(0) ""
          }
          [36] =>
          class stdClass#117 (7) {
            public $ProductSKU =>
            string(0) ""
            public $Currency =>
            string(3) "GBP"
            public $FromQty =>
            int(1)
            public $ToQty =>
            int(3)
            public $PurchaseType =>
            string(7) "RENEWAL"
            public $Groups =>
            array(1) {
              [0] =>
              class stdClass#118 (2) {
                public $GroupCode =>
                string(6) "GRUP_1"
                public $Options =>
                array(1) {
                  [0] =>
                  class stdClass#119 (2) {
                    public $Name =>
                    string(13) "option name 1"
                    public $Value =>
                    string(13) "option_code_1"
                  }
                }
              }
            }
            public $Options =>
            string(76) "eJwBLADT/6G10uOW07exk6mNk7KvrpaSc4l1lbXToqi5sriTcbOXseWu3ZGrlXauuZOojh8cww=="
          }
          [37] =>
          class stdClass#120 (7) {
            public $ProductSKU =>
            string(0) ""
            public $Currency =>
            string(3) "GBP"
            public $FromQty =>
            int(1)
            public $ToQty =>
            int(3)
            public $PurchaseType =>
            string(7) "RENEWAL"
            public $Groups =>
            array(1) {
              [0] =>
              class stdClass#121 (2) {
                public $GroupCode =>
                string(6) "GRUP_1"
                public $Options =>
                array(1) {
                  [0] =>
                  class stdClass#122 (2) {
                    public $Name =>
                    string(13) "option name 2"
                    public $Value =>
                    string(13) "option_code_2"
                  }
                }
              }
            }
            public $Options =>
            string(76) "eJwBLADT/6G10uOW07exk6mNk7KvrpaSc4l1lbXToqi5sriTcbOXseWu3ZGrmXauuZOojjccxw=="
          }
          [38] =>
          class stdClass#123 (7) {
            public $ProductSKU =>
            string(0) ""
            public $Currency =>
            string(3) "GBP"
            public $FromQty =>
            int(1)
            public $ToQty =>
            int(3)
            public $PurchaseType =>
            string(7) "RENEWAL"
            public $Groups =>
            array(1) {
              [0] =>
              class stdClass#124 (2) {
                public $GroupCode =>
                string(6) "GRUP_1"
                public $Options =>
                array(1) {
                  [0] =>
                  class stdClass#125 (2) {
                    public $Name =>
                    string(13) "option name 3"
                    public $Value =>
                    string(13) "option_code_3"
                  }
                }
              }
            }
            public $Options =>
            string(76) "eJwBLADT/6G10uOW07exk6mNk7KvrpaSc4l1lbXToqi5sriTcbOXseWu3ZGrnXauuZOojk8cyw=="
          }
          [39] =>
          class stdClass#126 (7) {
            public $ProductSKU =>
            string(0) ""
            public $Currency =>
            string(3) "GBP"
            public $FromQty =>
            int(1)
            public $ToQty =>
            int(3)
            public $PurchaseType =>
            string(7) "RENEWAL"
            public $Groups =>
            array(1) {
              [0] =>
              class stdClass#127 (2) {
                public $GroupCode =>
                string(6) "GRUP_1"
                public $Options =>
                array(1) {
                  [0] =>
                  class stdClass#128 (2) {
                    public $Name =>
                    string(4) "NONE"
                    public $Value =>
                    string(4) "NONE"
                  }
                }
              }
            }
            public $Options =>
            string(0) ""
          }
          [40] =>
          class stdClass#129 (7) {
            public $ProductSKU =>
            string(0) ""
            public $Currency =>
            string(3) "GBP"
            public $FromQty =>
            int(4)
            public $ToQty =>
            int(7)
            public $PurchaseType =>
            string(11) "NEW_PRODUCT"
            public $Groups =>
            array(1) {
              [0] =>
              class stdClass#130 (2) {
                public $GroupCode =>
                string(6) "GRUP_1"
                public $Options =>
                array(1) {
                  [0] =>
                  class stdClass#131 (2) {
                    public $Name =>
                    string(13) "option name 1"
                    public $Value =>
                    string(13) "option_code_1"
                  }
                }
              }
            }
            public $Options =>
            string(76) "eJwBLADT/6G10uOW07exk6mNk7KvrpaSc4l1lbXToqi5sriTcbOXseWu3ZGrlXauuZOojh8cww=="
          }
          [41] =>
          class stdClass#132 (7) {
            public $ProductSKU =>
            string(0) ""
            public $Currency =>
            string(3) "GBP"
            public $FromQty =>
            int(4)
            public $ToQty =>
            int(7)
            public $PurchaseType =>
            string(11) "NEW_PRODUCT"
            public $Groups =>
            array(1) {
              [0] =>
              class stdClass#133 (2) {
                public $GroupCode =>
                string(6) "GRUP_1"
                public $Options =>
                array(1) {
                  [0] =>
                  class stdClass#134 (2) {
                    public $Name =>
                    string(13) "option name 2"
                    public $Value =>
                    string(13) "option_code_2"
                  }
                }
              }
            }
            public $Options =>
            string(76) "eJwBLADT/6G10uOW07exk6mNk7KvrpaSc4l1lbXToqi5sriTcbOXseWu3ZGrmXauuZOojjccxw=="
          }
          [42] =>
          class stdClass#135 (7) {
            public $ProductSKU =>
            string(0) ""
            public $Currency =>
            string(3) "GBP"
            public $FromQty =>
            int(4)
            public $ToQty =>
            int(7)
            public $PurchaseType =>
            string(11) "NEW_PRODUCT"
            public $Groups =>
            array(1) {
              [0] =>
              class stdClass#136 (2) {
                public $GroupCode =>
                string(6) "GRUP_1"
                public $Options =>
                array(1) {
                  [0] =>
                  class stdClass#137 (2) {
                    public $Name =>
                    string(13) "option name 3"
                    public $Value =>
                    string(13) "option_code_3"
                  }
                }
              }
            }
            public $Options =>
            string(76) "eJwBLADT/6G10uOW07exk6mNk7KvrpaSc4l1lbXToqi5sriTcbOXseWu3ZGrnXauuZOojk8cyw=="
          }
          [43] =>
          class stdClass#138 (7) {
            public $ProductSKU =>
            string(0) ""
            public $Currency =>
            string(3) "GBP"
            public $FromQty =>
            int(4)
            public $ToQty =>
            int(7)
            public $PurchaseType =>
            string(11) "NEW_PRODUCT"
            public $Groups =>
            array(1) {
              [0] =>
              class stdClass#139 (2) {
                public $GroupCode =>
                string(6) "GRUP_1"
                public $Options =>
                array(1) {
                  [0] =>
                  class stdClass#140 (2) {
                    public $Name =>
                    string(4) "NONE"
                    public $Value =>
                    string(4) "NONE"
                  }
                }
              }
            }
            public $Options =>
            string(0) ""
          }
          [44] =>
          class stdClass#141 (7) {
            public $ProductSKU =>
            string(0) ""
            public $Currency =>
            string(3) "GBP"
            public $FromQty =>
            int(4)
            public $ToQty =>
            int(7)
            public $PurchaseType =>
            string(7) "RENEWAL"
            public $Groups =>
            array(1) {
              [0] =>
              class stdClass#142 (2) {
                public $GroupCode =>
                string(6) "GRUP_1"
                public $Options =>
                array(1) {
                  [0] =>
                  class stdClass#143 (2) {
                    public $Name =>
                    string(13) "option name 1"
                    public $Value =>
                    string(13) "option_code_1"
                  }
                }
              }
            }
            public $Options =>
            string(76) "eJwBLADT/6G10uOW07exk6mNk7KvrpaSc4l1lbXToqi5sriTcbOXseWu3ZGrlXauuZOojh8cww=="
          }
          [45] =>
          class stdClass#144 (7) {
            public $ProductSKU =>
            string(0) ""
            public $Currency =>
            string(3) "GBP"
            public $FromQty =>
            int(4)
            public $ToQty =>
            int(7)
            public $PurchaseType =>
            string(7) "RENEWAL"
            public $Groups =>
            array(1) {
              [0] =>
              class stdClass#145 (2) {
                public $GroupCode =>
                string(6) "GRUP_1"
                public $Options =>
                array(1) {
                  [0] =>
                  class stdClass#146 (2) {
                    public $Name =>
                    string(13) "option name 2"
                    public $Value =>
                    string(13) "option_code_2"
                  }
                }
              }
            }
            public $Options =>
            string(76) "eJwBLADT/6G10uOW07exk6mNk7KvrpaSc4l1lbXToqi5sriTcbOXseWu3ZGrmXauuZOojjccxw=="
          }
          [46] =>
          class stdClass#147 (7) {
            public $ProductSKU =>
            string(0) ""
            public $Currency =>
            string(3) "GBP"
            public $FromQty =>
            int(4)
            public $ToQty =>
            int(7)
            public $PurchaseType =>
            string(7) "RENEWAL"
            public $Groups =>
            array(1) {
              [0] =>
              class stdClass#148 (2) {
                public $GroupCode =>
                string(6) "GRUP_1"
                public $Options =>
                array(1) {
                  [0] =>
                  class stdClass#149 (2) {
                    public $Name =>
                    string(13) "option name 3"
                    public $Value =>
                    string(13) "option_code_3"
                  }
                }
              }
            }
            public $Options =>
            string(76) "eJwBLADT/6G10uOW07exk6mNk7KvrpaSc4l1lbXToqi5sriTcbOXseWu3ZGrnXauuZOojk8cyw=="
          }
          [47] =>
          class stdClass#150 (7) {
            public $ProductSKU =>
            string(0) ""
            public $Currency =>
            string(3) "GBP"
            public $FromQty =>
            int(4)
            public $ToQty =>
            int(7)
            public $PurchaseType =>
            string(7) "RENEWAL"
            public $Groups =>
            array(1) {
              [0] =>
              class stdClass#151 (2) {
                public $GroupCode =>
                string(6) "GRUP_1"
                public $Options =>
                array(1) {
                  [0] =>
                  class stdClass#152 (2) {
                    public $Name =>
                    string(4) "NONE"
                    public $Value =>
                    string(4) "NONE"
                  }
                }
              }
            }
            public $Options =>
            string(0) ""
          }
          [48] =>
          class stdClass#153 (7) {
            public $ProductSKU =>
            string(0) ""
            public $Currency =>
            string(3) "BGN"
            public $FromQty =>
            int(1)
            public $ToQty =>
            int(3)
            public $PurchaseType =>
            string(11) "NEW_PRODUCT"
            public $Groups =>
            array(1) {
              [0] =>
              class stdClass#154 (2) {
                public $GroupCode =>
                string(6) "GRUP_1"
                public $Options =>
                array(1) {
                  [0] =>
                  class stdClass#155 (2) {
                    public $Name =>
                    string(13) "option name 1"
                    public $Value =>
                    string(13) "option_code_1"
                  }
                }
              }
            }
            public $Options =>
            string(76) "eJwBLADT/6G10uOW07exk6mNk7KvrpaSc4l1lbXToqi5sriTcbOXseWu3ZGrlXauuZOojh8cww=="
          }
          [49] =>
          class stdClass#156 (7) {
            public $ProductSKU =>
            string(0) ""
            public $Currency =>
            string(3) "BGN"
            public $FromQty =>
            int(1)
            public $ToQty =>
            int(3)
            public $PurchaseType =>
            string(11) "NEW_PRODUCT"
            public $Groups =>
            array(1) {
              [0] =>
              class stdClass#157 (2) {
                public $GroupCode =>
                string(6) "GRUP_1"
                public $Options =>
                array(1) {
                  [0] =>
                  class stdClass#158 (2) {
                    public $Name =>
                    string(13) "option name 2"
                    public $Value =>
                    string(13) "option_code_2"
                  }
                }
              }
            }
            public $Options =>
            string(76) "eJwBLADT/6G10uOW07exk6mNk7KvrpaSc4l1lbXToqi5sriTcbOXseWu3ZGrmXauuZOojjccxw=="
          }
          [50] =>
          class stdClass#159 (7) {
            public $ProductSKU =>
            string(0) ""
            public $Currency =>
            string(3) "BGN"
            public $FromQty =>
            int(1)
            public $ToQty =>
            int(3)
            public $PurchaseType =>
            string(11) "NEW_PRODUCT"
            public $Groups =>
            array(1) {
              [0] =>
              class stdClass#160 (2) {
                public $GroupCode =>
                string(6) "GRUP_1"
                public $Options =>
                array(1) {
                  [0] =>
                  class stdClass#161 (2) {
                    public $Name =>
                    string(13) "option name 3"
                    public $Value =>
                    string(13) "option_code_3"
                  }
                }
              }
            }
            public $Options =>
            string(76) "eJwBLADT/6G10uOW07exk6mNk7KvrpaSc4l1lbXToqi5sriTcbOXseWu3ZGrnXauuZOojk8cyw=="
          }
          [51] =>
          class stdClass#162 (7) {
            public $ProductSKU =>
            string(0) ""
            public $Currency =>
            string(3) "BGN"
            public $FromQty =>
            int(1)
            public $ToQty =>
            int(3)
            public $PurchaseType =>
            string(11) "NEW_PRODUCT"
            public $Groups =>
            array(1) {
              [0] =>
              class stdClass#163 (2) {
                public $GroupCode =>
                string(6) "GRUP_1"
                public $Options =>
                array(1) {
                  [0] =>
                  class stdClass#164 (2) {
                    public $Name =>
                    string(4) "NONE"
                    public $Value =>
                    string(4) "NONE"
                  }
                }
              }
            }
            public $Options =>
            string(0) ""
          }
          [52] =>
          class stdClass#165 (7) {
            public $ProductSKU =>
            string(0) ""
            public $Currency =>
            string(3) "BGN"
            public $FromQty =>
            int(1)
            public $ToQty =>
            int(3)
            public $PurchaseType =>
            string(7) "RENEWAL"
            public $Groups =>
            array(1) {
              [0] =>
              class stdClass#166 (2) {
                public $GroupCode =>
                string(6) "GRUP_1"
                public $Options =>
                array(1) {
                  [0] =>
                  class stdClass#167 (2) {
                    public $Name =>
                    string(13) "option name 1"
                    public $Value =>
                    string(13) "option_code_1"
                  }
                }
              }
            }
            public $Options =>
            string(76) "eJwBLADT/6G10uOW07exk6mNk7KvrpaSc4l1lbXToqi5sriTcbOXseWu3ZGrlXauuZOojh8cww=="
          }
          [53] =>
          class stdClass#168 (7) {
            public $ProductSKU =>
            string(0) ""
            public $Currency =>
            string(3) "BGN"
            public $FromQty =>
            int(1)
            public $ToQty =>
            int(3)
            public $PurchaseType =>
            string(7) "RENEWAL"
            public $Groups =>
            array(1) {
              [0] =>
              class stdClass#169 (2) {
                public $GroupCode =>
                string(6) "GRUP_1"
                public $Options =>
                array(1) {
                  [0] =>
                  class stdClass#170 (2) {
                    public $Name =>
                    string(13) "option name 2"
                    public $Value =>
                    string(13) "option_code_2"
                  }
                }
              }
            }
            public $Options =>
            string(76) "eJwBLADT/6G10uOW07exk6mNk7KvrpaSc4l1lbXToqi5sriTcbOXseWu3ZGrmXauuZOojjccxw=="
          }
          [54] =>
          class stdClass#171 (7) {
            public $ProductSKU =>
            string(0) ""
            public $Currency =>
            string(3) "BGN"
            public $FromQty =>
            int(1)
            public $ToQty =>
            int(3)
            public $PurchaseType =>
            string(7) "RENEWAL"
            public $Groups =>
            array(1) {
              [0] =>
              class stdClass#172 (2) {
                public $GroupCode =>
                string(6) "GRUP_1"
                public $Options =>
                array(1) {
                  [0] =>
                  class stdClass#173 (2) {
                    public $Name =>
                    string(13) "option name 3"
                    public $Value =>
                    string(13) "option_code_3"
                  }
                }
              }
            }
            public $Options =>
            string(76) "eJwBLADT/6G10uOW07exk6mNk7KvrpaSc4l1lbXToqi5sriTcbOXseWu3ZGrnXauuZOojk8cyw=="
          }
          [55] =>
          class stdClass#174 (7) {
            public $ProductSKU =>
            string(0) ""
            public $Currency =>
            string(3) "BGN"
            public $FromQty =>
            int(1)
            public $ToQty =>
            int(3)
            public $PurchaseType =>
            string(7) "RENEWAL"
            public $Groups =>
            array(1) {
              [0] =>
              class stdClass#175 (2) {
                public $GroupCode =>
                string(6) "GRUP_1"
                public $Options =>
                array(1) {
                  [0] =>
                  class stdClass#176 (2) {
                    public $Name =>
                    string(4) "NONE"
                    public $Value =>
                    string(4) "NONE"
                  }
                }
              }
            }
            public $Options =>
            string(0) ""
          }
          [56] =>
          class stdClass#177 (7) {
            public $ProductSKU =>
            string(0) ""
            public $Currency =>
            string(3) "BGN"
            public $FromQty =>
            int(4)
            public $ToQty =>
            int(7)
            public $PurchaseType =>
            string(11) "NEW_PRODUCT"
            public $Groups =>
            array(1) {
              [0] =>
              class stdClass#178 (2) {
                public $GroupCode =>
                string(6) "GRUP_1"
                public $Options =>
                array(1) {
                  [0] =>
                  class stdClass#179 (2) {
                    public $Name =>
                    string(13) "option name 1"
                    public $Value =>
                    string(13) "option_code_1"
                  }
                }
              }
            }
            public $Options =>
            string(76) "eJwBLADT/6G10uOW07exk6mNk7KvrpaSc4l1lbXToqi5sriTcbOXseWu3ZGrlXauuZOojh8cww=="
          }
          [57] =>
          class stdClass#180 (7) {
            public $ProductSKU =>
            string(0) ""
            public $Currency =>
            string(3) "BGN"
            public $FromQty =>
            int(4)
            public $ToQty =>
            int(7)
            public $PurchaseType =>
            string(11) "NEW_PRODUCT"
            public $Groups =>
            array(1) {
              [0] =>
              class stdClass#181 (2) {
                public $GroupCode =>
                string(6) "GRUP_1"
                public $Options =>
                array(1) {
                  [0] =>
                  class stdClass#182 (2) {
                    public $Name =>
                    string(13) "option name 2"
                    public $Value =>
                    string(13) "option_code_2"
                  }
                }
              }
            }
            public $Options =>
            string(76) "eJwBLADT/6G10uOW07exk6mNk7KvrpaSc4l1lbXToqi5sriTcbOXseWu3ZGrmXauuZOojjccxw=="
          }
          [58] =>
          class stdClass#183 (7) {
            public $ProductSKU =>
            string(0) ""
            public $Currency =>
            string(3) "BGN"
            public $FromQty =>
            int(4)
            public $ToQty =>
            int(7)
            public $PurchaseType =>
            string(11) "NEW_PRODUCT"
            public $Groups =>
            array(1) {
              [0] =>
              class stdClass#184 (2) {
                public $GroupCode =>
                string(6) "GRUP_1"
                public $Options =>
                array(1) {
                  [0] =>
                  class stdClass#185 (2) {
                    public $Name =>
                    string(13) "option name 3"
                    public $Value =>
                    string(13) "option_code_3"
                  }
                }
              }
            }
            public $Options =>
            string(76) "eJwBLADT/6G10uOW07exk6mNk7KvrpaSc4l1lbXToqi5sriTcbOXseWu3ZGrnXauuZOojk8cyw=="
          }
          [59] =>
          class stdClass#186 (7) {
            public $ProductSKU =>
            string(0) ""
            public $Currency =>
            string(3) "BGN"
            public $FromQty =>
            int(4)
            public $ToQty =>
            int(7)
            public $PurchaseType =>
            string(11) "NEW_PRODUCT"
            public $Groups =>
            array(1) {
              [0] =>
              class stdClass#187 (2) {
                public $GroupCode =>
                string(6) "GRUP_1"
                public $Options =>
                array(1) {
                  [0] =>
                  class stdClass#188 (2) {
                    public $Name =>
                    string(4) "NONE"
                    public $Value =>
                    string(4) "NONE"
                  }
                }
              }
            }
            public $Options =>
            string(0) ""
          }
          [60] =>
          class stdClass#189 (7) {
            public $ProductSKU =>
            string(0) ""
            public $Currency =>
            string(3) "BGN"
            public $FromQty =>
            int(4)
            public $ToQty =>
            int(7)
            public $PurchaseType =>
            string(7) "RENEWAL"
            public $Groups =>
            array(1) {
              [0] =>
              class stdClass#190 (2) {
                public $GroupCode =>
                string(6) "GRUP_1"
                public $Options =>
                array(1) {
                  [0] =>
                  class stdClass#191 (2) {
                    public $Name =>
                    string(13) "option name 1"
                    public $Value =>
                    string(13) "option_code_1"
                  }
                }
              }
            }
            public $Options =>
            string(76) "eJwBLADT/6G10uOW07exk6mNk7KvrpaSc4l1lbXToqi5sriTcbOXseWu3ZGrlXauuZOojh8cww=="
          }
          [61] =>
          class stdClass#192 (7) {
            public $ProductSKU =>
            string(0) ""
            public $Currency =>
            string(3) "BGN"
            public $FromQty =>
            int(4)
            public $ToQty =>
            int(7)
            public $PurchaseType =>
            string(7) "RENEWAL"
            public $Groups =>
            array(1) {
              [0] =>
              class stdClass#193 (2) {
                public $GroupCode =>
                string(6) "GRUP_1"
                public $Options =>
                array(1) {
                  [0] =>
                  class stdClass#194 (2) {
                    public $Name =>
                    string(13) "option name 2"
                    public $Value =>
                    string(13) "option_code_2"
                  }
                }
              }
            }
            public $Options =>
            string(76) "eJwBLADT/6G10uOW07exk6mNk7KvrpaSc4l1lbXToqi5sriTcbOXseWu3ZGrmXauuZOojjccxw=="
          }
          [62] =>
          class stdClass#195 (7) {
            public $ProductSKU =>
            string(0) ""
            public $Currency =>
            string(3) "BGN"
            public $FromQty =>
            int(4)
            public $ToQty =>
            int(7)
            public $PurchaseType =>
            string(7) "RENEWAL"
            public $Groups =>
            array(1) {
              [0] =>
              class stdClass#196 (2) {
                public $GroupCode =>
                string(6) "GRUP_1"
                public $Options =>
                array(1) {
                  [0] =>
                  class stdClass#197 (2) {
                    public $Name =>
                    string(13) "option name 3"
                    public $Value =>
                    string(13) "option_code_3"
                  }
                }
              }
            }
            public $Options =>
            string(76) "eJwBLADT/6G10uOW07exk6mNk7KvrpaSc4l1lbXToqi5sriTcbOXseWu3ZGrnXauuZOojk8cyw=="
          }
          [63] =>
          class stdClass#198 (7) {
            public $ProductSKU =>
            string(0) ""
            public $Currency =>
            string(3) "BGN"
            public $FromQty =>
            int(4)
            public $ToQty =>
            int(7)
            public $PurchaseType =>
            string(7) "RENEWAL"
            public $Groups =>
            array(1) {
              [0] =>
              class stdClass#199 (2) {
                public $GroupCode =>
                string(6) "GRUP_1"
                public $Options =>
                array(1) {
                  [0] =>
                  class stdClass#200 (2) {
                    public $Name =>
                    string(4) "NONE"
                    public $Value =>
                    string(4) "NONE"
                  }
                }
              }
            }
            public $Options =>
            string(0) ""
          }
        }
        public $Errors =>
        array(0) {
        }
      }
    }
  }
}

 

Cross-sell

Overview

The object below is returned directly or within a successful response from the following API requests:

            Retrieve a product’s cross-sell campaigns                                                        Retrieve cross-sell campaigns

Cross-sell object

Parameter Type/Description

MasterProducts

Array

 

Array of product codes for the items you set to trigger the cross-sell campaign.

DisplayType

String

 

  • cart – Shopping cart
  • review – Review page
  • finish – Thank you page

DisplayInEmail

Boolean

 

True or false depending on whether you set the cross-sell campaign to display in payment receipt emails or not.

Products

Array of objects

 

Details below

 

ProductCode

String

 

 

Product code for the item you set as recommended for the cross-sell campaign.

 

Discount

String

 

 

Value of the discount. This is a percentage.

 

DiscountType

String

 

 

PERCENT – you can only set discounts as a percentage of the product price.

CampaignCode

String

 

Unique, system-generated cross-sell campaign code.

Name

String

 

Campaign name.

StartDate

String

 

YYYY-MM-DD. The start date you set for the cross-sell campaign.

EndDate

String

 

YYYY-MM-DD. The end date you set for the cross-sell campaign.

 

IPN code samples

Use the code samples below to verify the validity of the IPN trigger.

PHP

<?php
/* Instant Payment Notification */

/* Return HTTP 200 response for initial IPN endpoint setup */
if ($_SERVER['REQUEST_METHOD'] === 'GET'){
    http_response_code(200);
    return;
}

/*
 * possible values: sha256, sha3-256
 * sha3-256 only for php version > 7.1
 */
$usedHashAlgorithm = 'sha256';

/* pass to compute HASH. Retrieve your secret key by accessing https://secure.2checkout.com/cpanel/webhooks_api.php */
$secretKey = "AABBCCDDEEFF";

function serializeArray($array) {
    $ret_value = "";

    foreach ($array as $key => $val) {
        /* skip signature hashes from computed hash */
        if (in_array($key , ['HASH', 'SIGNATURE_SHA2_256', 'SIGNATURE_SHA3_256'], true)) {
            continue;
        }

        if (is_array($val)) {
            $ret_value .= serializeArray($val);
        } else {
            $ret_value .= strlen($val) . $val;
        }
    }

    return $ret_value;
}

$signature_sha2   = isset($_POST["SIGNATURE_SHA2_256"]) ? $_POST["SIGNATURE_SHA2_256"] : '';    /* sha256 HASH received */
$signature_sha3   = isset($_POST["SIGNATURE_SHA3_256"]) ? $_POST["SIGNATURE_SHA3_256"] : '';    /* sha3-256 HASH received */

$stringForHash = serializeArray($_POST);
$computedHash = hash_hmac($usedHashAlgorithm, $stringForHash, $secretKey);

$validHash = false;
switch ($usedHashAlgorithm) {
    case "sha256":
        if ($computedHash == $signature_sha2) {
            $validHash = true;
        }
        break;
    case "sha3-256":
        if ($computedHash == $signature_sha3) {
            $validHash = true;
        }
        break;
}


if ($validHash === false) {
    /* hash verification failed */
    
    http_response_code(400);
    mail("your_address@example.com","BAD IPN Signature", print_r($_POST, TRUE),"");
    return;
}

// hash is valid. We proceed with success response
$responseDate = date('YmdHis');

$arrayForResponseHash = [
    $_POST["IPN_PID"][0],
    $_POST["IPN_PNAME"][0],
    $_POST["IPN_DATE"],
    $responseDate
];
$stringForResponseHash = serializeArray($arrayForResponseHash);

$responseString = '';
switch ($usedHashAlgorithm) {
    case "sha256":
        $responseHash = hash_hmac('sha256', $stringForResponseHash, $secretKey);
        $responseString = '<sig algo="sha256" date="' . $responseDate . '">' . $responseHash . '</sig>';
        break;
    case "sha3-256":
        $responseHash = hash_hmac('sha3-256', $stringForResponseHash, $secretKey);
        $responseString = '<sig algo="sha3-256" date="' . $responseDate . '">' . $responseHash . '</sig>';
        break;
}

http_response_code(200);
echo $responseString;

Java

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import javax.crypto.Mac;
import javax.crypto.spec.SecretKeySpec;
import javax.servlet.http.HttpServletRequest;
import java.security.InvalidKeyException;
import java.security.NoSuchAlgorithmException;
import java.text.SimpleDateFormat;
import java.util.*;

@RestController
@RequestMapping("/ipn")
public class IpnController {
    // retrieve your secret key by accessing https://secure.2checkout.com/cpanel/webhooks_api.php
    private String secretKey = "yoursecretkey";
    // sha256; for sha3-256, use HmacSHA3-256
    private String algorithm = "HmacSHA256";
    // sha256; for sha3-256, use SIGNATURE_SHA3_256
    private String signatureField = "SIGNATURE_SHA2_256";
    // sha256; for sha3-256, use sha3-256
    private String algoResponseString = "sha256";

    @RequestMapping(method = RequestMethod.POST)
    public String handleRequest(HttpServletRequest request) {

        Map<String, String[]> parameters = request.getParameterMap();

        String receivedRequestSignature = request.getParameter(signatureField);

        String calculatedRequestSignature = calculateRequestSignature(parameters);

        String responseDate = getResponseDate();

        String responseSignature = calculateResponseSignature(request, parameters, responseDate);

        if(calculatedRequestSignature.equals(receivedRequestSignature)) {
            String response = "Verified OK! <sig algo=\"" + algoResponseString + "\" date=\"" + responseDate + "\">" + responseSignature + "</sig>";
            handleIpn(parameters);
            return response;
        } else {
            // LOG OR EMAIL THIS OCCURRENCE
            return "Bad request!";
        }
    }

    private String calculateResponseSignature(HttpServletRequest request, Map<String, String[]> parameters, String responseDate) {
        String responseStringToSign = parameters.get("IPN_PID")[0].length() + parameters.get("IPN_PID")[0] +
                    parameters.get("IPN_PNAME")[0].length() + parameters.get("IPN_PNAME")[0] +
                    request.getParameter("IPN_DATE").length() + request.getParameter("IPN_DATE") +
                    responseDate.length() + responseDate;
        return hmacSha(responseStringToSign);
    }

    private String getResponseDate() {
        String pattern = "yyyyMMddHHmmss";
        SimpleDateFormat simpleDateFormat = new SimpleDateFormat(pattern);
        return simpleDateFormat.format(new Date());
    }

    private String calculateRequestSignature(Map<String, String[]> parameters) {
        String requestStringToVerify = "";
        for (Map.Entry<String, String[]> entry : parameters.entrySet()) {
            if (List.of("HASH", "SIGNATURE_SHA2_256", "SIGNATURE_SHA3_256").contains(entry.getKey())) continue;
            // convert parameter values array to ArrayList to be able to use streams
            ArrayList<String> valueList = new ArrayList<String>(Arrays.asList(entry.getValue()));
            // append to request string each length and value
            requestStringToVerify = valueList
                    .stream()
                    .reduce(requestStringToVerify,
                            (partialResult, value)
                                    -> partialResult + (value == null ? 0 : value.getBytes().length + value));
        }
        return hmacSha(requestStringToVerify);
    }

    private void handleIpn(Map<String, String[]> parameters) {
        // INSERT YOUR HANDLING CODE HERE
    }

    private String hmacSha(String stringForHash) {
        SecretKeySpec key = new SecretKeySpec((secretKey).getBytes(), algorithm);
        try {
            Mac mac = Mac.getInstance(algorithm);
            mac.init(key);
            byte[] bytes = mac.doFinal(stringForHash.getBytes());
            return toHexString(bytes);
        } catch (NoSuchAlgorithmException | InvalidKeyException e) {
            e.printStackTrace();
            return null;
        }
    }

    private String toHexString(byte[] bytes) {
        Formatter form = new Formatter();
        String result;

        for (byte b : bytes) {
            form.format("%02x", b);
        }
        result = form.toString();
        form.close();
        return result;
    }
}

Perl

#!/usr/bin/perl
# Simple IPN implementation for 2Checkout
# PERL version
use strict;
use CGI;
use Digest::SHA qw(hmac_sha256_hex);

# modify your settings here

# pass to compute HASH. Retrieve your secret key by accessing https://secure.2checkout.com/cpanel/webhooks_api.php
my $myKey='AABBCCDDEEFF';

# / end modifications area

my $q = new CGI;
my @name = $q->param;
print "Content-type: text/html\n\n";
my $in_sha256='';
my $first_product = '';
my $first_pid = '';
# Main loop
foreach my $par (@name) {
  next if ($par=~/HASH|SIGNATURE_SHA2_256|SIGNATURE_SHA3_256/i);
      if ($q->param($par) ne '') { #parameter not empty
        my @myList = $q->param($par);
          if (scalar(@myList)) { #multi valued
            foreach my $el (@myList) {
              $in_sha256.=length($el).$el;
          if ($par eq "IPN_PNAME[]") { $first_product = $myList[0]; }
          if ($par eq "IPN_PID[]") { $first_pid = $myList[0]; }
            }
          } else { #single valued
            $in_sha256.=length($q->param($par)).$q->param($par);
          }
      } else { #empty parameter
        $in_sha256.='0';
      }
}

my $mySha = $q->param('SIGNATURE_SHA2_256');
my $shaVerify = hmac_sha256_hex($in_sha256, $myKey);
my $response='';
if ($mySha=~/^$shaVerify$/i) { # ok
    # The notification is genuine / verified
    # Write your own code here to insert the data into a database or email it in a specified format
    # The code below will confirm the request
  $response = length($first_pid).$first_pid.length($first_product).$first_product.length($q->param("IPN_DATE")).$q->param("IPN_DATE");
  my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = gmtime(time);
  my $now = (1900+$year).sprintf("%02d", $mon+1).sprintf("%02d", $mday).sprintf("%02d", $hour).sprintf("%02d", $min).sprintf("%02d", $sec);
  $response.=length($now).$now;
  my $shaResponse = hmac_sha256_hex($response, $myKey);
  print '<sig algo="sha256" date="' . $now . '">' . $shaResponse . '</sig>';
  print "\n";
} else { # not ok
  print '<EPAYMENT>Error. Cannot verify signature.</EPAYMENT>';
  print "\n";
}

C# 

using System;    
using System.Collections.Generic;
using System.Security.Cryptography;
using System.Text;

namespace VerifoneIPNSample
{
    public class IpnSignatureHandler
    {
        public string calculateSignature(
            IEnumerable<KeyValuePair<string, string>> requestPayloadValues,
            string secretKey,
            string currentDate
            )
        {
            int size = 0;
            string hash = string.Empty;
            UTF8Encoding encoding = new UTF8Encoding();
            System.Text.StringBuilder PlainDataToHash = new System.Text.StringBuilder();
            var res = requestPayloadValues.GetEnumerator();

            while (res.MoveNext())
            {
                switch (res.Current.Key)
                {
                    case "IPN_PID[]":
                        size = res.Current.Value.Length; 
                                        
                        PlainDataToHash.Append(size);
                        PlainDataToHash.Append(res.Current.Value);
                        break; 
                    case "IPN_PNAME[]":
                        size = res.Current.Value.Length; 
                                        
                        PlainDataToHash.Append(size);
                        PlainDataToHash.Append(res.Current.Value);
                        break; 
                    case "IPN_DATE":
                        size = res.Current.Value.Length; 
                                        
                        PlainDataToHash.Append(size);
                        PlainDataToHash.Append(res.Current.Value);
                        break; 
                }
            }
            size = currentDate.Length;
            PlainDataToHash.Append(size);
            PlainDataToHash.Append(currentDate);
            
            Console.WriteLine(PlainDataToHash);

            string pass = secretKey;
            byte[] passBytes = encoding.GetBytes(pass);

            // sha256; for sha3-256, replace HMACSHA256 with HMACSHA3_256
            HMACSHA256 hmacSha = new HMACSHA256(passBytes);
            string HashData = PlainDataToHash.ToString();
            
            byte[] baseStringForHashBytes = encoding.GetBytes(HashData);
            byte[] hashBytes = hmacSha.ComputeHash(baseStringForHashBytes);
            
            hash = ByteToString(hashBytes);

            return hash;
        }

        private static string ByteToString(byte[] buff)
        {
            string sbinary = "";
            for (int i = 0; i < buff.Length; i++)
            {
                sbinary += buff[i].ToString("x2"); // hex format
            }
            return (sbinary);
        }

        public string generateTag(
            IEnumerable<KeyValuePair<string, string>> requestPayloadValues,
            string secretKey
            )
        {
            var now = DateTime.Now.ToString("yyyyMMddHHmmss");
            var responseHash = calculateSignature(requestPayloadValues, secretKey, now);

            // sha256; for sha3-256, replace algo=\"sha256\" with algo=\"sha3-256\"
             return $"<sig algo=\"sha256\" date=\"{now}\">{responseHash}</sig>";
        }
    }
}

C# - IPN Signature Handler Test Example  

using System;
using System.Collections.Generic;
using System.Security.Cryptography;
using System.Text;
using Microsoft.VisualStudio.TestTools.UnitTesting;

namespace VerifoneIPNSample.Tests
{
    [TestClass()]
    public class IpnSignatureHandlerTests
    {
        [TestMethod()]
        public void TestCalculateSignature() {
            List<KeyValuePair<string, string>> requestPayloadValues = new List<KeyValuePair<string, string>>()
            {
                new KeyValuePair<string, string>("IPN_PID[]", "1"),
                new KeyValuePair<string, string>("IPN_PNAME[]", "Software program"),
                new KeyValuePair<string, string>("IPN_DATE", "20050303123434"),
            };

            string testedDate = "20050303123434";
            string secretKey = "test";
            
            IpnSignatureHandler ipnHandler = new IpnSignatureHandler();

            var responseHash = ipnHandler.calculateSignature(requestPayloadValues, secretKey, testedDate);
            
            Console.WriteLine(responseHash);

            // sha256; for sha3-256, compare with "2726fe88a5b2bf7907034053124964eb614b46b929acc804034f7071121a4efb"
            Assert.AreEqual(responseHash, "7efee0c4b7b129f9b96ab279366c1ded92578d947596fb639060d1796ac431b3");
        }
    }
}

Retrieve options

Overview

Use the getProductUpgradeOptions method to retrieve the possible upgrade options for a subscription.

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.

Response

Parameters Type/Description

Subscription upgrade

Array of objects

Request

<?php

require ('PATH_TO_AUTH');

$subscriptionReference = 'YOUR_SUBSCRIPTION_REFERENCE';

try {
    $upgradeOptions = $client->getProductUpgradeOptions($sessionID, $subscriptionReference);
}
catch (SoapFault $e) {
    echo "upgradeOptions: " . $e->getMessage();
    exit;
}
var_dump("upgradeOptions", $upgradeOptions);

Product

Overview

This object is returned directly or within a successful response from the following API requests:

Retrieve products by ID                                      Retrieve products by code                                              Search products

Product object

Parameters Type/Description

AvangateId

String

 

Unique, system-generated 2Checkout product ID. Read-only.

ProductCode

String

 

The product code that you can define for each of your offerings. Needs to be unique.

ExternalReference String
  External reference that you control when defining the product.

ProductType

String

 

REGULAR or BUNDLE

ProductName

String

 

The name of the product

ProductVersion

String

 

The product version number

PurchaseMultipleUnits Boolean
 

Possible values:

  • TRUE - customers can purchase multiple units of this product.
  • FALSE - customers can purchase only one unit at a time.

 

The default value is TRUE.

 ​​​​​

Tangible Boolean
 

Possible values:

  • TRUE - for physical products
  • FALSE - for digital products 
TangibleDetails Object
  Only for physical products. Contains information related to product's physical setup.
  UnitDetails Array of objects
    Details on tangible setup.
                    Type String
    Product physical configuration type. Example: "WEIGHT".
                    Amount String
    Product's tangible weight. Example: "5".
  Fee Array of objects
    Details on handling fees associated with a tangible product.
                     Currency String
    Currency of the handling fee. Example: "USD"
                     Amount String
    Handling fee amount defined on the tangible product. Example: "5".
ProductGroup Object
  Product group information.
  Name String
    Product group name
  Code String
    Product group code generated when you create the group
  TemplateName String
    Default cart template used when generating buy links for products from this group. 
  Description String
    Product group description.

ShippingClass

Object

 

Existing shipping class object with the structure detailed below.

 

Name

String

 

 

The name of the shipping class

 

Amount

Decimal

 

 

The shipping costs

 

Currency

String

 

 

The currency ISO code used for shipping costs - ISO 4217.

 

ApplyTo

String

 

 

Possible values:

• PRODUCT

• ORDER

 

Type

Possible values:

• FIXED

• PERCENT

GiftOption

Boolean

 

True or false depending on whether the product can be gifted or not.

ShortDescription

String

 

Product's short description.

LongDescription

String

 

Product's long description.

SystemRequirements

String

 

System requirements

ProductCategory

String

 

Product category

Platforms

Array of Platform objects

 

Array of objects detailing the platforms supported by the application. Details below.

 

PlatformName

String

 

 

The label of the platform per the product configuration.

 

Category

String

 

 

Platform category per product configuration. 

ProductImages

Array of Image objects

 

Image object. Details below. Read-only.

 

Default

Boolean

 

 

True or False depending on whether you set the image stored at the address in the URL parameter as default or not.

 

URL

String

 

 

The location of the image on the 2Checkout system.

TrialUrl

String (anyURI)

 

The URL from where shoppers can download trial software.

TrialDescription

String

 

Descriptive text entered for trials.

Enabled

Boolean

 

True/false depending on whether the products are active or disabled. When empty, 2Checkout marks the product as disabled.  

AdditionalFields

Array of AdditionalFieldAssigned objects

 

Array of existing additional fields assigned to products. Details below.

 

Label

String

 

 

The name of the additional field assigned to a product.

 

Code

String

 

 

The code of the additional field assigned to a product.

 

Enabled

Boolean

 

 

True or false depending on whether the assigned product field is enabled or not.

 

Required

Boolean

 

 

True or false depending on whether the assigned product field is required or not.

 

URLParameter

String

 

 

The value of the system generated URL parameter for the product field that can be used in Buy Links.

Translations

Array of ProductTranslation objects

 

Details below.

 

LongDescription

String

 

 

The translated long description in the language corresponding to the Translation object.

 

TrialUrl

String

 

 

The trial URL for users speaking the language corresponding to the Translation object.

 

TrialDescription

String

 

 

 

 

SystemRequirements

String

 

 

Localized system requirements.

 

Name

String

 

 

Localized product name.

 

Description

String

 

 

Localized product short description.

 

Language

String

 

 

ISO 639-1 two-letter code.

PricingConfigurations

Array of PricingConfiguration objects

 

Details below. 2Checkout creates pricing configurations during the process when you add a product.

 

Name

String

 

 

Pricing configuration name

 

Code

String

 

 

System-generated identifier.

 

Default

boolean

 

 

True for the default pricing configuration

 

BillingCountries

Array of strings

 

 

ISO codes of the countries assigned to the pricing configuration.

Empty unless specific countries are assigned to a pricing configuration.

 

PricingSchema

String

 

 

DYNAMIC – With a base price

FLAT – Without a base price

 

PriceType

String

 

 

Possible values:  NET / GROSS

 

DefaultCurrency

String

 

 

The ISO code of the default currency for the pricing configuration

 

Prices

Object

 

 

Details below.

 

Regular

Array of objects

 

 

Details below.

 

Amount

Int

 

 

The price of the product.

 

Currency

String

 

 

ISO code of the currency for the product price.

 

MinQuantity

Int

 

 

The minimum quantity of volume discounts. Default is 1.

 

MaxQuantity

Int

 

 

The maximum quantity of volume discounts. Default is 99999.

 

OptionCodes

Array of objects

 

 

Details below.

 

Code

String

 

 

Price option identifier.

 

Options

Array of strings

 

 

The pricing options group option code you configured that the 2Checkout system uses to calculate product prices for pricing configurations without a base price.

 

Renewal

Array of objects

 

 

Details below.

 

Amount

Int

 

 

The price of the product.

 

Currency

String

 

 

ISO code of the currency for the product price.

 

MinQuantity

Int

 

 

The minimum quantity of volume discounts. Default is 1.

 

MaxQuantity

Int

 

 

The maximum quantity of volume discounts. Default is 99999.

 

OptionCodes

Array of PriceOptionCode objects

 

 

Details below.

 

Code

String

 

 

Price option identifier.

 

Options

Array of strings

 

 

The pricing options group option code you configured that the 2Checkout system uses to calculate product prices for pricing configurations without a base price.

 

PriceOptions

Array of AssignedPriceOptionGroup objects

 

 

Details below.

 

Code

String

 

 

System generated pricing options group code (you can also configure it) that the 2Checkout system uses to calculate product prices for pricing configurations without a base price.

 

Required

Boolean

 

 

True or False depending on whether you want to make it mandatory for shoppers to select the price option during the puyrchase process.

BundleProducts

Array of BundleProductCode objects

 

 

Details below.

 

ProductId

String

 

 

Unique, system-generated product ID.

 

ProductCode

String

 

 

Editable product code that you control.

Fulfillment

String

 

BY_AVANGATE

NO_DELIVERY – The 2Checkout system finalizes orders immediately after it receives payment confirmation.

BY_VENDOR – you are responsible for delivering/fulfilling orders

Prices

Array of Price objects

 

Use this object only when Pricing Configurations are not available for your account. Details below.

 

Amount

Int

 

 

The price of the product.

 

Currency

String

 

 

ISO code of the currency for the product price.

 

MinQuantity

Int

 

 

The minimum quantity of volume discounts. Default is 1.

 

MaxQuantity

Int

 

 

The maximum quantity of volume discounts. Default is 99999.

 

OptionCodes

Array of objects

 

 

Details below.

 

Code

String

 

 

Price option identifier.

 

Options

Array of strings

 

 

The pricing options group option code you configured that the 2Checkout system uses to calculate product prices for pricing configurations without a base price.

GeneratesSubscription

Boolean

 

TRUE or FALSE depending on whether you set the product to generate subscriptions or not.

 

NULL for bundles for which you set the following subscription management option: “Use the subscription settings of each product in the bundle”

SubscriptionInformation

ProductSubscriptionInformation Object

 

Details below. NULL for bundles which you set to use the renewal settings of child products and not of the parent bundle.

 

DeprecatedProducts

Array

 

 

Deprecated products.

 

BundleRenewalManagement

String

 

 

Possible values:

  • GLOBAL
  • INDIVIDUAL

Can be NULL.

 

BillingCycle

String

 

 

The number of subscription billing cycle units (months or days).  Possible values:

  • 0 (zero represents a one-time fee)

Days

  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14

 

Months

  • 1
  • 2
  • 3
  • 6
  • 12
  • 15
  • 18
  • 24
  • 36 (max)

 

BillingCycleUnits

String

 

 

The units of the billing cycle:

  • M - months
  • D - days

 

IsOneTimeFee

Boolean

 

 

True or False depending on whether the subscription is evergreen or not.

 

ContractPeriod

Object

 

 

Details below.

 

Period

Int

 

 

The contract period in months or days. -1 for unlimited contracts.

 

PeriodUnits

String

 

 

The contract period units

days | months

 

IsUnlimited

Boolean

 

 

This flag is true if the contract is for an unlimited period

 

Action

String

 

 

The action performed after the subscription expires.

Possible values CANCEL | RESTART

 

EmailsDuringContract Boolean

 

 

True or False depending on whether you suppress renewal notification emails throughout the duration of the contract or not.

 

UsageBilling

Int

 

 

The usage billing interval must be smaller than or equal to the grace period.

 

Interval of time within the grace period, when the 2Checkout system attempts to automatically charge customers for recurring costs and additional metered usage fees (in arrears). 2Checkout renews subscriptions only after subscribers make all outstanding payments per the renewal settings (from the expiration or the renewal date). If automatic renewal and usage charges fail, subscriptions can be manually renewed only by the end of the grace period, after which they expire.

 

Can be NULL.

 

GracePeriod

Object

 

Type

String

 

 

CUSTOM – you configured grace period setting at product level.

GLOBAL – global grace period settings apply.

 

Period

String

 

 

Number of days set for the grace period.

 

PeriodUnits

String

 

 

D - Days.

 

IsUnlimited

Boolean

 

 

TRUE or FALSE depending on whether you set the grace period to unlimited or not.

 

RenewalEmails

Object

 

 

Details below. Can be NULL. Available only in Product API 2.5 and later.

 

Type 

String

 

 

GLOBAL - Send emails according to the global renewal notification settings.

CUSTOM – per product renewal notification settings

 

Settings

Object (can be NULL)

 

 

Details below.

 

ManualRenewal

Object (can be NULL)

 

 

Details below.

 

Before30Days 

Boolean

 

 

True or False.

 

Before15Days 

Boolean

 

 

True or False.

 

Before7Days 

Boolean

 

 

True or False.

 

Before1Day 

Boolean

 

 

True or False.

 

OnExpirationDate 

Boolean

 

 

True or False.

 

After5Days

Boolean

 

 

True or False.

 

After15Days 

Boolean

 

 

True or False.

 

AutomaticRenewal

Object (can be NULL)

 

 

Details below.

 

Before30Days 

Boolean

 

 

True or False.

 

Before15Days 

Boolean

 

 

True or False.

 

Before7Days 

Boolean

 

 

True or False.

 

Before1Day 

Boolean

 

 

True or False.

 

OnExpirationDate 

Boolean

 

 

True or False.

 

After5Days

Boolean

 

 

True or False.

 

After15Days 

Boolean

 

 

True or False.

FulfillmentInformation

Object

 

Details below. Can be NULL. Available only in Product API 2.5 and later.

 

IsStartAfterFulfillment 

Boolean

 

 

True or False. Depending on whether you want the subscription lifetime to start afther the completion of the fulfillment process or not.

 

IsElectronicCode 

Boolean

 

 

True or False. Depending on whether you configure the delivery of keys/codes for the product or not.

 

IsDownloadLink 

Boolean

 

 

True or False. Depending on whether you configure the delivery of a product file or not.

 

IsBackupMedia 

Boolean

 

 

True or False. Depending on whether you configure the delivery of backup media or not.

 

IsDownloadInsuranceService 

Boolean

 

 

True or False. Depending on whether you enable the Download Insurance Service or not, for a product for which you configure a product file.

 

IsInstantDeliveryThankYouPage 

Boolean

 

 

True or False. Depending on whether you enable instant delivery in the Thank You page or not.

 

IsDisplayInPartnersCPanel 

Boolean

 

 

True or False. Depending on whether you share access to the product file with your channel partners or not.

  ReturnMethod Object
    Information on the customer redirect method after a successful purchase.
            Type String
   

Possible values:

  • DIRECT_RETURN
  • HEADER_REDIRECT
  • HTML_LINK
            URL String
    Website to which customers are redirected after a successful purchase. Example: "http://mySuccessURL.com"

 

CodeList 

Object (can be NULL)

 

 

Details below.

 

Code 

String

 

 

The unique code list identifier.

 

Name 

String

 

 

Name of the code list.

 

Type 

String

 

 

Code list type:

  • STATIC

  • DYNAMIC

 

BackupMedia 

Object (can be NULL)

 

 

Details below.

 

Code 

String

 

 

The unique backup media identifier.

 

Name 

String

 

 

Name of the backup CD/DVD.

 

Type 

String

 

 

Media type: CD

 

ProductFile

Object (can be NULL)

 

 

Details below.

 

Code 

String

 

 

Unique product file identifier.

 

Name 

String

 

 

Display name.

 

File 

String

 

 

Name of the product file.

 

Version 

String

 

 

File version.

 

Size

String

 

 

File size.

 

Type 

String

 

 

File type.

 

LastUpdate 

String

 

 

YYYY-MM-DD HH-MM-SS. Date time stamp when you last updated the file.

 

AdditionalInformationByEmail 

String (can be NULL)

 

 

The text you set up in the Additional fulfillment information - by email area.

 

AdditionalInformationEmailTranslations 

Object (can be NULL)

 

 

Array of localized Additional fulfillment information - by email texts.

 

AdditionalThankYouPage 

String (can be NULL)

 

 

The text you set up in the Additional fulfillment information - "Thank you" page area.

 

AdditionalThankYouPageTranslations 

Array (can be NULL)

 

 

Array of localized Additional fulfillment information - "Thank you" page texts.

 

Enable/Disable product

Overview

Use the setProductStatus method to enable / disable products for your account. 

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.

productCode

Required (string)

 

Use this object to configure your subscription plan/products.

 

You can set all Product parameters except AvangateID. The 2Checkout system sets the unique product ID. The AvangateID is not editable.

Status

Required (Boolean)

 

True or False, depending on whether you want to enable or disable a subscription plan/product.

Request

<?php

require ('PATH_TO_AUTH');

$productCode = "YourProductCode";

$jsonRpcRequest = array (
'jsonrpc' => '2.0',
'id' => $i++,
'method' => 'setProductStatus',
'params' => array($sessionID, $productCode, true)
);

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

?>

 

Response

bool(true)

Promotions

Overview

Use the Promotion object via SOAP API 4.0 to retrieve information on discounts/promotions you set up for your account.

Parameters

Parameters Type/Description

Promotion

Object

  Detailed below.

CouponCodes

Array of strings

 

Array of coupon/voucher codes when Coupon / Voucher type is Multiple. Otherwise, empty array.

ChannelType

String

 

Possible values:

  • ECOMMERCE
  • CHANNEL_MANAGER
  • ALL

CouponType

String

 

Possible values:

  • SINGLE
  • MULTIPLE

DiscountType

String

 

Possible values:

  • FIXED
  • PERCENT

Type

String

 

REGULAR

Discount

Int

 

The value of the discount. Example, for a $30 USD discount Avangate returns the value 30 and for a 25% price cut, Avangate returns 25.

Products

Array

 

Array of product codes for the products impacted by the promotion.

Name

String

 

Promotion name.

Description

String

 

Promotion description.

StartDate

String

 

Starting date. The date when you set the promotion to start. Is NULL for promotions that start immediately after they're created.

EndDate

String

 

Ending date. The date when you set the promotion to end. Is NULL for promotions that you want active indefinitely.

MaximumOrdersNumber

Int

 

When the maximum number of orders is reached the promotion stops. Can be NULL if you want the promotion to apply to an unlimited number of orders.

MaximumQuantity

Int

 

Discount only applies to a specific number of product, smaller than the maximum quantity you defined. Can be NULL if you want the promotion to apply to an unlimited number units. Any extra quantity added to the cart will be sold at full price.

InstantDiscount

Boolean

 

Selecting the instant discount option will auto-apply the discount for ALL the selected products for all shoppers, without the need to enter the discount coupon.

Coupon

String

 

The promotion/voucher for which you are extracting the information.

DiscountLabel

String

 

Discounts can be set as a percentage from the product price or as a fixed amount in the chosen currency.

Enabled

Boolean

 

Can be TRUE if promotion is enabled, or FALSE if otherwise.

Currency

String

 

Currency code available for the default currency of FIXED promotions. Missing for PERCENT promotions.

Code

String

 

Unique, system-generated identifier Avangate associates with promotion campaigns.

PriceThreshold

Object

 

Limits discount use only when total order value (taxes included) exceeds the threshold you configure.

 

Amount

 Decimal

 

 

The minimum threshold you defined for the default currency.

 

Currency

String

 

 

Currency code available for the default currency of custom threshold settings.

 

 

Product group

Overview

Use the ProductGroup object to create/add and update/edit product groups.

Attributes

Parameters Type/Description

ProductGroup

Object

Name

Required (string)

 

The name of the product group.

Code Optional (string)
  Unique, system-generated identifier assigned to product groups. 

TemplateName

Optional (string)

 

Leave empty to assign the Default Template to the product.

 

Or use the name of an active shopping cart template.

Description

Optional (string)

 

The description of the product group.

 

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