Skip to main content

Follow-up abandoned cart

Overview

If you are leveraging 2Checkout lead management tools (set your campaigns here), our system automatically sends out the Follow-up abandoned carts emails to recover and convert the leads driving increased revenues. This notification makes it easy for customers to return to the ordering page and complete a purchase without having to go back through the purchase process.

As of August 31, 2016, you can use a redesigned template complete with fresh content (sample below). The new template has replaced the previous email sent out for abandoned carts, but any customization you have in place, either in terms of styling or content, continues to be available.

Availability

The lead management set of tools is available for Standard and Enterprise accounts. If you are running on our Growth offer and would like to receive access, please contact us to discuss next steps.

What is the purpose of this email?

Cart abandonment is a common issue (the average rate via various list of studies calculated by Baymard is 69.82%) and happens for various reasons: Comparison shopping, lack of money, undecided shoppers, pricing research before trial & buy. Our Lead Management tool enables you to collect such leads, retarget and automate the process of recovery with automated scheduled notifications. 2Checkout prefills product, billing and delivery information in the cart using the details captured during the initial purchase attempt. Furthermore, you can set discounts so as to incentivize your shoppers to complete their purchases.

2Checkout can send out a basic follow-up message 20 minutes after shoppers abandon the cart, if we collect their first and last name as well as their email address. You have the option of configuring up to four additional follow-up emails and schedule them for up to 90 days from the cart abandonment.

Email content

The email includes:

  1. Link to the shopping cart.
  2. Special discounts and coupon codes.
  3. Merchant support information.

Preview and test email

Navigate to the Email template manager section to:

  • Preview and test current templates for emails sent to your shoppers
  • Customize the header and the footer sections by creating custom templates you can assign to your emails

Access the abandoned cart notification under the Follow-Up section. You can access this email only if the lead management set of tools is enabled for your account.

Why don't I see the new template for this email?

The redesigned template for the abandoned cart email notification has automatically replaced the default templates.

If your Control Panel preview does not show the new template, you are most probably using a customized version that includes content and/or styling your company requested at a certain point in time.

You can compare the above sample to your current template and send us an email if you decide the new one suits your business needs better. We will work with you on the switch.

Retrieve session content

Overview

Use the getContents method to get info on all the products added to cart by the shopper in the current session. Products can be either defined in the catalog, or created with dynamic information.    

Parameters

Parameters Type/Description

sessionID

Required (string)

 

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

Order

Required (Object)

 

Object designed to collect all data necessary for an order, including billing, product/subscription plan and payment details.

Response

Parameters Type/Description
SessionContents Object (for orders with catalog products)
SessionContents Object (for orders with dynamic products)

Request

<?php

require('PATH_TO_AUTH');

$Order = new stdClass();
$Order->RefNo = NULL;
$Order->Currency = 'usd';
$Order->Country = 'US';
$Order->Language = 'en';
$Order->CustomerIP = '91.220.121.21';
$Order->ExternalReference = NULL;
$Order->Source = NULL;
$Order->AffiliateId = NULL;
$Order->CustomerReference = NULL;
$Order->Items = array();
$Order->Items[0] = new stdClass();
$Order->Items[0]->Code = 'my_subscription_1'; // you can also send products with dynamic information
$Order->Items[0]->Quantity = 1;
$Order->Items[0]->PriceOptions = NULL;
$Order->Items[0]->SKU = NULL;
$Order->Items[0]->Price = NULL;
$Order->Items[0]->CrossSell = NULL;
$Order->Items[0]->Trial = false;
$Order->Items[0]->AdditionalFields = NULL;
$Order->Items[0]->Promotion = NULL;
$Order->BillingDetails = new stdClass();
$Order->BillingDetails->FirstName = 'FirstName';
$Order->BillingDetails->LastName = 'LastName';
$Order->BillingDetails->CountryCode = 'us';
$Order->BillingDetails->State = 'California';
$Order->BillingDetails->City = 'LA';
$Order->BillingDetails->Address1 = 'Address example';
$Order->BillingDetails->Address2 = NULL;
$Order->BillingDetails->Zip = '90210';
$Order->BillingDetails->Email = 'customer@email.com';
$Order->BillingDetails->Phone = NULL;
$Order->BillingDetails->Company = NULL;
$Order->DeliveryDetails = NULL;
$Order->PaymentDetails = new stdClass ();
$Order->PaymentDetails->Type = 'TEST';
$Order->PaymentDetails->Currency = 'usd';
$Order->PaymentDetails->PaymentMethod = new stdClass ();
$Order->PaymentDetails->CustomerIP = '10.10.10.10';
$Order->PaymentDetails->PaymentMethod->RecurringEnabled = true;
$Order->PaymentDetails->PaymentMethod->CardNumber = "4111111111111111";
$Order->PaymentDetails->PaymentMethod->CardType = 'visa';
$Order->PaymentDetails->PaymentMethod->ExpirationYear = '2019';
$Order->PaymentDetails->PaymentMethod->ExpirationMonth = '12';
$Order->PaymentDetails->PaymentMethod->HolderName = 'John';
$Order->PaymentDetails->PaymentMethod->CCID = '123';
$Order->Promotions = NULL;
$Order->AdditionalFields = NULL;
$Order->LocalTime = NULL;
$Order->GiftDetails = NULL;

try {
    $fullOrderDetails = $client->getContents ($sessionID, $orderReference);
}
catch (SoapFault $e) {
    echo "fullSessionDetails: " . $e->getMessage();
    exit;
}
var_dump("fullSessionDetails", $fullOrderDetails);

 

 

Upgrade a subscription

Overview

Retrieve information about the upgrade options for a specific subscription.

Parameters

Array of upgrade options

ProductInfo

Object

               

Details below.

 

ProductId

Int

 

 

Unique, system-generated product identifier belonging to the upgrade product.

 

ProductCode

String

 

 

Unique product identifier that you control belonging to the upgrade product.

 

ProductName

String

 

 

Product name

 

ProductVersion

String

 

 

The product version number that you control.

 

ProductEnabled

Boolean

 

 

Possible values:

0 – You disabled this product.

1 – You enabled this product.

 

ProductType

String

 

 

REGULAR or BUNDLE

 

Currency

String

 

 

The currency for prices. The currency ISO code used for the payment - ISO 4217.

 

DefaultCurrency

String

 

 

The product's default currency which is set in the Control Panel. The currency ISO code to be used for the payment - ISO 4217.

 

Price

Double

 

 

Product price. Can be null for flat pricing schemes. You need to call getPrice with Quantity, Currency and Price Options parameters to get a valid price.

 

GiftOption

String

 

 

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

 

IdGroup

Int

 

 

Product Group ID number.

 

GroupName

String

 

 

The name of the Product Group.

 

ShortDescription

String

 

 

The product's short description.

 

ProductImage

String

 

 

URLs to the product images uploaded into the Avangate platform.

 

Languages

Array of strings

 

 

Array of ISO language codes for the product - ISO 639-1.

 

PriceIntervals

Array of objects

 

 

Pricing intervals.

 

PriceType

String

 

 

NET or GROSS

 

PriceSchema

String

 

 

FLAT or DYNAMIC

Quantity

Int

 

Number of units available for the upgrade order.

PriceOptions

Array of objects

 

Details below.

 

Id

String

 

 

Pricing options ID.

 

Name

String

 

 

Pricing options group name.

 

Description

String

 

 

The description of the Pricing options group

 

Required

Boolean

 

 

True or False depending on whether you set the Pricing options group asrequired or not.

 

Type

String

 

 

Pricing options group type:

  • COMBO
  • CHECKBOX
  • RADIO

INTERVAL

 

Options

Array of objects

 

 

Details below.

 

 

Name

String

 

 

 

The name of the option inside the Pricing options group

 

 

Value

String

 

 

 

The code of the option inside the Pricing options group

 

 

Default

Boolean

 

 

 

True or false.

 

 

Description

String

 

 

 

The description of the option inside the Pricing options group.

 

 

MinValue

Int

 

 

 

Start value of a scale interval.

 

 

MaxValue

Int

 

 

 

End value of a scale interval.

Additional order fields

Overview

Use this object to create / update information on additional order/product fields. 

Parameters

AdditionalField Object

Label

String

 

Field text.

Code

String

 

Field identifier. Alpha-numeric chars, underscores and dashes.

Type

String

 

Field type:

  • LISTBOX
  • CHECKBOX
  • TEXT
  • HIDDEN

ApplyTo

Sting

 

  • ORDER
  • PRODUCT

Values

Array of values

 

Custom values you control.

ValidationRule

String

 

The validation rule restricting the type of information shoppers can enter in the additional field during the purchase process.

Translations

Array of objects

 

Details below.

               Label

String

 

Field text translated in the language of the Translations object.

              Values

Object

 

Custom values you control translated in the language of the Translations object.

             Language

String

 

ISO language code. (ISO 639-1 two-letter code).

 

 

Update promotion

Overview

Use the updatePromotion method to alter the details of an existing promotion.

Parameters

Parameter Type/Description
sessionID Required (string)
  Output of the Login method.
Promotion Required (object)
  Promotion object that you want to update.

Response

Parameter Type/Description
Promotion Updated promotion object.

Request

<?php
require ('PATH_TO_AUTH'); 

// Retrieve promotion details

$promotionCode = 'PROMOTION_CODE'; // code of the promotion that you want to update

try {
    $Discount = $client->getPromotion($sessionID, $promotionCode);
}
catch (SoapFault $e) {
    echo "Discount: " . $e->getMessage();
    exit;
}

var_dump("Discount", $Discount);

// Keep the promotion you want to update in $existingPromotion
try{
    $existingPromotion = $client->getPromotion($sessionID, $promotionCode);
}

catch (SoapFault $e) {
    echo "Existing Promotion: " . $e->getMessage();
    exit;
}

// Set the fields to update 
$existingPromotion->Description = 'Updated description';

// Update the promotion
try {
    $updatedPromotion = $client->updatePromotion($sessionID, $existingPromotion);
}

catch (SoapFault $e) {
    echo "UpdatedPromotion: " . $e->getMessage();
    exit;
}

var_dump("UpdatedPromotion", $updatedPromotion);

?>

Tips for cultural conversion

Do you sell digital goods (Software, SaaS, eBooks, etc) outside of North America? Have you optimized your website to grow your global revenue?

With 44% of digital commerce sales coming from outside of the US, there is a huge opportunity cost if you do not customize your website and marketing campaigns for your international web traffic.

Watch this 25-minute webinar to learn how to go beyond translation and localize for unique countries and cultures.

Together with our partner Oban Digital we'll show you:

  • How to optimize everything from keyword research, site design, messaging
  • Visual examples of cultural faux-pas around the world
  • Local payment methods to convert global shoppers
  • Best practices to grow your international revenues
Join Our Webinar

 

Add usage

Overview

Use the addSubscriptionUsage method via JSON-RPC API 6.0 to update specific usage easier, to add one usage line at a time, without having to create a file to do so, or to add multiple usages at the same time. 

Request Parameters

Parameters Type Required Description
merchantCode String Required Your unique 2Checkout merchant code.
sessionId String Required Unique 2Checkout session ID code. 
hash String Required The MD5 hmac key for the request.
SubscriptionReference String Required Unique code that represents a subscription. Example: 83FE4FEF2.
OptionCode String Required Unique 2Checkout option code. The pay-per-usage price options group for which the usage is uploaded. Example: metered pricing. 
UsageStart Datetime Required

The datetime when the usage started; can be the same as UsageEnd. Example: 2018-09-03 17:28:32.

UsageEnd Datetime Required The datetime when the usage ended and is recorded. Example: 2018-09-03 17:28:32.
Units Number Required Number of units recorded. Example: 10.
Description String Optional It can be used to store a short merchant comment of the usage being uploaded. This can be anything, from the source of usage (mobile, web, etc.), to why changes occurred, etc. Example: Subscription usage for September.

Request Sample

<?php
require ('PATH_TO_AUTH'); // authentication call
$SubscriptionReference = 'B7D8E72224';
$jsonRpcRequest = array (
    'jsonrpc' => '2.0',
    'method' => 'addSubscriptionUsage',
    'params' => array($sessionID, $SubscriptionReference, array(array("OptionCode" => "MeteredPricing", "UsageStart" => "2020-02-22 15:40:00", "UsageEnd" => "2020-03-22 15:40:00","Units" => 10))),
    'id' => $i++
);
var_dump ("addSubscriptionUsage", callRPC((Object)$jsonRpcRequest, $host));

Response 

The successful addSubscriptionUsage call via JSON-RPC APIv6 returns the Usage object.

{
"jsonrpc": "2.0",
"id": 260,
"result": [
{
"UsageReference": "120011112631",
"SubscriptionReference": "67F3AD6A32",
"OptionCode": "USG_MN",
"UsageStart": "2020-07-06 12:00:00",
"UsageEnd": "2020-07-07 12:00:00",
"Units": 10,
"Description": "",
"RenewalOrderReference": 0
}
]
}

Error handling

Error message description Error code Error message
LICENCECODE is not a valid licence code for the merchant INPUT_ERROR Usage was not added as the license code provided is invalid.
OPTIONCODE is invalid for the Merchant and Licence or is not a usage-based option code INPUT_ERROR Usage was not added as the option code provided is invalid.
Provided usage entries overlap within themselves or with existing usage entries INPUT_ERROR Usage was not added as the usage interval provided overlaps with an existing usage interval for the same LICENCECODE and OPTIONCODE combination.

 

Provided date formats are unsupported

INPUT_ERROR Usage start format unsupported. Please use YYYY-MM-DD HH:MM:SS.
Usage end format unsupported. Please use YYYY-MM-DD HH:MM:SS.

 

 

One or more mandatory parameters are missing or do not have the required format

INPUT_ERROR Usage was not added as one or more of the mandatory parameters are missing.
Usage was not added as one or more of the parameters do not match the required format.
Units not allowed.
Provided usages' start date is prior to the subscription start date or end date is after the subscription expiration date. INPUT_ERROR Usage interval out of bounds.
Unexpected error happens INTERNAL_ERROR <unexpected_error>

Cookie Management in the Merchant Control Panel

Overview

A cookie is a small text file that a website places on a user’s computer (including smartphones, tablets, or other connected devices) to store information about the user’s activity. Throughout the world, regulating entities see cookies as a “persistent identifier”, thus falling under the rules applied to protect Internet users' personal information.

Regulatory entities:

Availability

All merchants have access to Merchant Control Panel. Consequently, all of them will be seeing the cookie consent displayed (in one form or another, depending on where they are located when they access the portal. See more details below).

Cookie Management in the Merchant Control Panel

For merchants in California (USA), the European Union, and the rest of the world (ROW), 2Checkout uses three types of cookies:

  • Security (mandatory) - These cookies help protect merchants' data available during and after logging into their 2Checkout account and cannot be disabled.
  • Preference (optional) - These cookies are used to remember customers’ choices during navigation through their 2Checkout accounts, such as pagination selection or list types.
  • Statistics (optional) - These cookies help 2Checkout understand the merchants' interaction with their Merchant Control Panel so that our system can identify issues and continuously improve the overall experience merchants have. Data is collected and reported anonymously.

2Checkout collects consent upon the merchants' first access in the Merchant Control Panel through a link at the bottom of the landing page, where the user can:

  • Accept all cookies - This will check all the above 3 types of cookies (Security, Preference, Statistics)
  • Customize settings/Do not sell my info (for California users only) - This will enable the user to check any cookies other than the mandatory ones
  • Access the 2Checkout cookie policy.
For US users with unidentified state locations, 2Checkout will display the rules applied for California users.

For ROW users with unidentified state location 2Checkout will display the rules applied for EU users.

Cookie Module Display Based on Merchant Location

The Cookie module will be displayed differently depending on merchants' locations.

Cookie module displayed for merchants in the European Union

secure.avangate.local_cpanel_login.php.png

secure.2checkout.local_cpanel_ (1).png

By clicking on the Customize settings button, the user will be prompted with a separate window where they can choose their preferred settings.

Once the merchant performs an action on the Cookie Settings link in the footer, this will not be shown during any other subsequent accessing of the portal (for a one-year period). A link to Cookie settings will be available (bottom right corner), where the user will be able to change options for the optional types of cookies at any time. After one year, the merchant will be once again prompted with the collect consent for the placed cookies.

secure.2checkout.local_cpanel_ (3).png

Cookie module displayed for merchants in California

For merchants in California, the cookie module will display the Do not sell my information button. Once merchants click on it they will be prompted with the Cookies Management Center window, where they can enable their preferred cookies.

secure.avangate.local_cpanel_California.png

Cookie module displayed for merchants in the Rest of the World, including the US (non-EU, non-California)

cookie settings_1.png

cookie settings_2.png

Create promotion

Overview

Use the addPromotion method to create a new promotion.

Parameters

Parameters

Type/Description

sessionID

Required (String)

 

Output of the Login method.

Promotion

Object

 

Name

Optional(String)

 

 

Promotion name

 

Description

Optional(String)

 

 

Promotion description

 

StartDate

Optional(String)

 

 

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

Format: Y-m-d

 

EndDate

Optional(String)

 

 

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

Format: Y-m-d

 

MaximumOrdersNumber

Optional(Int)

 

 

Avangate stops offering the discount when the promotion reaches the maximum number of orders. Can be NULL if you want the promotion to apply to an unlimited number of orders.

 

MaximumQuantity

Optional(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

Optional(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

Optional(Object)

 

Type

Optional(String)

 

 

  • SINGLE = one coupon code shared by all shoppers
  • MULTIPLE = array of unique coupon codes, each designed for individual use

 

Code/Codes

Optional(String/Array)

 

 

Varies according to type. Send:

  • Code = 'single_code'; when Type = 'SINGLE';
  • Codes = ['code1', 'code2']; when Type = 'MULTIPLE';

Enabled

Optional(Boolean)

 

TRUE

FALSE

ChannelType

Optional(String)

 

Possible values:

  • ECOMMERCE
  • CHANNEL_MANAGER
  • ALL

Type

Optional(String)

 

REGULAR

Discount

Optional(Object)

 

Type

Optional(String)

 

 

Discount type:

  • PERCENT, use in combination with Value
  • FIXED, use in combination with Values and DefaultCurrency

 

Value / Values

Optional (Int / Array of objects)

 

 

  • Value = Int, determines the discount percentage from 0 to 100
  • Values = Array of Value objects

 

 

Value

Optional(Object)

 

 

         Currency

Optional (String)

 

 

 

 

ISO currency code

 

 

         Amount

Optional (Int)

 

 

 

 

Discount amount in corresponding currency.

 

DefaultCurrency

Optional(String)

 

 

ISO code

Products

Optional(Object)

 

Code

Optional(Int)

 

 

Unique product code that you control.

 

PricingConfigurationCode

Optional(String)

 

 

Unique system generated pricing configuration code.

 

PricingOptionCodes

Array of strings

 

 

Array of pricing option codes controlled by you.

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.

Translations

Optional(Array of objects)

 

PromotionTranslation

Optional(Object)

 

 

Name

Optional(String)

 

 

 

Localized name corresponding to translated language.

Name: Le product

Language: FR

 

 

Language

Optional(String)

 

 

 

 

Sources

StringArray

 

Array of strings defining the sale source through the SRC parameter.

PublishToAffiliatesNetwork

Optional(Int)

 

 

ApplyRecurring

Optional(String)

 

  • NONE
  • ALL
  • CUSTOM

RecurringChargesNumber

Optional(Int)

 

Offer discounts for a number of recurring billing charges beyond the initial purchase.

Response

Parameters Type/Description
Promotion 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);

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

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

$discountObj = new stdClass;
$discountObj->Type = 'PERCENT';
$discountObj->Value = 30;
$promotionObject->Discount = $discountObj;
$promotionObject->Products = [$productsObj1, $productsObj2, $productsObj3];
$promotionObject->Translations = [$translation1, $translation2];

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

$result = callRPC((object)$jsonRpcRequest, $host);
var_dump($result);

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