Skip to main content

API 5.0

Before you start using the 2Checkout API, check your PCI DSS compliance status. Find out more details about what PCI compliance means and what you should do to be PCI compliant here

 

Grow retention, first steps

2Checkout offers a powerful collection of tools created to reduce your churn rate. Follow the path we set up for you to gain insight into our retention best practices, and start using the tools at your disposal. 

 

 

Integrate Shopify with 2CO ConvertPlus (by Verifone)

Overview

Integrate Shopify with the ConvertPlus ordering engine to be able to process payments through the 2Checkout platform in over 200 countries and more than 100 currencies.

This integration helps you provide a localized checkout experience and multiple payment methods, and it's optimized to convert more visitors into customers.

Availability

   Before you are able to start accepting payments for your Shopify store, you need to request and finalize the activation of your live account by completing a form, and provide information that will help us verify the business and identity of the individuals involved in your business.

Shopify integration is available only for 2Checkout accounts that handle their own tax and invoice management (2Sell and 2Subscribe). 

If you already linked your 2Checkout account to your Shopify store using our legacy connector, you can switch to the new integration to benefit from the new ConvertPlus experience.

How to integrate Shopify with 2Checkout ConvertPlus (by Verifone)

Follow these steps to complete integration with Shopify:

  1. Install the 2Checkout ConvertPlus Connector from this URL.

    1

  2. You will be prompted to log in to your Shopify account.

    2

  3. Once logged in your Shopify store, click on Payments.

    new shopify connector 7

  4. On the next page, click on Choose alternative payment.

    new shopify connector 8

  5. On the Alternative payment providers page, click on 2Checkout ConvertPlus (by Verifone).

    new shopify connector 9

  6. On the next page, install the 2Checkout ConvertPlus (by Verifone) plugin by clicking on Install app.

    new shopify connector 3

  7. In the next window, input your Merchant Code and your Secret Word. You can find these details by logging in to your 2Checkout Merchant Control Panel account and navigating to Integrations → Webhooks & API.
    • Copy the Merchant Code in the API section and paste it in the corresponding field on your Shopify admin page.
      new shopify connector 5
    • Go back to the 2Checkout Merchant Control Panel and scroll down to the Secret Word section. Check if the INS secret word and the buy-link secret word match. If they don't match, edit them to match each other.
      new shopify connector 6
    • Copy the buy-link secret word and paste it in the Secret Word field back in the Shopify admin page.
    • Activate the Redirect URL by checking the Enable return after sale checkbox in the Redirect URL section. Then click Update to save your changes.

         The  Approved URL  field should remain blank.

      update

  8. Once you input your Merchant code and Secret word, click on Update settings.

    new shopify connector 4

  9. Once your integration with Verifone is complete, click on Activate 2Checkout ConvertPlus (by Verifone) to start processing payments with us.

    new shopify connector 10

  10. Before activating the plugin, you can check the Enable test mode box for test transactions or leave unchecked for live transactions.

       While in test mode, visitors coming to your website will not be able to place real orders, so do not forget to switch off this feature after doing a test in order to start accepting payments.

That's it! The 2Checkout Convert plus integration is enabled on your Shopify store. Go to your store to see it in action!

   1. To avoid potential delays with account activation, ensure that you have created your store in Shopify and that your store is visible so that the required reviews can take place. Please refer to Shopify’s manual here for instructions detailing their system’s operation. Shopify support can also be contacted here.
2. If any changes are made to your domain (to a custom Shopify domain/other), e-mail us the new URL at supportplus@2checkout.com in order to update your 2Checkout account, and thus avoid a communication mismatch. Currently, when you are using a third-party cart and want to have multiple URLs, you need to create a new account for each new URL.

About Shopify

Shopify is the Internet’s most elegant, simple, and affordable commerce platform aimed at providing businesses with easy to use e-commerce solutions, taking the challenge out of setting up and managing e-commerce storefronts. Shopify’s scalable and flexible full-featured platform enables any size business to efficiently launch and operate an online or in-store retail presence with ease.

Integrations with major shipping companies make shipping easier, while fulfillment services let Shopify store owners take the hassle out of inventory management and logistics. Shopify has an App Store (http://apps.shopify.com) which hosts a variety of apps to fill every need, ranging from accountancy services to shipping label printers, analytics to social media integration tools. The Theme Store (http://themes.shopify.com) features over 100 premium and free eCommerce templates.

In addition to powering your eCommerce website, Shopify also includes free, built-in mobile commerce shopping cart features so your customers can browse and buy from your store using their mobile phone. Shopify also includes a Mobile App so you can view all vital information about your shop from your iOS device, like checking your sales statistics, or viewing products, orders, and customer data.

To sign-up and receive 10% off, visit www.shopify.com.

F.A.Q.

1. How can I find out what type of account I have on the 2Checkout platform?

Read this article to find out information on how to find out the type of 2Checkout account you have.

Subscription

Overview

Use this section to handle the management of your subscriptions.

You can enable or disable your existing subscription, or choose to assign them to different customer entities.

Subscriptions can be retrieved starting with 5 minutes after their orders are generated in the 2Checkout system.

 

Authentication

Overview

Use the login method for the authentication process in the 2Checkout system.

Parameters

Parameters Type/Description
merchantCode required (string)
  Your merchant identifier (received from 2Checkout).
date required (string)
  UTC ISO Date format (e.g. 2010-01-01 12:13:14)
hash required (string)
  Calculated HMAC_SHA256 signature based on MerchantCode and Date, using your secret key (see example below).

Response

Parameter Type/Description
sessionID string
  Session identifier string. An exception will be thrown if the values are incorrect. The sessionID expires in 10 minutes.

Request

To create the HMAC_SHA256 source string use your merchant code (available here) and the date of the request, prefixing them with the length in bytes of each respective value, along with your account’s secret key (for UTF-8 characters the length in bytes might be longer than the string length). For example:

Parameters Type/Description
merchantCode Avangate
 

8AVANGATE

 

date 2010-05-13 12:12:12
 

192010-05-13 12:12:12

 

HMAC source string

8AVANGATE192010-05-13 12:12:12

 

   
Secret key SECRET_KEY
   
Calculated HMAC_SHA256 signature based on MerchantCode and Date, using your secret key:
bf763db7d333e9c3038698cf59ada3e6

Request Example 

<?php

$host = "https://api.avangate.com/channel-manager";

$merchantCode = "YOUR_MERCHANT_CODE";// your account's merchant code available in the 'System settings' area of the Control Panel: https://secure.2checkout.com/cpanel/account_settings.php
$key = "YOUR_SECRET_KEY";// your account's secret key available in the 'System settings' area of the Control Panel: https://secure.2checkout.com/cpanel/account_settings.php
$algo = "sha256";
$now = date('Y-m-d H:i:s'); //date_default_timezone_set('UTC')

$string = strlen($merchantCode) . $merchantCode . strlen($now) . $now;
$hash = hash_hmac($algo, $string, $key);

try {
    $client = new SoapClient($host . "/2.1/soap/?wsdl", [
        'location'       => $host . "/2.1/soap/",
        "stream_context" => stream_context_create([
            'ssl' => [
                'verify_peer'      => false,
                'verify_peer_name' => false
            ]
        ])
    ]);
    $sessionID = $client->login($merchantCode, $now, $hash, $algo);
    echo("Token: {$sessionID}" . PHP_EOL);
} catch (SoapFault $e) {
    echo("Error: {$e->getMessage()}" . PHP_EOL);
}

?>

Errors

Error Description
AUTHENTICATION_FAILED Authentication failed
FORBIDDEN Forbidden area

 

Product SKU

Overview

Stock keeping unit or SKU is a number assigned to a particular product by a digital or physical retail store for easy identification and inventory tracking purposes. The SKU number is a string of alphanumeric characters that uniquely identify details such as price, product options, and manufacturer of a particular product or service. SKUs are used in order notifications, electronic delivery, export files, etc.

SKU Management

For companies that manage large product catalogs with defined SKUs and that make regular changes to their prices and products (new versions, new options), the manual process performed in the Merchant Control Panel needs to be supported by an automatic solution as well. By using an automated flow, merchants decrease the time needed for this process, and also reduce the risk of human errors associated with the manual process.

In the 2Checkout platform, SKUs can be associated with a unique combination made up of:

  • Product identification element
  • Pricing configuration
  • Plus minimum one of the following:
    • Currency – defined as applicable to all currencies or only to specific ones
    • Volume Discounts – defined as specific quantity or intervals (applicable only according to the volume discounts that are defined at pricing configuration level)
    • Purchase Types – possible values: new purchase, renewal, upgrade, and trial
    • Pricing Options – will be available considering the pricing option groups assigned to the selected pricing configuration

 

 

Shipping price

Overview

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

Retrieve shipping price

Shipping price object

Parameters Type/Description
Shipping prices available

Array of objects

Details below

  Name   String
      Name of the shipping method available for the cart configuration.
  Code   String
      System-generated identified assigned to the shipping method.
  TrackingURL String
      Tracking URL defined at shipping method leve.
  Currency   String
      Currency in which shipping prices are expressed.
  PriceDetails Object
          Details below.
           Net   Object
      Shipping price for a NET price configuration.
    TotalAmount Int
      Total shipping price charged from customers for a cart configuration.
    BasePrice Int
      Shipping method base price amount.
    OverweightAmount Int
      Overweight amount applied to the purchase.
    CountrySurcharge Int
      Surcharge applied based on customer delivery country.
    WeightSurcharge Int
      Surcharged applied based on total order weight.
    OrderSurcharge Int
      Surcharged applied based on total order amount.
           Gross   Object
      Shipping price for a GROSS price configuration.
    TotalAmount Int
      Total shipping price charged from customers for a cart configuration.
    BasePrice Int
      Shipping method base price amount.
    OverweightAmount Int
      Overweight amount applied to the purchase.
    CountrySurcharge Int
      Surcharge applied based on customer delivery country.
    WeightSurcharge Int
      Surcharged applied based on total order weight.
    OrderSurcharge Int
      Surcharged applied based on total order amount.

 

Order field

Overview

Use this object to retrieve information about 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.

 

Translation Object

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

 

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