Skip to main content

Mark orders as shipped

Overview

Use markShipped to programmatically confirm the delivery of an order with physical products.

Requirements

You can confirm the shipment only for orders with tangible products. You cannot mark as shipped orders that are no longer authorized (have been reversed).

Parameters

Parameters Type/Description
RefNo String  / Required
  The system-generated order reference.
TrackingNumber String / Optional
  Tracking number that customers can use for checking the delivery of their products.
Comment String / Optional
  Additional information displayed in the delivery confirmation email sent to end-users.
StopCustomerNotification Boolean / Optional
 

Possible values:

  • TRUE - to send a notice informing customers of product shipment.
  • FALSE - will not trigger a customer notification

Request

require('PATH_TO_AUTH');

$RefNo = "789527422";
$TrackingNumber = '921840912';
$StopCustomerNotification = 1;
$Comment = "We send this note to confirm the shipment of your products.";


try {
    $markOrderAsShipped = $client->markShipped($sessionID, $RefNo, $TrackingNumber, $StopCustomerNotification, $Comment);
}
catch (SoapFault $e) {
    echo "OrderShipped: " . $e->getMessage();
    exit;
}
var_dump("OrderShipped", $markOrderAsShipped);

Response

boolean

 

Search cross-sell campaigns

Overview

Use the searchCrossSellCampaigns call to retrieve information on the cross-sell campaigns currently defined on your account. 

Request parameters

Parameters 

Type 

Required

Description 

CampaignName 

String 

Optional 

The name of the campaign.

Status 

String 

Optional 

The status of the campaign; can be ACTIVE/INACTIVE.

Products 

Array of strings 

Optional 

Array of product codes to apply to this campaign. 

RecommendedProducts 

Array of strings 

Optional 

Array of product codes recommended to the shopper.

StartDate 

String 

Optional 

The date when the cross-sell campaign starts, formatted as YYYY-MM-DD 

EndDate 

String 

Optional 

The date when the cross-sell campaign ends, formatted as YYYY-MM-DD 

Type String Optional Can be MERCH/AFF.

Pagination 

Object 

Optional 

  

Page 

Int 

Optional 

The page number of the results.

Limit 

Int 

Optional 

The number of results per page.

Response

Parameters Type/Description
Items An array of CrossSellCampaign Objects
Pagination Pagination Object with the following parameters: Page, Limit, Count

Request sample

<?php
declare(strict_types=1);

// Start clear CLI
echo chr(27).chr(91).'H'.chr(27).chr(91).'J';
// End clear CLI

$executionStartTime = microtime(true);

$apiVersion = '6.0';
$apiHost = "http://api.avangate.local";

$host = $apiHost."/soap/" . $apiVersion . "/";

$client = new SoapClient(
    $host."?wsdl",
    [
    'location' => $host,
    'trace' => 1,
    'cache_wsdl' => WSDL_CACHE_NONE
    ]
);
$client->__setCookie('XDEBUG_SESSION', 'PHPSTORM');

// Please be aware to consider valid data
$merchantCode = 'your_merchant_code';
$key = 'your_merchant_key';

// Generate hash for login
$date = gmdate('Y-m-d H:i:s');
$string = strlen($merchantCode) . $merchantCode . strlen($date) . $date;
$hash = hash_hmac('md5', $string, $key);

try {
    $sessionID = $client->login($merchantCode, $date, $hash);
} catch (SoapFault $e) {
    echo  $e->getMessage();
}

var_dump("Generated sessionID: ". $sessionID);
echo "\n\r";

// Build search parameters
$searchOptions = new \stdClass();

$searchOptions->Status = ['ACTIVE'];     // Optional | Ex: ['ACTIVE']
$searchOptions->Type = null;             // Optional | Ex: 'MERCH'
$searchOptions->CampaignName = null;     // Optional | Ex: 'UpdatedCampaign_4'
$searchOptions->Products = [];           // Optional | Ex: ["a01", "a02"]
$searchOptions->RecommendedProducts = [];// Optional | Ex: ["a03"]
$searchOptions->StartDate = null;        // Optional | Ex: 'YYYY-MM-DD'
$searchOptions->EndDate = null;          // Optional | Ex: 'YYYY-MM-DD'
$searchOptions->Pagination = null;       // Optional | Ex: {"Page": "1", "Limit": "10"}

try {
    $result = $client->searchCrossSellCampaigns($sessionID, $searchOptions);
    echo "\n\rSEARCH CROSS SELL CAMPAIGNS: \n\r";
    print_r(json_encode($result, JSON_PRETTY_PRINT));

} catch (SoapFault $e) {
    echo $e->getMessage();
}

$executionEndTime = microtime(true);

// The duration will be displayed in seconds and milliseconds.
$seconds = round($executionEndTime - $executionStartTime, 2);

// Print it out
echo "\n\rThis script took $seconds to execute.\n\r";

 

Instant Order Search Export (ISE)

Overview

Export order data for your account from the 2Checkout platform.

Instant Order Search Export (ISE) works as a data portability service designed to let you export order information from your 2Checkout account packaged as either CSV or XML files. 

   Most orders should be available in the search results almost instantly, but there might be situations where it might take up to 15 minutes for an order to be available in search results.

Availability

ISE is available to all 2Checkout accounts.

Method and URL

GET or POST: https://secure.2checkout.com/action/ise?

Parameters for eStore orders

2Checkout captures the parameters you send and exports the data to the client.

Field Description Required Used in HASH validation
MERCHANT Your 2Checkout merchant code. The merchant code and secret key for your account are available here. Required, cannot be empty YES
STARTDATE The start date, in format Y-m-d (ex: 2010-05-22) Required, cannot be empty YES
ENDDATE The end date, in format Y-m-d (ex: 2010-05-22) Required, cannot be empty YES
ORDERSTATUS

The order status:

  • ALL 
  • COMPLETE 
  • REFUND 
  • UNFINISHED
  • COMPLETE_AND_REFUND
  • REVERSED
Required, cannot be empty YES
REQ_DATE

The time of request (UTC), in format YmdHis:

Y = year, 4 digits

m = month, 2 digits

d = day, 2 digits

H = hour, 2 digits

i = minute, 2 digits

s = seconds, 2 digits

Required, cannot be empty YES
PRODUCT_ID Unique, system-generated 2Checkout product identifier Required, can be empty YES
COUNTRY_CODE Two letter country code (download a complete list from via this link) Required, can be empty YES
FILTER_STRING Query value that depends on the value of the FILTER_FIELD. See FILTER_FIELD for more info. Required, can be empty YES
FILTER_FIELD

Filter field designed to lower the search result. Use in conjunction with FILTER_STRING.

Possible values:

  • REFNO (2Checkout order reference) 
  • REFNOEXT (vendor order reference) 
  • NAME (customer name or company) 
  • EMAIL (customer billing email) 
  • COUPONCODE (order coupon code)
  • AFFLIATEID (orders from a specific affiliate)

To search only a particular order, the value of FILTER_FIELD needs to be REFNO, while the value of the FILTER_STRING should be the unique order reference from the 2Checkout system.

Required, can be empty YES
HASH The SHA256 HMAC key for the request Required N/A
SIGNATURE_ALG  The hashing algorithm used to authenticate the request. To use SHA2 or SHA3 for auth, simply pass sha256 or sha3-256 as value for the SIGNATURE_ALG parameter. Required NO
INCLUDE_DELIVERED_CODES Includes delivered codes Optional NO
INCLUDE_FINANCIAL_DETAILS Includes financial details. (Net profit, DIS COST, DIS Profit) Optional NO
INCLUDE_EXCHANGE_RATES Includes exchange rates Optional NO
INCLUDE_PRICING_OPTIONS Includes pricing options (pricing option text, pricing options value) Optional NO
EXPORT_FORMAT

This parameter controls the format of file used for the export process. Possible values:

  • CSV
  • XML
Optional NO
INCLUDE_CLIENTIP Include end user IP address Optional NO
INCLUDE_NETINCOMEPERPRODUCT Include net income per product Optional NO
USE_REPORT_MODE
  • YES - the search process returns orders in accordance with the date when they reached the Finished status. Finish date needs to be within the STARTDATE and ENDDATE interval.
  • NO (default) - the search process returns orders in accordance with the date when they were placed. Place order date need to be within the STARTDATE and ENDDATE interval.
Optional NO
EXPORT_TEST_ORDERS

Possible values:

  • YES - Include test orders along with real order.
  • NO (default) - Do not include test order data and export only details for actual purchases.
  • ONLY - Export only test order data.
Optional NO
EXPORT_TEMPLATE_ID

Return order search information specific to templates configured for Order Search Export by using their unique IDs. For eStore, navigate to Order search under Orders &customers and make sure that the eStore orders tab is selected. Run a search to identify the orders you're looking for, and on the right hand side of the screen click the Export button, and the Edit templates link in the popup dialog box. The template identifier is visible in the URL as the IdTemplate parameter. 

When using EXPORT_TEMPLATE_ID, you can exclude INCLUDE_DELIVERED_CODES, INCLUDE_FINANCIAL_DETAILS, INCLUDE_EXCHANGE_RATES, INCLUDE_PRICING_OPTIONS, INCLUDE_CLIENTIP and INCLUDE_NETINCOMEPERPRODUCT, if the Order search Export template already contains such information.

Data in the Order Search Export template takes precedence over INCLUDE_DELIVERED_CODES, INCLUDE_FINANCIAL_DETAILS, INCLUDE_EXCHANGE_RATES, INCLUDE_PRICING_OPTIONS, INCLUDE_CLIENTIP and INCLUDE_NETINCOMEPERPRODUCT - this means that these parameters are ignored if they overlap with template fields.

Optional NO
INCLUDE_CHARGEBACKS_STATUS_AND_REASON

Includes the status and reason provided for chargebacks. Available values:

  • YES
  • NO
Optional NO
EXPORT_TIMEZONE_REGION

Controls the timezone provided in STARTDATE and ENDDATE fields. Example: 'Europe/London'. Check the values accepted as strings here.

If not provided, the timezone used is the API timezone set up in Control Panel. If no API timezone is set, the default platform timezone is used. Daylight saving time is considered in the timezone region parameter.

Optional NO

Parameters for Partner orders

Field Description Required Used in HASH validation
MERCHANT Your 2Checkout merchant code. The merchant code and secret key for your account are available here. Required, cannot be empty YES
STARTDATE The start date, in format Y-m-d (ex: 2010-05-22) Required, cannot be empty YES
ENDDATE The end date, in format Y-m-d (ex: 2010-05-22) Required, cannot be empty YES
ORDERSTATUS

The order status:

  • REFUNDED
  • PENDING_APPROVAL
  • CANCELED
  • REJECTED
  • COMPLETE
  • AWAITING_PAYMENT
  • DELIVERY_NEEDS_INFO
Required, cannot be empty YES
REQ_DATE

The time of request (UTC), in format YmdHis:

Y = year, 4 digits

m = month, 2 digits

d = day, 2 digits

H = hour, 2 digits

i = minute, 2 digits

s = seconds, 2 digits

Required, cannot be empty YES
PRODUCT_ID Unique, system-generated 2Checkout product identifier. Required, can be empty YES
PARTNER_CODE Partners codes can be viewed by selecting each partner from here. Required, can be empty. If empty, default is all. Supports multiple codes per message, separated by a comma. NO
SUBSCRIPTION_TYPE

Subscription types:

  • NEW
  • RENEWAL
  • UPGRADE
Required, can be empty. If empty, default is all. NO
SOURCE

Source of the partner order:

  • PARTNER
  • VENDOR
Required, can be empty. If empty, default is all. NO
PRICELIST_CODE Price lists codes can be viewed by selecting each price list from here. Required, can be empty. NO
COUNTRY_CODE Two letter country code (download a complete list from this link) Required, can be empty. YES
FILTER_STRING Query value that depends on the value of the FILTER_FIELD. See FILTER_FIELD for more info. Required, can be empty. YES
FILTER_FIELD

FILTER_FIELD is designed to lower the search result. Use in conjunction with FILTER_STRING.

Possible values:

  • REFNO (2Checkout reference number)
  • PARTNER_REFNO (partner reference number)
  • PARTNER_INVOICE_NUMBER
  • SKU

To search only a particular order, the value of FILTER_FIELD needs to be REFNO, while the value of the FILTER_STRING should be the unique order reference from the 2Checkout system.

Required, can be empty. In conjunction with FILTER_STRING. YES
HASH The SHA256 HMAC key for the request. Required N/A
SIGNATURE_ALG  The hashing algorithm used to authenticate the request. To use SHA2 or SHA3 for auth, simply pass sha256 or sha3-256 as value for the SIGNATURE_ALG parameter. Required NO
EXPORT_FORMAT

This parameter controls the format of file used for the export process. Possible values:

  • CSV
  • XML
Optional NO
USE_REPORT_MODE
  • YES - the search process returns orders in accordance with the date when they reached the Finished status. Finish date needs to be within the STARTDATE and ENDDATE interval.
  • NO (default) - the search process returns orders in accordance with the date when they were placed. Place order date needs to be within the STARTDATE and ENDDATE interval.
Optional NO
PARTNER_INVOICE_DATE The date in format Y-m-d (ex: 2010-05-22). It filters the results and returns orders in accordance with the date when a partner invoice was generated for these orders. Optional  NO
EXPORT_TEMPLATE_ID

Return order search information specific to templates configured for Order Search Export by using their unique IDs. For Partner Orders, navigate to Order search under Orders &customers and make sure that the Partner orders tab is selected. Run a search to identify the orders you're looking for, and on the right hand side of the screen click the Export button, and the Edit templates link in the popup dialog box. The template identifier is visible in the URL as the IdTemplate parameter. 

 

When using EXPORT_TEMPLATE_ID, you can exclude INCLUDE_DELIVERED_CODES, INCLUDE_FINANCIAL_DETAILS, INCLUDE_EXCHANGE_RATES, INCLUDE_PRICING_OPTIONS, INCLUDE_CLIENTIP, and INCLUDE_NETINCOMEPERPRODUCT, if the Order search Export template already contains such information.

Data in the Order Search Export template takes precedence over INCLUDE_DELIVERED_CODES, INCLUDE_FINANCIAL_DETAILS, INCLUDE_EXCHANGE_RATES, INCLUDE_PRICING_OPTIONS, INCLUDE_CLIENTIP and INCLUDE_NETINCOMEPERPRODUCT - this means that these parameters are ignored if they overlap with template fields.

Optional NO
CHANNEL_TYPE

Specifies if the ISE should return eStore orders or Partner orders. Possible values:

  • ECOMMERCE (default)
  • PARTNER
Optional  NO

Requirements

HASH validation

  • To validate the SHA256 hash signature, you're required to include all mandatory parameters. 2Checkout throws an error if one of these parameters is missing.
  • Include PRODUCT_ID and COUNTRY_CODE. Use empty values to return all results. 
  • The interval between STARTDATE and ENDDATE can not be greater than 45 days (for performance purposes).
  • Use UTC for the time zone of REQ_DATE. The difference between the value of REQ_DATE and the moment when you send the request to 2Checkout must be smaller than 5 minutes, or 2Checkout will respond with the 'Request expired' error message. 

Authentication

Authenticate requests using:

  • HASH. This ia a SHA256 Hash-based message authentication code (HMAC) that you create using your account's secret key and the parameters marked as mandatory for HASH validation.  To build the HMACSHA256{}  source string, prepend each value with its own length in bytes. Use 0 for null or empty values without prepending their length. However, when the value is 0 (zero), you do need to prepend its length (1). Note that for UTF-8 characters the length in bytes can be longer that the string length.
  • REQ_DATE. Use UTC time zone. 

Optional: the authentication can be restricted by IP or range of IPs from firewall (Accounts settings ->User access -> Firewall) for the special service user. If the IP from where you make the request is not configured in 2Checkout, the authentication fails.

Response

Provided that your request is valid, you will receive the information in line, in the requested format (parameter EXPORT_FORMAT), with HTTP code 200.

Errors

2Checkout returns errors in XML format. This includes authentication errors and no results after a search message. 2Checkout throws errors with a 400 HTTP error code for the result page. Sample response XML:

<EPAYMENT> 
<RESPONSE_CODE>1</RESPONSE_CODE> 
<RESPONSE_MSG>Request has expired</RESPONSE_MSG> 
<RESPONSE_DATE>20110209144927</RESPONSE_DATE> 
<HASH>2f69dda102b2a29e077452f64f4dca1f</HASH> 
</EPAYMENT>

The XML can be validated using the same SHA256 HMAC signature algorithm, using these fields: RESPONSE_CODE, RESPONSE_MSG, RESPONSE_DATE and using the account hash key.

Field Description
RESPONSE_CODE The response code (two digits)
RESPONSE_MSG A more explanatory response message
RESPONSE_DATE

The time of response (UTC), in format YmdHis:

Y = year, 4 digits

m = month, 2 digits

d = day, 2 digits

H = hour, 2 digits

i = minute, 2 digits

s = seconds, 2 digits

 

Possible error codes and values:

Message code Message description Resolution
0 No result found for the searched criteria Check search filters.
1 Request has expired Check REQ_DATE.
2 Not all the mandatory variables are present See required fields above.
3 The selected interval is greater than 45 days Check STARTDATE and ENDDATE.
4 MERCHANT is missing or incorrect Check MERCHANT value.
5 ORDERSTATUS is missing or invalid Check ORDERSTATUS value.
6 Ip not allowed by firewall Check firewall rules for special service user.
7 HASH is missing or invalid Double check how SHA256 hash signature is calculated.
8 REQ_DATE is missing or invalid REQ_DATE is missing or not in the right format.
9 FILTER_FIELD is invalid Check possible values of FILTER_FIELD.
10 FILTER_STRING is missing or invalid FILTER_FIELD is set to limit search. Check FILTER_STRING value.
11 Module is not active for your account Instant Search Export service is not active for your account. Please contact account manager.
12 EXPORT_TEMPLATE_ID is invalid Check the EXPORT_TEMPLATE_ID value.
13 Country code is incorrect. Provide a valid country code.
14 Provided time zone region is incorrect Check EXPORT_TIMEZONE_REGION value.
15 PARTNER_CODE is invalid Check “Partner code” in View partner section in cPanel.
16 PRICELIST_CODE is invalid Check “Price list code” in Edit price list section in cPanel.

 

Code sample for eStore orders

<?php
/*
 Name: Example for Instant Search Export in Avangate (www.avangate.com)
 GET OR POST SENT
*/

$secret_key = 'SECRET_KEY'; //secret key is available on this page https://secure.2checkout.com/cpanel/account_settings.php
$base_link = 'https://secure.2checkout.com/action/ise.php';
$proxy_user = 'PROXY_USER_IF_NEEDED';
$proxy_pass = 'PROXY_PASSWORD_IF_NEEDED';
date_default_timezone_set('UTC');


//*********SETTING PARAMETERS*********
$link_params = array();
$algo = 'sha256'; // or sha3-256
$not_in_hash = array(
    'HASH',
    'INCLUDE_DELIVERED_CODES',
    'INCLUDE_FINANCIAL_DETAILS',
    'INCLUDE_EXCHANGE_RATES',
    'INCLUDE_PRICING_OPTIONS',
    'EXPORT_FORMAT',
    'EXPORT_TIMEZONE_REGION',
    'SIGNATURE_ALG',
);

//REQUIRED, CANNOT BE EMPTY:
$link_params['MERCHANT'] = 'MERCHANT_CODE'; //merchant code is available on this page https://secure.2checkout.com/cpanel/account_settings.php
$link_params['STARTDATE'] = date(
    "Y-m-d",
    strtotime('-1 month', strtotime(date('Y') . '/' . date('m') . '/01' . ' 00:00:00'))
); //first day from last month
$link_params['ENDDATE'] = date(
    "Y-m-d",
    strtotime('-1 second', strtotime(date('Y') . '/' . date('m') . '/01' . ' 00:00:00'))
); //last day from last month

$link_params['ORDERSTATUS'] = 'ALL'; // replace with any of  ALL, COMPLETE, REFUNDED, UNFINISHED
$link_params['REQ_DATE'] = date('YmdHis');

//CAN BE EMPTY:
$link_params['PRODUCT_ID'] = '';
$link_params['COUNTRY_CODE'] = '';
$link_params['FILTER_STRING'] = '';
$link_params['SIGNATURE_ALG'] = $algo;

//REQUIRED, CAN BE EMPTY:
$link_params['FILTER_FIELD'] = ''; // EMPTY OR: REFNO, REFNOEXT, NAME, EMAIL, COUPONCODE

//REQUIRED:
$link_params['HASH'] = '';

//OPTIONAL:
$link_params['INCLUDE_DELIVERED_CODES'] = '';
$link_params['INCLUDE_FINANCIAL_DETAILS'] = '';
$link_params['INCLUDE_EXCHANGE_RATES'] = '';
$link_params['INCLUDE_PRICING_OPTIONS'] = '';
$link_params['EXPORT_FORMAT'] = 'XML'; //possible values CSV or XML -    if you’re using this sample, please specify the desired export format
$link_params['EXPORT_TIMEZONE_REGION'] = 'Europe/London';

//*********GET Base string for HMAC_SHA256 calculation:*********
$result = '';
foreach ($link_params as $key => $val) {
    $$key = $val;
    /* get values */
    if (!in_array($key, $not_in_hash)) {
        if (is_array($val)) {
            $result .= ArrayExpand($val);
        } else {
            $size = strlen(StripSlashes($val));
            $result .= $size . StripSlashes($val);
        }
    }
}


//*********Calculated HMAC_SHA256 signature:*********
$hash = hash_hmac($algo, $result, $secret_key);
$link_params['HASH'] = $hash;

$get_vars = http_build_query($link_params, '', '&');


//*********MAKE POST CALL to get ISE results*********
$ch = curl_init($base_link . '?' . $get_vars);
curl_setopt($ch, CURLOPT_POSTFIELDS, null);
curl_setopt($ch, CURLOPT_POST, false);
curl_setopt($ch, CURLOPT_HTTPGET, true);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_HEADER, 0);
//**use the following 3 lines only if you have a proxy set!**
//curl_setopt($ch, CURLOPT_HTTPPROXYTUNNEL, 1);
//curl_setopt($ch, CURLOPT_PROXY, 'YOUR_PROXY_ADDRESS:PORT');
//curl_setopt($ch, CURLOPT_PROXYUSERPWD, $proxy_user.':'.$proxy_pass);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);  // RETURN THE CONTENTS OF THE CALL
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, true);
$responseData = curl_exec($ch);
$headerCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
$contentType = curl_getinfo($ch, CURLINFO_CONTENT_TYPE);
//echo 'Curl error: '.curl_error($ch);
curl_close($ch);


//*********PROCESS RESULTS*********
if ($headerCode == 200) {
    // do something with the csv or xml received
    //the format of the export file is set using $link_params['EXPORT_FORMAT']
    $exportType = strtolower($link_params['EXPORT_FORMAT']);
    $headerType = 'Content-type: application/' . $exportType . ';charset=UTF-8';
    $headerDisposition = 'Content-Disposition: attachment; filename="ise.' . $exportType . '"';
    header($headerType);
    header($headerDisposition);
    echo $responseData;
} else {
    //no valid answer received: request period is too big, etc.
    if (strpos($contentType, 'xml') === false) {
        echo 'Header returned: ' . $headerCode;
        echo $responseData;
    } else {
        //YOUR CODE HERE AFTER RECEIVING the xml with one of the codes from Instant Search Export Handbook
        $xml = $responseData;
        $xml = simplexml_load_string($xml);
        $response = array();
        $i = 0;
        foreach ($xml->children() as $child) {
            $response[$i] = $child;
            $i++;
        }
        echo $xml->asXML();
    }
}

//*********FUNCTIONS FOR HMAC*********
function ArrayExpand($array)
{
    $retval = "";
    foreach ($array as $i => $value) {
        if (is_array($value)) {
            $retval .= ArrayExpand($value);
        } else {
            $size = strlen(StripSlashes($value));
            $retval .= $size . StripSlashes($value);
        }
    }

    return $retval;
}

Add products to a promotion

Overview

Use addPromotionProducts to add products to 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 products to.

promotionProducts

Required (object)

 

Code

Required (string)

 

 

System generated product code.

 

pricingConfigurationCode

Optional (string)

 

 

System generated pricing configuration code.

 

pricingOptionCodes

Optional (array of strings)

 

 

Pricing option codes that you control.

Response

Parameter Type/Description
promotionProducts Object

Request

<?php

function callRPC($Request, $host, $Debug = true) {
    $curl = curl_init($host);
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, 0);
    curl_setopt($curl, CURLOPT_VERBOSE, true);
    curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, 0);
    curl_setopt($curl, CURLOPT_SSLVERSION, 0);
    curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
    curl_setopt($curl, CURLOPT_HTTPHEADER, array('Content-Type: application/json', 'Accept: application/json'));
    $RequestString = json_encode($Request);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $RequestString);
    if ($Debug) {
        $RequestString;
    }
    $ResponseString = curl_exec($curl);
    if ($Debug) {
        $ResponseString;
    }
    if (!empty($ResponseString)) {
        var_dump($ResponseString);
        $Response = json_decode($ResponseString);
        if (isset($Response->result)) {
            return $Response->result;
        }
        if (!is_null($Response->error)) {
            var_dump($Request->method, $Response->error);
        }
    } else {
        return null;
    }
}

$host = 'https://api.avangate.com/rpc/3.1/';

$merchantCode = "YOUR_MERCHANT_CODE"; // your account's merchant code available in the 'System settings' area of the cPanel: https://secure.avangate.com/cpanel/account_settings.php
$key = "YOUR_SECRET_KEY"; // your account's secret key available in the 'System settings' area of the cPanel: https://secure.avangate.com/cpanel/account_settings.php

$string = strlen($merchantCode) . $merchantCode . strlen(gmdate('Y-m-d H:i:s')) . gmdate('Y-m-d H:i:s');
$hash = hash_hmac('md5', $string, $key);

$i = 1;

$jsonRpcRequest = new stdClass();
$jsonRpcRequest->jsonrpc = '2.0';
$jsonRpcRequest->method = 'login';
$jsonRpcRequest->params = array($merchantCode, gmdate('Y-m-d H:i:s'), $hash);
$jsonRpcRequest->id = $i++;

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

$promotionCode = '';

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

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

$productPromotion = [$newProduct1, $newProduct2];

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

Single sign-on (SSO)

Overview

Use this method to redirect and login users of the Channel Manager/Partner account automatically from your system into their CM/Partner account based on their email address. This method connects third-party systems with the 2Checkout Channel Manager/Partner Control Panel and enables your partners to seamlessly sign in to their Control Panel.

The getPartnerSingleSignOn API method logs the partner users only into the Channel Manager account associated with your 2Checkout account. This method will not replicate the functionality of a full sign-in operation for users who partnered with multiple 2Checkout vendors and are leveraging connected partner accounts.

Requirements

This method requires you to set a specific partner using setPartner.

Parameters

Parameter Type/Description
sessionID Required (String)
  Session identifier, output of the Login method. An exception is thrown if the values are incorrect.
email Required (String)
  Channel Manager/Partner user account email address.
partnerCode Required (String)
  Unique partner identifier.
accessPage Required (String)
 

The specific Channel Manager / Partner control panel page you want the user to be redirected to.

Possible values:

You can use any URL in the Channel Manager/Partner Control Panel, including links to specific orders, subscriptions/licenses, and partner invoices.

validityTime Optional (Int)
  The time, in seconds, before the single sign-on URL returned by this method expires. By default, the URL expires after 10 seconds.
validationIP Optional (String)
  The IP address of the Channel Manager/Partner Control Panel user, required for security purposes. Can be an empty string or a valid IP, but cannot be NULL.

Response

Parameter Type/Description
Single sign-on URL String
 

The string is the complete single sign-on URL with a token to allow authentication into Channel Manager from external domains. Partner account users are logged in automatically to their Channel Manager accounts.

The URL can be used only once and only within the interval of time in which it's valid. Call this method again to generate a new single sign-on URL for a subsequent login action.

Request

<?php

require ('PATH_TO_AUTH');  // Authentication example: https://knowledgecenter.2checkout.com/Integration/Channel_Manager_API/JSON-RPC/02Authentication
require ('PATH_TO_setPartner'); // setPartner example: https://knowledgecenter.2checkout.com/Integration/Channel_Manager_API/JSON-RPC/06Reference/Partner/00Set_partner

$email = 'YOUR_PARTNER_EMAIL';
$partnerCode = 'YOUR_PARTNER_CODE';
$accessPage = 'YOUR_ACCESS_PAGE_URL';
$validityTime = VALIDITY_TIME;
$validationIP = 'VALIDATION_IP_ADDRESS';

$jsonRpcRequest = array (
'jsonrpc' => '2.0',
'id' => $i++,
'method' => 'getPartnerSingleSignOn ',
'params' => array($SessionID, $email, $partnerCode , $accessPage, $validityTime, $validationIP)
);
var_dump (callRPC((Object)$jsonRpcRequest, $host));

Errors

Error Description

INVALID_EMAIL

The email address is mandatory.

INVALID_EMAIL

Please specify a valid email address.

INVALID_PARTNER

The partner code is mandatory.

INVALID_PARTNER

Partner code provided is not associated to an active partner account.

INVALID_USER

Email address provided is not associated to a partner account user.

INVALID_URL

The page URL is mandatory.

INVALID_URL

The page URL provided is not valid.

INVALID_VALIDITY_TIME

Validity time needs to be a positive numeric value.

INTERNAL_ERROR

Cannot save security token. Please try again.

 

Cancel subscription pause

Overview

Use the cancelRenwalPause method to cancel a subscription's pause and change its status.

Request Parameters

Parameters Required Type/Description
merchantCode Required String. Unique merchant ID code that can be found in the Merchant Control Panel.
SubscriptionRef Required String. The system-generated reference code of the subscription.

Request Example

<?php
 
$sb = "58";
$vers = "6.0";
$client = new SoapClient("http://api.sandbox" . $sb . ".avangate.local/soap/$vers/?wsdl", array(
    'location' => "http://api.sandbox" . $sb . ".avangate.local/soap/$vers/",
    'cache_wsdl' => WSDL_CACHE_NONE,
    "trace" => 1));
 
$date = gmdate('Y-m-d H:i:s');
 
$merchantCode = "666999";
$key = "%y~8|m]T84p[W4+O1]_?";
 
 
$string = strlen($merchantCode) . $merchantCode . strlen($date) . $date;
$hash = hash_hmac('md5', $string, $key);
 
$sessionID = $client->login($merchantCode, $date, $hash);
var_dump("session: ", $sessionID);
 
//$client->__setCookie('XDEBUG_SESSION', 'PHPSTORM');
 
$SubRef = "B7D8E72224";
 
 
try {
    $cancelremvoePause = $client->cancelRenewalPause($sessionID, $SubRef);
    var_dump("cancelRenewalPause:", $cancelremvoePause);
} catch (SoapFault $e) {
    echo "Error cancelRenewalPause: " . $e->getMessage();
}
 
/*
try {
    $renewalPause = $client->getRenewalPause($sessionID, $SubRef);
    var_dump("getRenewalPause:", $renewalPause);
} catch (SoapFault $e) {
    echo "Error getRenewalPause: " . $e->getMessage();
}
*/
exit;

Response Parameters

Parameters Type/Description
SubscriptionRef

Boolean

  • TRUE - if the call was successful and a pause was scheduled; 
  • FALSE - if the pause mechanism is not enabled for the merchant OR any of the eligibility conditions were not met OR pause is not enabled for the product OR the maximum pause duration for the product was exceeded. In this case, the system also throws the following message: "The subscription is not eligible for pause."
   

Response Example

{
    “StartDate”: “2020-02-19 22:20:30",
    “ResumeDate”: “2020-03-01 18:00:00",
    “PauseReason”: “vacation leave”
} 

Cancel subscriptions

Cancellation

Once you cancel the subscription, you cannot perform any future refund or proration actions

You can reactivate canceled subscriptions. This action also enables actions such as proration, refunds, renewals and upgrades.

To cancel a subscription, click the Cancel immediately button from the subscription page. Choose whether to notify the customer about the subscription cancellation, by checking the "Send notification email to customer" checkbox. Leave the option unchecked in case you don't want your customers to be notified about the cancellation.

Unassign a PricingOption Group

Overview

Use the unassignPricingConfigurationOptionGroup method to remove a PricingOptionGroup from a PricingConfiguration.

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.

pricingConfigurationCode

Required (string)

 

Unique, system-generated pricing configuration identifier.  

priceOptionsGroupAssigned

Required (Object)

 

Details below.

PriceOptionsGroupAssigned

Object

Code

Required (string)

 

PricingOption Group identifier.

Required

Required (Object)

 

True or false depending on whether the pricing options group is required during the purchase process or not.

Response

bool(true)

Request

<?php

require ('PATH_TO_AUTH');

$pricingConfigurationCode = 'YOUR_PRICING_CONFIG_CODE';
$priceOptionsGroupAssigned = new stdClass();
$priceOptionsGroupAssigned->Code = 'STORAGE';
$priceOptionsGroupAssigned->Required = false;

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

?>

Custom upgrade links

Overview

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

Custom upgrade links allow you to define:

  • The upgrade product
  • Upgrade price
  • Product quantity
  • Pricing options
  • Time interval to replace subscription lifetime  

Availability

All 2Checkout accounts.

Create the upgrade link

To build upgrade links you need the following two elements:

  1. The main upgrade link 
    https://secure.2checkout.com/order/upgrade.php?

    The unique subscription identifier from the 2Checkout system: LICENSE=ABC1D2E345. The simplest upgrade link you can build is:

    https://secure.2checkout.com/order/upgrade.php?LICENSE=ABC1D2E345

Query parameters

Build your upgrade links using the following parameters.

Parameter Required / Optional Type/Description
LICENSE Required

Specifies the subscription to be upgraded.

Example: https://secure.2checkout.com/order/upgrade.php?LICENSE=ABC1D2E345
PROD Required Product ID of the target product used in the upgrade process.
PRICES(ProductId)[CURRENCY] Required

Price and currency to be used in the custom upgrade process.

Example: PRICES4692644[USD]=999
QTY Optional

Set product quantity. It does not impact the total order price.

 

PERIOD Optional Period of time to replace the subscription lifetime. Starts when the order is finalized. Requires PRICES parameter.
PHASH Required if using PRICE, PERIOD, OPTIONS, and/or QTY HMAC_MD5 signature in order to prevent the request from being exploited. All custom upgrade links require digital signing, similar to current manual renewal links.
LICENSE Required

Specifies the subscription to be upgraded.

Example: https://secure.2checkout.com/order/upgrade.php?LICENSE=ABC1D2E345
LANG Optional

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

Default value: EN.

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

Preselects the pricing options for the subscription, using the pricing options codes (the IDs you set for each option individually). You need to append the unique product identifier generated by the 2Checkout platform after the OPTIONS parameter. 

Example: OPTIONS1234567=5usr,2year.
UPGRADEPROD

Required in conjunction with UPGRADEOPT.

Optional otherwise.

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

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

Possible values:

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

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

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

Possible values:

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

Requires 2Checkout activation before using.

 

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

Upgrade a subscription with a specific price and period of time

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

Product A is offered to customers in two versions:

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

You're looking to prolong the subscription lifetime with 30 days, and charge the customer $50. For this example, the parameters must have the following values:

  • LICENSE=ABC1D2E345
  • PROD=1234567
  • OPTIONS1234567=1user
  • PRICES1234567[USD]=50
  • QTY=4
  • PERIOD=30

The resulting upgrade link (excluding PHASH) is:

https://secure.2checkout.com/order/upgrade.php?LICENSE=ABC1D2E345&PROD=1234567&OPTIONS1234567=1user&PRICES1234567[USD]=50&QTY=4&PERIOD=30

Secure upgrade links

Use a HMAC_MD5 signature to prevent links from being exploited. To calculate the HMAC_MD5 signature, you need to build a string from the query parameters of the Buy Link prefixed by the length of the sequence of parameters in tandem with the 2Checkout-generated SECRET KEY for your account (view secret key). 

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

Domain use

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

Add special price promotion

Overview

Use the AddSpecialPricePromotion method via SOAP API 6.0 to create a promotion with a special price.

Request parameters 

Parameters Type Required Description
Promotion Object Required Contains all details of the promotion.
PriceMatrix Array of Objects Required Only for this type of promotion; is generated by getPriceMatrix and used to set promotion special prices.
Coupon Object Required Type of coupon applied to the promotion.

Request sample

<?php

require('PATH_TO_AUTH');

$promotionObject = new stdClass;
$promotionObject->Name = 'YOUR_PROMOTION_TITLE';
$promotionObject->Description = 'YOUR_PROMOTION_DESCRIPTION';
$promotionObject->DefaultCurrency = "EUR";
$promotionObject->StartDate = date('Y-m-d', strtotime('1 month ago'));
$promotionObject->EndDate = date('Y-m-d', strtotime('+1 month'));
$promotionObject->Type = 'SPECIAL_PRICE';
$promotionObject->Enabled = 1;
$promotionObject->MaximumOrdersNumber = 0;
$promotionObject->MaximumQuantity = 0;
$promotionObject->InstantDiscount = false;
$promotionObject->ApplyRecurring = 'NONE';
$promotionObject->RecurringChargesNumber = 3;
$promotionObject->InstantDiscount = 0;

$couponObject = new stdClass;
$couponObject->Type = 'SINGLE';
$couponObject->Code = 'single_code';
$promotionObject->Coupon = $couponObject;

$productsObj1 = new stdClass;
$productsObj1->Code = 'test';
$promotionObject->Products = [$productsObj1];


$priceMatrixDefinition1 = new stdClass;
$priceMatrixDefinition1->ProductCode = "test";
$priceMatrixDefinition1->PricingConfigurationCode = "738C6A2049";
$priceMatrixDefinition1->OptionHash = "708e43960c4edc42f14cf388bcb24bde";

$option1 = new stdClass;
$option1->GroupName = "Units";
$option1->OptionText = "1 - maximum";

$price1 = new stdClass;
$price1->Value = 10;
$price1->Currency = "USD";
$price2 = new stdClass;
$price2->Value = 15;
$price2->Currency = "EUR";

$priceMatrixDefinition1->Options = [$option1];
$priceMatrixDefinition1->Prices = [$price1, $price2];

$promotionObject->PriceMatrix = [$priceMatrixDefinition1];


try {
    $newPromotion = $client->addPromotion($sessionID, $promotionObject);
} catch (SoapFault $e) {
    echo "NewPromotion: " . $e->getMessage();
    exit;
}

var_dump("Promotion", $newPromotion);

Response

{
   "@encodingStyle": "http://schemas.xmlsoap.org/soap/encoding/",
   "Body": {
      "addPromotionResponse": {
         "addPromotionReturn": {
            "@type": "ns2:Promotion",
            "Code": {
               "@type": "xsd:string",
               "#text": "6GR7JU369E"
            },
            "Name": {
               "@type": "xsd:string",
               "#text": "Promo percentage REST"
            },
            "Description": {
               "@type": "xsd:string",
               "#text": "Promo description1"
            },
            "StartDate": {
               "@type": "xsd:string",
               "#text": "2019-11-30"
            },
            "EndDate": {
               "@type": "xsd:string",
               "#text": "2100-12-31"
            },
            "MaximumOrdersNumber": {
               "@type": "xsd:int",
               "#text": "-1"
            },
            "MaximumQuantity": {
               "@type": "xsd:int",
               "#text": "1"
            },
            "InstantDiscount": {
               "@type": "xsd:boolean",
               "#text": "false"
            },
            "Coupon": {
               "@type": "ns2:PromotionCouponSingleOrMultiple",
               "Type": {
                  "@type": "xsd:string",
                  "#text": "MULTIPLE"
               },
               "Codes": {
                  "@arrayType": "xsd:string[2]",
                  "@type": "ns2:StringArray",
                  "item": [
                     {
                        "@type": "xsd:string",
                        "#text": "code1"
                     },
                     {
                        "@type": "xsd:string",
                        "#text": "code2"
                     }
                  ]
               }
            },
            "Enabled": {
               "@type": "xsd:boolean",
               "#text": "true"
            },
            "ChannelType": {
               "@nil": "true"
            },
            "Type": {
               "@type": "xsd:string",
               "#text": "SPECIAL_PRICE"
            },
            "Discount": {
               "@nil": "true"
            },
            "Products": {
               "@arrayType": "ns2:PromotionProduct[1]",
               "@type": "ns2:PromotionProductsArray",
               "item": {
                  "@type": "ns2:PromotionProduct",
                  "Code": {
                     "@type": "xsd:string",
                     "#text": "test"
                  },
                  "PricingOptionCodes": {
                     "@nil": "true"
                  },
                  "PricingConfigurationCode": {
                     "@nil": "true"
                  }
               }
            },
            "PriceThreshold": {
               "@nil": "true"
            },
            "Translations": {
               "@arrayType": "ns2:PromotionTranslation[1]",
               "@type": "ns2:PromotionTranslationsArray",
               "item": {
                  "@type": "ns2:PromotionTranslation",
                  "Name": {
                     "@type": "xsd:string",
                     "#text": "Promo percentage REST"
                  },
                  "Language": {
                     "@type": "xsd:string",
                     "#text": "EN"
                  }
               }
            },
            "Sources": {
               "@arrayType": "xsd:string[0]",
               "@type": "ns2:SourcesArray"
            },
            "PublishToAffiliatesNetwork": {
               "@nil": "true"
            },
            "ApplyRecurring": {
               "@type": "xsd:string",
               "#text": "NONE"
            },
            "RecurringChargesNumber": {
               "@type": "xsd:int",
               "#text": "0"
            },
            "DefaultCurrency": {
               "@type": "xsd:string",
               "#text": "EUR"
            },
            "PriceMatrix": {
               "@arrayType": "ns2:PromotionPriceMatrix[1]",
               "@type": "ns2:PromotionPriceMatrixArray",
               "item": {
                  "@type": "ns2:PromotionPriceMatrix",
                  "ProductCode": {
                     "@type": "xsd:string",
                     "#text": "test"
                  },
                  "PricingConfigurationCode": {
                     "@type": "xsd:string",
                     "#text": "738C6A2049"
                  },
                  "OptionHash": {
                     "@type": "xsd:string",
                     "#text": "708e43960c4edc42f14cf388bcb24bde"
                  },
                  "Options": {
                     "@arrayType": "ns2:PromotionPriceMatrixOptions[1]",
                     "@type": "ns2:PromotionPriceMatrixOptionsArray",
                     "item": {
                        "@type": "ns2:PromotionPriceMatrixOptions",
                        "GroupName": {
                           "@type": "xsd:string",
                           "#text": "Units"
                        },
                        "OptionText": {
                           "@type": "xsd:string",
                           "#text": "1 - maximum"
                        }
                     }
                  },
                  "Prices": {
                     "@arrayType": "ns2:PromotionPriceMatrixPrices[12]",
                     "@type": "ns2:PromotionPriceMatrixPricesArray",
                     "item": [
                        {
                           "@type": "ns2:PromotionPriceMatrixPrices",
                           "Value": {
                              "@type": "xsd:double",
                              "#text": "31.156"
                           },
                           "Currency": {
                              "@type": "xsd:string",
                              "#text": "CAD"
                           }
                        },
                        {
                           "@type": "ns2:PromotionPriceMatrixPrices",
                           "Value": {
                              "@type": "xsd:double",
                              "#text": "20"
                           },
                           "Currency": {
                              "@type": "xsd:string",
                              "#text": "EUR"
                           }
                        },
                        {
                           "@type": "ns2:PromotionPriceMatrixPrices",
                           "Value": {
                              "@type": "xsd:double",
                              "#text": "40"
                           },
                           "Currency": {
                              "@type": "xsd:string",
                              "#text": "USD"
                           }
                        },
                        {
                           "@type": "ns2:PromotionPriceMatrixPrices",
                           "Value": {
                              "@type": "xsd:double",
                              "#text": "1587.5251590698"
                           },
                           "Currency": {
                              "@type": "xsd:string",
                              "#text": "ARS"
                           }
                        },
                        {
                           "@type": "ns2:PromotionPriceMatrixPrices",
                           "Value": {
                              "@type": "xsd:double",
                              "#text": "18541.12858627"
                           },
                           "Currency": {
                              "@type": "xsd:string",
                              "#text": "CLP"
                           }
                        },
                        {
                           "@type": "ns2:PromotionPriceMatrixPrices",
                           "Value": {
                              "@type": "xsd:double",
                              "#text": "18.1324"
                           },
                           "Currency": {
                              "@type": "xsd:string",
                              "#text": "GBP"
                           }
                        },
                        {
                           "@type": "ns2:PromotionPriceMatrixPrices",
                           "Value": {
                              "@type": "xsd:double",
                              "#text": "2447.2"
                           },
                           "Currency": {
                              "@type": "xsd:string",
                              "#text": "JPY"
                           }
                        },
                        {
                           "@type": "ns2:PromotionPriceMatrixPrices",
                           "Value": {
                              "@type": "xsd:double",
                              "#text": "499.518"
                           },
                           "Currency": {
                              "@type": "xsd:string",
                              "#text": "MXN"
                           }
                        },
                        {
                           "@type": "ns2:PromotionPriceMatrixPrices",
                           "Value": {
                              "@type": "xsd:double",
                              "#text": "97.536"
                           },
                           "Currency": {
                              "@type": "xsd:string",
                              "#text": "RON"
                           }
                        },
                        {
                           "@type": "ns2:PromotionPriceMatrixPrices",
                           "Value": {
                              "@type": "xsd:double",
                              "#text": "1846.05"
                           },
                           "Currency": {
                              "@type": "xsd:string",
                              "#text": "RUB"
                           }
                        },
                        {
                           "@type": "ns2:PromotionPriceMatrixPrices",
                           "Value": {
                              "@type": "xsd:double",
                              "#text": "601.82854437393"
                           },
                           "Currency": {
                              "@type": "xsd:string",
                              "#text": "UAH"
                           }
                        },
                        {
                           "@type": "ns2:PromotionPriceMatrixPrices",
                           "Value": {
                              "@type": "xsd:double",
                              "#text": "384.374"
                           },
                           "Currency": {
                              "@type": "xsd:string",
                              "#text": "ZAR"
                           }
                        }
                     ]
                  }
               }
            }
         }
      }
   }
} 

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