Skip to main content

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).

 

 

 

Set an external reference

Overview

Use the setExternalRef method in conjunction with setSubscriptionUpgrade.

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.

externalRef

Required (string)

 

External reference you control.

Response

Parameters Type/Description

Boolean

true or false depending on whether or not the operation succeeded.

Request

<?php

require ('PATH_TO_AUTH');

$externalReference = 'YOUR_EXTERNAL_REFERENCE';

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

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

ProductInfo Object Structure

Parameters

Parameter Type/Description
SimpleProduct Object
  Product object with the structure detailed below.
                                                            LongDescription           

String/Optional

 

The product's long description.

                                                            SystemRequirements

String

 

Localized system requirements.

                                                            Platforms

Array of Platform objects/Optional

 

An array of objects detailing the platforms supported by the application. 

                                                            URLImage

String

 

The location of the image in the 2Checkout system.

                                                            TrialURL

String

 

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

                                                            TrialDescription

String/Optional

 

Descriptive text entered for trials.

                                                            AdditionalInfo

NULL

 

Additional information about the product.

                                                           RenewalProductID

Int

 

The product renewal ID.

                                                           ProductId

String

 

Unique, system-generated product ID.

                                                           ProductCode

String

 

Editable product code that you control.

                                                           ProductName

String

 

Editable product name.

                                                           ProductVersion

String/Optional

 

The product version number.

                                                           ProductStatus

Boolean

 

The status of the product. Enabled if TRUE, disabled if FALSE.

                                                           ProductType

String/Optional

 

REGULAR or BUNDLE

Defaults to REGULAR.

                                                           Currency

String

 

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

                                                           DefaultCurrency

String

 

The ISO code of the default currency for the pricing configuration.

                                                           Price

String

 

The product price.

                                                           GiftOption

Boolean/Optional

 

TRUE or FALSE depending on whether the product can be gifted or not.

                                                           IdGroup

String

 

The ID of the product group.

                                                           GroupName

String/Optional

 

The name of the Product Group to which the product belongs.

                                                           ShortDescription

String/Optional

 

The product's short description.

                                                           ProductImage

NULL

 

Image object. 

                                                           Languages

Array

 

An array of objects detailing the languages supported by the application.

                                                           PriceIntervals

NULL

 

 

                                                           PriceType

String

 

Possible values:  NET/GROSS.

                                                           PriceSchema

String

 

DYNAMIC

                                                           PriceOptions

Array of AssignedPriceOptionGroup objects

 

PriceOptionsGroupItem object with the structure detailed below.

  Id

String

 

Price option identifier.

  Name

String

 

Pricing configuration name.

  Description

String

 

Description of the pricing option.

  Required

Boolean

 

TRUE or FALSE depending on whether the assigned product field is required or not.

  Type

String

 

The type of pricing option.

  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.

 

Implement Google Universal Analytics in ConvertPlus and InLine Checkout (without GTM)

Overview 

You can implement Google Universal Analytics without the Google Tag Manager (GTM) to help you track and monitor your ConvertPlus and InLine checkout orders in order to improve the shopping experience and increase conversion rate.

   This documentation refers to Google Universal Analytics, which is a deprecated version that will be sunset starting July 1st 2023 for free Universal Analytics properties and starting July 1st 2024 for 360 Universal Analytics properties. We strongly recommend you to migrate to Google Analytics 4 as soon as possible.

Availability 

Google Universal Analytics can be set for all 2Checkout accounts.

Implement Google Universal Analytics in ConvertPlus and InLine Checkout

Follow these steps to implement Google Universal Analytics in ConvertPlus and InLine Checkout:

1. Navigate to your Google Universal Analytics account.

2. Copy your Google Universal Analytics Tracking ID and use it in your 2Checkout Merchant Control Panel to set up Google Universal Analytics for your ConvertPlus and InLine carts.

3. To get your Google Universal Analytics Tracking ID, go to Google Universal Analytics → Admin → Tracking Info → Tracking Code. Under Tracking ID you will find the code you need to copy and paste into your Merchant Control Panel.

google analytics without GTM.png

4. In your Google Universal Analytics account, make sure you have Enhanced Ecommerce enabled. To enable it, navigate to Admin → View Settings → Ecommerce settings. Make sure the Enable Ecommerce & Enable Enhanced Ecommerce Reporting settings are both ON.

google analytics without GTM_1.png

5. In your Google Universal Analytics account, make sure you exclude the 2Checkout domains from the referral list. Go to Admin → Admin → Property settings → Tracking info → Referral Exclusion List.

6. Add your website’s domain and the following 2Checkout domains: secure.2checkout.com and tracking.avangate.net.

google analytics without GTM_2.png

Cross-domain tracking settings

For cross-domain tracking between your website and the 2Checkout shopping cart, additional settings are needed. The Google Analytics JavaScript tracking code on your own website must be updated to include a linker to the 2Checkout domains: secure.2checkout.com and tracking.avangate.net. 

Below you have an example of the Google Universal Analytics tracking script for gtag.js. 2Checkout Google Universal Analytics tracking implementation is based on gtag.js.

The part highlighted in yellow represents the cross-domain tracking setting that needs to be added to the Google Universal Analytics script on your website. 

GA_MEASUREMENT_ID from the Google Universal Analytics script below is the Google Universal Analytics Tracking ID, which you can find under Google Universal Analytics → Admin → Tracking Info → Tracking Code section

<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gta...MEASUREMENT_ID"></script>
<script>
  window.dataLayer = window.dataLayer || [];
  function gtag(){dataLayer.push(arguments);}
  gtag('js', new Date());  
  gtag('config', 'GA_MEASUREMENT_ID', {
     'linker': {
            'domains': ['secure.2checkout.com', 'tracking.avangate.net']
        }
    });

</script>

Merchant Control Panel Settings

The Analytics section in your Merchant Control Panel allows you to integrate Google Universal Analytics in the ConvertPlus or InLine ordering engines and thus track the behavior of your shoppers on the 2Checkout pages.

Follow these steps to complete your analytics integration:

  1. Log into your Merchant Control Panel.
  2. Navigate to Setup → Ordering options.
  3. Click on the Analytics tab.
  4. Click on the ConvertPlus and InLine Checkout tab.

web analytics in Merchant Control Panel_5.png

5. In the Google Universal Analytics box, click on Set up. 

Google Universal Analytics without GTM - Set up

6. Fill in the Google Universal Analytics Tracking ID (Here is how you obtain itand click Save.

ConvertPlus & Inline Checkout Google Universal Analytics Tracking ID

7. Complete the integration by using the slider to activate Google Universal Analytics.

ConvertPlus & Inline Checkout Activate Google Universal Analytics

1. The 2Checkout data layer for Google Universal Analytics tracking is placed in an iFrame. This data layer contains eCommerce information built on the structure required by Google Universal Analytics reporting for the following events : checkout, purchase and remove from cart.

2. For fully enhanced eCommerce reporting in Google Universal Analytics, it is recommended that you send information to Google Universal Analytics from your website that includes product impression, product detail and add to cart. More information on enhanced eCommerce reporting can be found here: https://developers.google.com/analytics/devguides/collection/gtagjs/enhanced-ecommerce.

Pricing strategies for software, IoT and digital goods

With every industry going digital, it's clear that value has shifted from hardware to software and services. As new digital goods and services emerge - Internet of Things for example - digital marketers are facing an ever-changing set of monetization challenges aimed at building long-term, recurring revenue relationships.

Join featured guest speakers Amy Konary at IDC Research and Omkar Munipalle, Director, Cloud Strategy and Business.

Development at Gemalto (formerly SafeNet) in a 2Checkout thought-leading webinar that will explore:

  • The evolving role of software in a digital business
  • Understand new pricing & licensing models - subscriptions, consumption-based, outcome-based
  • Linking customer experience with software monetization
  • How to overcome constraints that prevent seamless digital commerce
Join Our Webinar

 

Search products

Overview

Use the searchProducts method to extract information about the subscription plan/products you configured for your account.

Pagination

Use pagination to decrease the request loading time, while better handling the returning responses.

Pagination works on all the search methods existing on 2Checkout API 5.0. The default pagination behavior is to display page 1 with 10 results. The maximum number of items displayed on a single page is 200.

To use pagination, include the Pagination object inside the search method call, using the parameters below:

Parameters Type/Description
Pagination Object
  Details below.
  Page Int
    Set the number of pages that should be returned.
  Limit Int
    Set a limit for the number of results that should be returned.

 

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.

SearchOptions

Object

 

Name

Optional (string)

 

Product name. Can be NULL.

 

Codes

Optional (StringArray)

 

Array of product codes.

 

Types

Optional (StringArray)

 

Array of the values representing the type of products. Possible values:

  • REGULAR
  • BUNDLE

Leave empty to have all product types returned to the search.

Can be NULL. If NULL, 2Checkout returns both regular and bundle products.

 

Enabled

Optional (boolean)

 

True or false. Can be NULL.

 

GroupName

Optional (string)

 

The name of the group that the product is associated with.

Can be NULL.

                                                          Pagination Object
 

                                                          Limit

Optional (integer)

 

Number of results (products) displayed per page. Default value is 10.

Can be NULL.

 

                                                          Page

Optional (integer)

 

A specific page of search results. Default value is 1.

Can be NULL.

 

OrderBy

Object

 

Defines the order of the returned results.

 

Field

Optional (string)

 

The name of the field to order the results by. Allowed values: 'ProductStatus', 'ProductName', 'ProductCode', 'UpdateDatetime', '2CheckoutId'. Can be NULL.

 

Direction

Optional (string)

 

Sort results ascending or descending. Allowed values:

  • asc
  • desc (default)

Can be NULL (defaults to desc).

 

Response

Parameter Type/Description

Product

Object

Request

<?php

require ('PATH_TO_AUTH');

$SearchOptions = new stdClass();
$SearchOptions->Name = '2Checkout Subscription'; //Product name
$SearchOptions->Types = array ('REGULAR', 'BUNDLE'); //product type (standalone), regular or bundle
$SearchOptions->Enabled = True;
//$SearchOptions->GroupName = '';
$SearchOptions->Pagination = new stdClass();
$SearchOptions->Pagination->Page = 1;
$SearchOptions->Pagination->Limit = 10;

try {
    $ProdSearch = $client->searchProducts($sessionID, $SearchOptions);
}

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

var_dump("Query", $ProdSearch);

?>

 

PriceOptionsGroupItem Object structure

Parameters

Parameter Type/Description
Description String
  Pricing options groups description.
Name String
  Pricing options groups name.
Type String
  Pricing options groups description type: Pricing options group type: COMBO, CHECKBOX, RADIO, INTERVAL.
Options Array of objects
  PriceOptionsGroupItemOptions object.
Required Boolean
  True or false, depending on whether at least one of the pricing options available is required or not.

 

Unassign order/product additional fields

Overview

Use the unassignAdditionalField method to update additional fields for your account.

Parameters

Parameters Type/Description

sessionID

Required (string)

 

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

FieldCode

Required (string)

 

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

ProductCode

Required (string)

 

The unique product code that you control not the system-generated product identifier.

Request

<?php

require ('PATH_TO_AUTH');

$productCode = 'YOUR_PRODUCT_CODE';
$fieldCode = 'YOUR_FIELD_CODE';

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

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

?>    

Response

bool(true)

Retrieve shopping cart contents

Overview

Use this method to get information on the products added to the shopping cart during the current cart session.

Requirements

Parameters

Parameter Type/Description
sessionID Required (String)
  Session identifier, which is the output of the Login method. An exception is thrown if the values are incorrect.

Response

Parameter Type/Description
Contents Object
  Cart contents object.

Request

<?php

require('PATH_TO_AUTH'); // Authentication example: https://knowledgecenter.avangate.com/Integration/Channel_Manager_API/SOAP/02Authentication
require('PATH_TO_setPartner'); // setPartner example: https://knowledgecenter.avangate.com/Integration/Channel_Manager_API/SOAP/06Reference/Partner/00Set_partner
require('PATH_TO_addProduct'); // addProduct example: https://knowledgecenter.avangate.com/Integration/Channel_Manager_API/SOAP/06Reference/08Place_an_order/00Add_product_to_cart

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

Errors

Error Description

EMPTY_CART

The shopping cart is empty.

 

Setting free trials

Overview

Offer free trials with payment details or paid trials to your shoppers.

Availability

This feature is available for 2Monetize accounts.

Requirements

Configure at least one subscription. 

Supported payment methods

Credit and debit cards, PayPal, and Direct Debit.

Workflow

  1. Set up the subscription plan.
  2. Generate the Trial Buy Link and serve it to shoppers.
  3. 2Checkout collects customer and payment details and:
    • Pre-authorizes the transaction for free trials. 
    • Authorizes transactions and collects funds for paid trials.
  4. 2Checkout automatically converts the trial to a paid subscription when the trial interval expires by charging shoppers based on the payment-on-file information. Customers can opt-out at any time using their myAccount. 

Generate a trial link

  1. Access the trial link generation options in the Checkout Links area, under Dashboard → Setup → Generate Links. Alternatively, you can navigate to this page through the View Edit product section of the 2Checkout Control Panel, select the product you want to generate the trial subscription for, go to the Information tab, and click on Get trial links.
  2. Click the Trial link radio button.

set free trial_1.png

3. Select the product for which you're creating the trial. 

set free trial_2.png

4. Choose the duration of the trial. Minimum 7 days. Default: 30 days. 

5. Configure the trial price. 0 by default, but you have the option of charging shoppers for the trials. To further modify pricing, you can use Additional pricing options. Input pricing options codes separated by commas. 2Checkout uses pricing options to calculate the costs of the automatic trial conversion.

set free trial_3.png

6. Scroll down to the bottom of the page and generate the link.

set free trial_4.png

7. Place the URL on call-to-actions on your store that offer access to trials. 

Customize the trial 

  1. Trial period - Minimum 7 days. 
  2. Trial price - 2Checkout uses the custom prices and ignores the per-product pricing configuration. 
  3. Additional pricing options - Input pricing options codes separated by a comma. 2Checkout calculates the costs of the trial conversion based on the pricing options.
  4. Advanced options - In the advanced options screen, you can specify the default language and billing currency for the checkout process.
    • Default language - AUTO preselected. Choose a specific language for the ordering interface.
    • Billing currency - AUTO preselected. Choose a specific currency for the ordering process. 
  5. Additional options
    • Scroll down to the Additional options area, to choose the Order template displayed to your shoppers.
    • Enter a specific link source for the sales, and have the separate link identifier (SRC) to track every sale point generator (e.g. homepage, product page, etc.)
    • Provided that you defined a coupon code for the product you're generating the trial subscription for, insert it in the coupon code field. The appropriate discount is deducted from the full product price (and displayed in the shopping cart and/or checkout page).

Disable recurring billing for a trial

  1. Navigate to Subscriptions management.
  2. Search for the trial subscription you wish to update and edit it.
  3. Click the Stop automatic billing button.

Re-enable recurring billing for a trial

Requirements

  • The 2Checkout system needs to have available payment-on-file data for subscribers.
  • To re-enable the auto-renewal (automatic billing) system, subscriptions must not be:
    • Lifetime, but instead have a recurring billing cycle defined.
    • Expired subscriptions with the expiration deadline in the past (before the moment when you attempt to re-enable recurring billing).
  1. Navigate to Subscriptions management.
  2. Search for the trial subscription you wish to update and click to edit it.
  3. Click the Enable automatic billing button.

Checkout flow for trials

  1. Shoppers land in the cart and see information such as Product/Subscription plan name, trial duration, total price, trial price. Payment details are also present in this form.

set free trial_5.png

set free trial_6.png

2. Shoppers also get information on the trial period and price after submitting their payment details, on the review order page. The message includes details such as the date when the trial subscription expires and the total amount that 2Checkout charges automatically for the trial conversion.

3. After placing the order, shoppers reach the Thank you page. 2Checkout also sends shoppers emails containing payment receipt confirmation as well as any download links and trial license keys. 5 days before the trial expiration date, the 2Checkout system sends an opt-out notification. If shoppers decide to cancel the trial, 2Checkout sends out a confirmation message of the cancelation. If shoppers do not cancel the trial, 2Checkout charges them automatically for the trial conversion.

Reporting

The Trial Conversion Rates report centralizes data on the number of trial customers converted into paying customers. The trial conversion rates are only available in scenarios in which payment details are mandatory for accessing trials.

FAQ

1. Can I set the trial price to zero?

Yes. 2Checkout displays a notification to shoppers selecting a card as a payment option, informing them that they will not be charged for the trial. As a standard practice, 2Checkout does pre-authorize cards & PayPal to ensure that the payment data provided by shoppers is valid. 

2. Free/paid trials with payment details Direct Debit

2Checkout also supports free/paid trials with payment details using Direct Debit.  Just as is the case for credit/debit cards and PayPal, when providing their payment details to access the trial, shoppers agree to the first and to subsequent recurring charges for renewals, if the product they're testing is a subscription.

Shoppers also have to provide valid banking information, including their name, bank sort code, and bank account number. 2Checkout checks the payment info and provides access to the trial only after successful validation (delivery only happens after the direct debit is confirmed).

3. Use CART and CARD parameters in the trial links

By default, shoppers need to go through the "Checkout page" purchase flow in order to access a trial for which they are supplying you with their payment details.

However, you can customize the ordering process using the CART and CARD parameters in the Buy link for your trials.

For example, use:

1. &CART=1&CARD=1

https://secure.2checkout.com/order/tr...df5c9cb9586c8b&CART=1&CARD=1

Using &CART=1&CARD=1 will let shoppers enter their payment information on the landing page, and then order the trial from the Review page.

2. &CART=1&CARD=2

https://secure.2checkout.com/order/tr...17e093da98477a&CART=1&CARD=2

Use &CART=1&CARD=2 to expedite the purchase flow as much as possible and let users provide all their details as well as order the trial on a single page, excluding the Review page completely.

4. How many keys does the shopper receive? 

One for the trial order, one for the full product order.

5. Will I be notified of trial orders through Electronic Delivery? 

Yes. You can also choose to send only one key and activate it for trial/ full functionality from your own system. Note: the product is delivered only once.

6. Is the recurring billing system enabled for trial subscriptions?

Trials renew automatically unless customers opt out. 

7. Is the shopper able to opt-out of the automatic renewal? 
Yes, at any time, via 2Checkout myAccount. You can also disable the trial.

8. When is the auto-charge notification sent to shoppers? 
Five (5) days prior to the trial expiration date.

9. When is the customer charged for the full product?

  • When the trial renewal interval is smaller or equal to six (6) months, the 2Checkout system attempts to charge customers three (3) hours prior to expiration.
  • When the trial renewal interval is larger than six (6) months, 2Checkout makes the first attempt to charge shoppers two (2) days prior to the trial expiration date. 2Checkout makes a subsequent attempt one day before the subscription/license is set to expire.

These periods are set to avoid customer dissatisfaction from service interruption due to expired cards, insufficient funds, etc.

10. What is the minimum trial period? 
Seven (7) days.

11. Are trial subscriptions impacted by pre-expiration billing attempts activated as part of Advanced Revenue Recovery Tools?

No, the only billing attempts applicable to trial subscriptions are the ones on the day of the renewal and after expiration.

Reporting

The Trial Conversion Rates report centralizes data on the number of trial customers converted into paying customers. The trial conversion rates are only available in scenarios in which payment details are mandatory for accessing trials.

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