Skip to main content

Mandatory 2Checkout information in custom shopper emails

As a Merchant of Record (MoR), 2Checkout is legally responsible for complying with the scheme, acquirer, as well as local/regional consumer protection regulations, when it comes to communication distributed to shoppers through emails triggered by our platform.

Item Content can be customized Requirement
Email sender address Yes The email sender address can be personalized with the vendor’s name, while keeping the 2Checkout domain.
This will make it easy for the shopper to recognize where the email is coming from and ensure that if they reply, a ticket will be submitted to the 2Checkout Support team.
e.g., vendor@2checkout.com
Do not use subdomains e.g., vendor@subdomain.2checkout.com
Email sender name/alias Yes The sender must be 2Checkout or include the 2Checkout name e.g., [Vendor_name]/2Checkout
Header No Display the 2Checkout logo The vendor can add their logo, but not remove the 2Checkout logo. From a UX perspective, it is recommended that the two logos be displayed at the same height.
Email copy (text) Yes Clearly state the reason for sending the email  
Clear CTA button e.g., Complete your order, Retry payment, Renew subscription
Link to myAccount for transactional emails, such as payment receipt emails, automatic renewal reminders The shopper should be able to find an easy path to request a refund or cancel auto-renewal for an order they have placed or manage their subscription (in terms of its recurring status).
Support section No Section title 'Need help with your order?' (recommended by Shopper Support team)
2Checkout contact support information and disclaimer ‘If you have any questions or need assistance for topics related to order processing and returns, please contact our support team at support@2checkout.com.’
Footer No 2Checkout logo  
2Checkout MOR disclaimer ‘Your order is securely processed by our Merchant of Record and reseller, 2Checkout.’
2Checkout's name and address Verifone Payments BV dba 2Checkout
Mail address: P.O. Box 11334, 1001 GH Amsterdam
Singel 250, Amsterdam, Netherlands
+31 88 0000008

Avangate Inc dba 2Checkout
Mail address: 1170 Great Oaks Way no. 210, 30022 Alpharetta, Georgia, USA

Note: Depending on the processing route, 2Checkout can also act using the Avangate INC entity. For the platform default emails, the entity can be displayed dynamically from the back end. For emails customized by vendors without support from 2Checkout Professional Services, we recommend referencing both entities.
Terms & Conditions link https://www.2co.com/terms.html
Privacy Policy link https://www.2co.com/privacy.html
Unsubscribe link for lead management and manual renewal reminders Emails that are part of the service delivery (e.g., order confirmation emails, payment receipt emails, electronic delivery emails, shopper invoices, automatic renewal reminders, etc.) should not include the option to unsubscribe.

Example of a compliant follow-up email:

compliant follow-up email

Implement Facebook Pixel in ConvertPlus and Inline carts through Google Tag Manager

A. Create a tag for Facebook Pixel Page View Initialization

Create this tag if you don’t already have a Facebook Pixel tag on your website that fires on all pages where you have the Google Tag Manager code.

  1. Click to create a new tag.
  2. As Tag Type select Custom HTML. In the script below, under '{your-pixel-id-goes-here}' type your Facebook pixel. The script below is the Pixel Base Code and can be found in the Facebook/Meta Pixel documentation.

    <!-- Facebook Pixel Code -->
    <script>
      !function(f,b,e,v,n,t,s)
      {if(f.fbq)return;n=f.fbq=function(){n.callMethod?
      n.callMethod.apply(n,arguments):n.queue.push(arguments)};
      if(!f._fbq)f._fbq=n;n.push=n;n.loaded=!0;n.version='2.0';
      n.queue=[];t=b.createElement(e);t.async=!0;
      t.src=v;s=b.getElementsByTagName(e)[0];
      s.parentNode.insertBefore(t,s)}(window, document,'script',
      'https://connect.facebook.net/en_US/fbevents.js');
      fbq('init', '{your-pixel-id-goes-here}');
      fbq('track', 'PageView');
    </script>
  3. As Triggering select All Pages.
    All Pages

B. Create a User-defined variable in Google Tag manager called “ecommerce”

  1. Click on New, to create a new user-defined-variable.
    User-defined variable ecommerce”
  2. As Variable Type, select Data Layer Variable.
  3. As Data Layer Variable Name, add ecommerce in the field.
  4. As Data Layer Version select Version 2.
    Data Layer Variable ecommerce

C. Create a User-defined variable in Google Tag Manager for Facebook called ConvertPlus - FacebookEventsScript

  1. Click on New to create a new user-defined-variable.
    a new user-defined-variable
  2. As Variable Type select Custom JavaScript.
  3. In the Custom JavaScript section paste the below code.

    function(){
      var attr = {};
      attr.currency = "USD";
      attr.content_type = "product";
      var fbContents,fbIds,fbNames,i;
    //function fbData
    var fbData = function() {
    fbContents = [];
        fbIds = [];
        fbNames = [];
        attr.num_items = {{ecommerce}}.items.length;
        for(i=0;i<{{ecommerce}}.items.length;i++){
          fbContents.push({
           'id':{{ecommerce}}.items[i].item_id,
           'name':{{ecommerce}}.items[i].item_name,
           'quantity':{{ecommerce}}.items[i].quantity
          });
         	fbIds.push({{ecommerce}}.items[i].item_id);
          fbNames.push({{ecommerce}}.items[i].item_name);
       	 }
        attr.contents = fbContents;
        attr.content_ids = fbIds;
        attr.content_name = fbNames;
    	};
      if({{Event}} === 'begin_checkout'){         
        attr.value = {{ecommerce}}.actionField.checkout_valueUSD; 
        fbData();   
      }
      if({{Event}} === 'purchase'){
       attr.value = {{ecommerce}}.actionField.valueUSD; 
        fbData();
      }
      return attr;
    }

D. Create a trigger specifically for the purchase event

Create a new trigger which is restricted only to the purchase event and name it Event Ecommerce Purchase Only.

  1. As Trigger Type, select Custom Event.
  2. As Event name, type purchase.
  3. For this trigger to fire on, select All Custom Events.
    Event Ecommerce Purchase Only

E. Create a tag for the Facebook Pixel for the purchase event

  1. Create a new tag named for example Facebook Purchase ConvertPlus.
  2. As Tag Type select Custom HTML.
  3. In the HTML section, paste the following code:

    <script>
     fbq('track', 'Purchase', {{ConvertPlus - FacebookEventsScript}},{eventID:
    {{ecommerce}}.transaction_id});
    </script>
    
  4. For Triggering, select the Trigger for Event Ecommerce Purchase only, the trigger that is only restricted to the purchase event.
    Event Ecommerce Purchase Only

Optional! – send information with the Facebook Pixel at checkout if needed

Create a trigger specifically for the checkout event

Create a new trigger which is restricted only to the purchase event and name it Event Ecommerce Checkout Only.

  1. As Trigger Type, select Custom Event.
  2. As Event name, type begin_checkout.
  3. For this trigger to fire on, select All Custom Events.
    Event Ecommerce Checkout Only

Create a tag for the Facebook Pixel for the checkout event

  1. Create a new tag named for example Facebook Checkout ConvertPlus.
  2. As Tag Type select Custom HTML.
  3. In the HTML section, paste the following code:

    <script>
      fbq('track', 'InitiateCheckout', {{ConvertPlus - FacebookEventsScript}});
    </script>
    
  4. For Triggering, select the Trigger for Event Ecommerce Checkout only, the trigger that is only restricted to the checkout event.
    Facebook Checkout ConvertPlus

Implement Facebook Pixel in Default Carts through Google Tag Manager

A. Create a tag for Facebook Pixel Page View Initialization

Create this tag if you don’t already have a Facebook Pixel tag on your website that fires on all pages where you have the Google Tag Manager code.

  1. Click to create a new tag.
  2. As Tag Type select Custom HTML. In the script below, under '{your-pixel-id-goes-here}' type your Facebook pixel ID. The script below is the Pixel Base Code and can be found in the Facebook/Meta Pixel documentation.

    <!-- Facebook Pixel Code --> 
    <script> 
      !function(f,b,e,v,n,t,s) 
      {if(f.fbq)return;n=f.fbq=function(){n.callMethod? 
      n.callMethod.apply(n,arguments):n.queue.push(arguments)}; 
      if(!f._fbq)f._fbq=n;n.push=n;n.loaded=!0;n.version='2.0'; 
      n.queue=[];t=b.createElement(e);t.async=!0; 
      t.src=v;s=b.getElementsByTagName(e)[0]; 
      s.parentNode.insertBefore(t,s)}(window, document,'script', 
      'https://connect.facebook.net/en_US/fbevents.js'); 
      fbq('init', '{your-pixel-id-goes-here}'); 
      fbq('track', 'PageView'); 
    </script> 
  3. As Triggering select All Pages.
    All Pages

B. Configure dataLayer variables in Google Tag Manager

Configure dataLayer variables in Google Tag Manager to further use them in the Facebook implementation.

2checkout shopping carts contain a dataLayer with eCommerce information on the Google Analytics 4 structure. You can view this by typing dataLayer into the browser console and under gtag4, you can see the eCommerce information on Google Analytics 4 structure both at checkout and at purchase on the order Finish page.

dataLayer variables

  1. Configurate variables in Google Tag Manager
    To capture the eCommerce information from the dataLayer, you will first need to configurate certain data layer variables in Google Tag Manager. You can then use those variables in the script for the Facebook Pixel tracking.
    1. Create a variable called gtag4.event in Google Tag Manager
      Click to create a new User-Defined Variable in Google Tag Manager. Name you variable “gtag4.event” to keep track of it easier.
      User-Defined Variable
      As Variable Type select Data Layer Variable from the options provided by Google.
      Under Data Layer Variable Name type gtag4.event.
      Under Data Layer Version select Version 2.
      variable configuration
    2. Create a variable called gtag4.currency in Google Tag Manager
      Click to create a new User-Defined Variable in Google Tag Manager. Name your variable “gtag4.currency” to keep track of it easier.
      As Variable Type select Data Layer Variable from the options provided by Google.
      Under Data Layer Variable Name type gtag4.currency.
      Under Data Layer Version select Version 2.
      variable gtag4.currency
    3. Create a variable called gtag4.items in Google Tag Manager
      Click to create a new User-Defined Variable in Google Tag Manager. Name your variable “gtag4.items” to keep track of it easier.
      As Variable Type select Data Layer Variable from the options provided by Google.
      Under Data Layer Variable Name type gtag4.items.
      Under Data Layer Version select Version 2.
      variable gtag4.items
    4. Create a variable called gtag4.tax in Google Tag Manager
      Click to create a new User-Defined Variable in Google Tag Manager. Name your variable “gtag4.tax” to keep track of it easier.
      As Variable Type select Data Layer Variable from the options provided by Google.
      Under Data Layer Variable Name type gtag4.tax.
      Under Data Layer Version select Version 2.
      variable gtag4.tax
    5. Create a variable called gtag4.transaction_id in Google Tag Manager
      Click to create a new User-Defined Variable in Google Tag Manager. Name your variable “gtag4.transaction_id” to keep track of it easier.
      As Variable Type select Data Layer Variable from the options provided by Google.
      Under Data Layer Variable Name type gtag4.transaction_id.
      Under Data Layer Version select Version 2.
      variable gtag4.transaction_id
    6. Create a variable called gtag4.value in Google Tag Manager to capture the total value of the order, including tax
      Click to create a new User-Defined Variable in Google Tag Manager. Name your variable “gtag4.value” to keep track of it easier.
      As Variable Type select Data Layer Variable from the options provided by Google.
      Under Data Layer Variable Name type gtag4.value.
      Under Data Layer Version select Version 2.
      variable gtag4.value

C. Create a User-defined variable in Google Tag Manager for Facebook called FacebookEventsScript

  1. Click on New to create a new user-defined-variable.
    FacebookEventsScript
  2. As Variable Type select Custom JavaScript.
  3. In the Custom JavaScript section paste the below code. This code will capture product, transaction id and transaction value data, using the dataLayer variables previously created.

    function(){
      var attr = {};
      attr.currency = {{gtag4.currency}};
      attr.content_type = "product";
      var fbContents = [];
      var fbIds = [];
      var fbNames = [];
    //function fbData
    var fbData = function() {
        attr.num_items = {{gtag4.items}}.length;
        for(var i=0;i<{{gtag4.items}}.length;i++){
          fbContents.push({
           'id':{{gtag4.items}}[i].item_id,
           'name':{{gtag4.items}}[i].item_name,
           'quantity':{{gtag4.items}}[i].quantity
          });
         	fbIds.push({{gtag4.items}}[i].item_id);
          fbNames.push({{gtag4.items}}[i].item_name);
       	 }
        attr.contents = fbContents;
        attr.content_ids = fbIds;
        attr.content_name = fbNames;
    	};
    if ({{gtag4.event}} === 'begin_checkout' && window.omniture_vars && window.omniture_vars.CART_PRODUCTS){
    	var checkoutValue=0;
    	var checkoutCartProducts = omniture_vars.CART_PRODUCTS;
    	for (var i=0; i<checkoutCartProducts.length;i++){
    	checkoutValue += Number(checkoutCartProducts[i].ProductTotalPriceWithTaxAndDiscount * checkoutCartProducts[i].ProductQuantity); 
    	}
        checkoutValue = parseFloat(checkoutValue.toFixed(2))
        attr.value=checkoutValue;
    	fbData();
    }
      if({{gtag4.event}} === 'purchase'){
       attr.value = {{gtag4.value}}; 
        fbData();
      }
      return attr;
    }

D. Create a trigger specifically for the purchase event

Create a new trigger which is restricted only to the purchase event and name it Purchase Event Only.

  1. As Trigger Type, select Custom Event.
  2. As Event name, type 2checkout event.
  3. For this trigger fires on, select Some Custom Events.
  4. Add the condition that variable gtag4.event equals purchase.
    Purchase event only

E. Create a tag for the Facebook Pixel for the purchase event

  1. Create a new tag, named, for example Facebook Purchase.
  2. As Tag Type select Custom HTML.
  3. In the HTML section, paste the following code (this code will send product, transaction id and transaction value data to Meta when a purchase takes place).

    <script>
      fbq('track', 'Purchase', {{FacebookEventsScript}}, {eventID: {{gtag4.transaction_id}}});
    </script>
  4. For Triggering, select the Trigger for Event Ecommerce Purchase only, the trigger that is only restricted to the purchase event.
    Create a tag for the Facebook Pixel for the purchase event

Optional! – send information with the Facebook Pixel at checkout if needed

Create a trigger specifically for the checkout event

Create a new trigger which is restricted only to the checkout event and name it Checkout Event Only.

  1. As Trigger Type, select Custom Event.
  2. As Event name, type 2checkout event.
  3. For this trigger to fire on, select Some Custom Events.
  4. Add the condition that variable gtag4.event equals checkout.
    Checkout Event Only.

Create a tag for the Facebook Pixel for the checkout event

  1. Create a new tag, named, for example Facebook Checkout.
  2. As Tag Type select Custom HTML.
  3. In the HTML section, paste the following code:

    <script>
      fbq('track', 'InitiateCheckout', {{FacebookEventsScript}});
    </script>
    
  4. For Triggering, select the Trigger for Event Ecommerce Checkout only, the trigger that is only restricted to the checkout event.
    Facebook Checkout.
 
The tags for Facebook Pixel need to be based on consent. You should further adjust the tags described above to condition them based on your way of collecting consent.

Subscription churn prevention campaigns

Overview

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

Parameters Type/Description
AvailableCancellationReasons Object with dynamic properties (as reasons number can change in time)
  REASON_CODE_1 Required (string)
  REASON_CODE_3 Required (string)
  REASON_CODE_5 Required (string)
  REASON_CODE_6 Required (string)
  REASON_CODE_7 Required (string)
  REASON_CODE_9 Required (string)
Campaigns Array of objects
  Code String
    Unique, system-generated campaign identifier.
  Name String
    Name of the campaign.
  DefaultMessage String
    Default message of the campaign displayed to shoppers.
  CancellationReasonRequired Boolean
    Used to decide if you want to collect feedback from customers.
  OfferPause Boolean
    Used to decide if you want to allow shoppers to pause subscription.
  OfferDiscount Object
    Message String
      Discount message.
    Discount String
      Discount value in decimal number.
    BillingCycles String
      Billing cycles number.

Subscription churn prevention campaigns

Overview

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

Parameters Type/Description
AvailableCancellationReasons Object with dynamic properties (as reasons number can change in time)
  REASON_CODE_1 Required (string)
  REASON_CODE_3 Required (string)
  REASON_CODE_5 Required (string)
  REASON_CODE_6 Required (string)
  REASON_CODE_7 Required (string)
  REASON_CODE_9 Required (string)
Campaigns Array of objects
  Code String
    Unique, system-generated campaign identifier.
  Name String
    Name of the campaign.
  DefaultMessage String
    Default message of the campaign displayed to shoppers.
  CancellationReasonRequired Boolean
    Used to decide if you want to allow shoppers to pause subscription.
  OfferDiscount Object
    Message String
      Discount message.
    Discount String
      Discount value in decimal number.
    BillingCycles String
      Billing cycles number.

Enter campaign

Overview

Use the enterChurnCampaign method to confirm the campaign you want for the churn campaign process.

Parameters

Parameters Type/Description
sessionID Required (string)
  Session identifier, the output of the Login method. Include sessionID into all your requests. 2Checkout throws an exception if the values are incorrect. The sessionID expires in 10 minutes.
SubscriptionReference Required (string)
  Unique, system-generated subscription identifier.
CampaignCode Required (string)
  The code of the campaign you want to confirm.

Response

Parameters Type/Description
Boolean true or false depending on whether the changes were successful or not.

Request

<?php

require('PATH_TO_AUTH');

$subscriptionReference = '351D8F557E';
$campaignCode          = 'UGPPKKJY5L1LHBFPHKQ3';

$jsonRpcRequest = [
    'method' => 'enterChurnCampaign',
    'params' => [$sessionID, $subscriptionReference, $campaignCode],
    'id' => $i++,
    'jsonrpc' => '2.0'
];

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

Accept campaign discount

Overview

Use the acceptChurnCampaignDiscount method to confirm the campaign you want for the churn campaign process.

Parameters

Parameters Type/Description
sessionID Required (string)
  Session identifier, the output of the Login method. Include sessionID into all your requests. 2Checkout throws an exception if the values are incorrect. The sessionID expires in 10 minutes.
SubscriptionReference Required (string)
  Unique, system-generated subscription identifier.
CampaignCode Required (string)
  The code of the campaign you want to confirm.

Response

Parameters Type/Description
Boolean true or false depending on whether the changes were successful or not.

Request

<?php

require('PATH_TO_AUTH');

$subscriptionReference = '351D8F557E';
$campaignCode          = 'UGPPKKJY5L1LHBFPHKQ3';

$jsonRpcRequest = [
    'method' => 'acceptChurnCampaignDiscount',
    'params' => [$sessionID, $subscriptionReference, $campaignCode],
    'id' => $i++,
    'jsonrpc' => '2.0'
];

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

Retrieve eligible campaigns

Overview

Use the getEligibleChurnCampaigns method to retrieve all the eligible campaigns for a specific subscription with data in a specific language.

Parameters

Parameters Type/Description
sessionID Required (string)
  Session identifier, the output of the Login method. Include sessionID into all your requests. 2Checkout throws an exception if the values are incorrect. The sessionID expires in 10 minutes.
SubscriptionReference Required (string)
  Unique, system-generated subscription identifier.
Language Required (string)
  The language abbreviation in which messages are translated.

Response

Parameters Type/Description
SubscriptionChurnPreventionCampaigns Object

Request

<?php
require('PATH_TO_AUTH');
$subscriptionReference = '351D8F557E';
$languageCode          = 'en';
$jsonRpcRequest = [
    'method' => 'getEligibleChurnCampaigns',
    'params' => [$sessionID, $subscriptionReference, $languageCode],
    'id' => $i++,
    'jsonrpc' => '2.0'
];
var_dump(callRPC((object)$jsonRpcRequest, $host, true));

Enter campaign

Overview

Use the enterCampaign method to mark the auto renewal cancellation intent.

Parameters

Parameters Type/Description
sessionID Required (string)
  Session identifier, the output of the Login method. Include sessionID into all your requests. 2Checkout throws an exception if the values are incorrect. The sessionID expires in 10 minutes.
SubscriptionReference Required (string)
  Unique, system-generated subscription identifier.
CampaignCode Required (string)
  The code of the campaign you want to confirm.

Response

Parameters Type/Description
Boolean true or false depending on whether the changes were successful or not.

Request

<?php
 
require('PATH_TO_AUTH');
 
$subscriptionReference = 'F27CFE06ED';
$campaignCode = 'UGPPKKJY5L1LHBFPHKQ3';
 
try {
    $result = $client->enterCampaign($sessionID, $subscriptionReference, $campaignCode);
}
catch (SoapFault $e) {
    echo "result: " . $e->getMessage();
    exit;
}
var_dump("result", $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