WSDL
The Web Services Definition Language (WSDL) service description is available at: https://api.avangate.com/soap/4.0/?wsdl.
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.
ConvertPlus is a full-stack solution that enables you to increase conversion rates with faster loading time and optimized flows. Download this solution brief to learn more!
Availability
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:
-
Install the 2Checkout ConvertPlus Connector from this URL.
-
You will be prompted to log in to your Shopify account.
-
Once logged in your Shopify store, click on Payments.
-
On the next page, click on Choose alternative payment.
-
On the Alternative payment providers page, click on 2Checkout ConvertPlus (by Verifone).
-
On the next page, install the 2Checkout ConvertPlus (by Verifone) plugin by clicking on Install app.
- 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.
- 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.
- 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.
- Copy the Merchant Code in the API section and paste it in the corresponding field on your Shopify admin page.
-
Once you input your Merchant code and Secret word, click on Update settings.
-
Once your integration with Verifone is complete, click on Activate 2Checkout ConvertPlus (by Verifone) to start processing payments with us.
-
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!
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:
|
ApplyTo |
Sting |
|
|
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). |
Product
Overview
Use the Product object to create, update and retrieve subscription plans/products for your account. Use 2Checkout's API and control the following product attributes:
- Product information
- Pricing
- Subscription plan settings and renewal configuration
- Subscription plan recurring billing
- Fulfillment
- Shipping classes
- Localization
Parameters
Use the parameters below to add new products into your 2Checkout catalog.
Parameters | Type/Description | |
---|---|---|
Product
|
Object / Required Product details. |
|
ProductCode |
String / Required |
|
|
The product code that you can define for each of your offerings. Needs to be unique. |
|
ProductGroupCode | String/Required | |
The product code that you can define for each product group. Needs to be unique. |
||
TaxCategory | String/Required | |
The tax category to which the product belongs. | ||
ProductType |
String / Optional |
|
|
REGULAR or BUNDLE Defaults to REGULAR. |
|
ProductName |
String / Required |
|
|
The name of the product |
|
ProductVersion |
String / Optional |
|
|
The product version number |
|
PurchaseMultipleUnits | Boolean / Optional | |
Possible values:
The default value is TRUE. |
||
ShippingClass |
Object / Optional |
|
|
Existing shipping class object with the structure detailed below. |
|
|
Name |
String |
|
|
The name of the shipping class |
|
Amount |
Decimal |
|
|
The shipping costs |
|
Currency |
String |
|
|
The currency ISO code used for shipping costs - ISO 4217. |
|
ApplyTo |
String |
|
|
Possible values: • PRODUCT • ORDER |
|
Type |
Possible values: • FIXED • PERCENT |
GiftOption |
Boolean / Optional |
|
|
True or false depending on whether the product can be gifted or not. |
|
ShortDescription |
String / Optional |
|
|
The product's short description |
|
LongDescription |
String / Optional |
|
|
The product's long description |
|
SystemRequirements |
String / Optional |
|
|
System requirements |
|
ProductCategory |
String / Optional |
|
|
Product category |
|
Platforms |
Array of Platform objects / Optional |
|
|
Array of objects detailing the platforms supported by the application. Details below. |
|
|
PlatformName |
String |
|
|
The label of the platform per the product configuration. |
|
Category |
String |
|
|
Platform category per product configuration. |
ProductImages |
Array of Image objects / Optional |
|
|
Image object. Details below. Read-only. |
|
|
Default |
Boolean |
|
|
True or False depending on whether you set the image stored at the address in the URL parameter as default or not. |
|
URL |
String |
|
|
The location of the image on the 2Checkout system. |
TrialUrl |
String (anyURI) / Optional |
|
|
The URL from where shoppers can download trial software. |
|
TrialDescription |
String / Optional |
|
|
Descriptive text entered for trials. |
|
Enabled |
Boolean / Optional |
|
|
True/false depending on whether the products are active or disabled. When empty, 2Checkout marks the product as disabled. |
|
AdditionalFields |
Array of AdditionalFieldAssigned objects / Optional |
|
|
Array of existing additional fields assigned to products. Details below. |
|
|
Label |
String |
|
|
The name of the additional field assigned to a product. |
|
Code |
String |
|
|
The code of the additional field assigned to a product. |
|
Enabled |
Boolean |
|
|
True or false depending on whether the assigned product field is enabled or not. |
|
Required |
Boolean |
|
|
True or false depending on whether the assigned product field is required or not. |
|
URLParameter |
String |
|
|
The value of the system generated URL parameter for the product field that can be used in Buy Links. |
Translations |
Array of ProductTranslation objects / Optional |
|
|
Details below. |
|
|
LongDescription |
String |
|
|
The translated long description in the language corresponding to the Translation object. |
|
TrialUrl |
String |
|
|
The trial URL for users speaking the language corresponding to the Translation object. |
|
TrialDescription |
String |
|
|
|
|
SystemRequirements |
String |
|
|
Localized system requirements. |
|
Name |
String |
|
|
Localized product name. |
|
Description |
String |
|
|
Localized product short description. |
|
Language |
String |
|
|
ISO 639-1 two-letter code. |
PricingConfigurations |
Array of PricingConfiguration objects / Optional |
|
|
Details below. 2Checkout creates pricing configurations during the process when you add a product. |
|
|
Name |
String |
|
|
Pricing configuration name |
|
Code |
String |
|
|
System-generated identifier. |
|
Default |
boolean |
|
|
True for the default pricing configuration |
|
BillingCountries |
Array of strings |
|
|
ISO codes of the countries assigned to the pricing configuration. Empty unless specific countries are assigned to a pricing configuration. |
|
PricingSchema |
String |
|
|
DYNAMIC – With a base price FLAT – Without a base price |
|
PriceType |
String |
|
|
Possible values: NET / GROSS |
|
DefaultCurrency |
String |
|
|
The ISO code of the default currency for the pricing configuration |
|
Prices |
Object |
|
|
Details below. |
|
Regular |
Array of objects |
|
|
Details below. |
|
Amount |
Int |
|
|
The price of the product. |
|
Currency |
String |
|
|
ISO code of the currency for the product price. |
|
MinQuantity |
Int |
|
|
The minimum quantity of volume discounts. Default is 1. |
|
MaxQuantity |
Int |
|
|
The maximum quantity of volume discounts. Default is 99999. |
|
OptionCodes |
Array of objects |
|
|
Details below. |
|
Code |
String |
|
|
Price option identifier. |
|
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. |
|
Renewal |
Array of objects |
|
|
Details below. |
|
Amount |
Int |
|
|
The price of the product. |
|
Currency |
String |
|
|
ISO code of the currency for the product price. |
|
MinQuantity |
Int |
|
|
The minimum quantity of volume discounts. Default is 1. |
|
MaxQuantity |
Int |
|
|
The maximum quantity of volume discounts. Default is 99999. |
|
OptionCodes |
Array of PriceOptionCode objects |
|
|
Details below. |
|
Code |
String |
|
|
Price option identifier. |
|
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. |
|
PriceOptions |
Array of AssignedPriceOptionGroup objects |
|
|
Details below. |
|
Code |
String |
|
|
System generated pricing options group code (you can also configure it) that the 2Checkout system uses to calculate product prices for pricing configurations without a base price. |
|
Required |
Boolean |
|
|
True or False depending on whether you want to make it mandatory for shoppers to select the price option during the puyrchase process. |
BundleProducts |
Array of BundleProductCode objects / Optional |
|
|
Details below. |
|
|
ProductId |
String |
|
|
Unique, system-generated product ID. |
|
ProductCode |
String |
|
|
Editable product code that you control. |
Fulfillment |
String / Required |
|
|
BY_AVANGATE NO_DELIVERY – The 2Checkout system finalizes orders immediately after it receives payment confirmation. BY_VENDOR – you are responsible for delivering/fulfilling orders |
|
Prices |
Array of Price objects / Required |
|
|
Use this object only when Pricing Configurations are not available for your account. Details below. |
|
|
Amount |
Int |
|
|
The price of the product. |
|
Currency |
String |
|
|
ISO code of the currency for the product price. |
|
MinQuantity |
Int |
|
|
The minimum quantity of volume discounts. Default is 1. |
|
MaxQuantity |
Int |
|
|
The maximum quantity of volume discounts. Default is 99999. |
|
OptionCodes |
Array of objects |
|
|
Details below. |
|
Code |
String |
|
|
Price option identifier. |
|
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. |
GeneratesSubscription |
Boolean / Required |
|
|
TRUE or FALSE depending on whether you set the product to generate subscriptions or not.
NULL for bundles for which you set the following subscription management option: “Use the subscription settings of each product in the bundle” |
|
SubscriptionInformation |
ProductSubscriptionInformation Object / Optional |
|
|
Details below. NULL for bundles which you set to use the renewal settings of child products and not of the parent bundle. |
|
|
DeprecatedProducts |
Array |
|
|
Deprecated products. |
|
BundleRenewalManagement String |
|
|
|
Possible values:
Can be NULL. |
|
BillingCycle |
String |
|
|
The number of subscription billing cycle units (months or days). Possible values:
Days
Months
|
|
BillingCycleUnits |
String |
|
|
The units of the billing cycle:
D - days |
|
IsOneTimeFee |
Boolean |
|
|
True or False depending on whether the subscription is evergreen or not. |
|
ContractPeriod |
Object |
|
|
Details below. |
|
Period |
Int |
|
|
The contract period in months or days. -1 for unlimited contracts. |
|
PeriodUnits |
String |
|
|
The contract period units days | months |
|
IsUnlimited |
Boolean |
|
|
This flag is true if the contract is for an unlimited period |
|
Action |
String |
|
|
The action performed after the subscription expires. Possible values CANCEL | RESTART |
|
EmailsDuringContract Boolean |
|
|
|
True or False depending on whether you suppress renewal notification emails throughout the duration of the contract or not. |
|
UsageBilling |
Int |
|
|
The usage billing interval must be smaller than or equal to the grace period.
Interval of time within the grace period, when the 2Checkout system attempts to automatically charge customers for recurring costs and additional metered usage fees (in arrears). 2Checkout renews subscriptions only after subscribers make all outstanding payments per the renewal settings (from the expiration or the renewal date). If automatic renewal and usage charges fail, subscriptions can be manually renewed only by the end of the grace period, after which they expire.
Can be NULL. |
|
GracePeriod |
Object |
|
Type |
String |
|
|
CUSTOM – you configured grace period setting at product level. GLOBAL – global grace period settings apply. |
|
Period |
String |
|
|
Number of days set for the grace period. |
|
PeriodUnits |
String |
|
|
D - Days. |
|
IsUnlimited |
Boolean |
|
|
TRUE or FALSE depending on whether you set the grace period to unlimited or not. |
|
RenewalEmails |
Object |
|
|
Details below. Can be NULL. Available only in Product API 2.5 and later. |
|
Type |
String |
|
|
GLOBAL - Send emails according to the global renewal notification settings. CUSTOM – per product renewal notification settings |
|
Settings |
Object (can be NULL) |
|
|
Details below. |
|
ManualRenewal |
Object (can be NULL) |
|
|
Details below. |
|
Before30Days |
Boolean |
|
|
True or False. |
|
Before15Days |
Boolean |
|
|
True or False. |
|
Before7Days |
Boolean |
|
|
True or False. |
|
Before1Day |
Boolean |
|
|
True or False. |
|
OnExpirationDate |
Boolean |
|
|
True or False. |
|
After5Days |
Boolean |
|
|
True or False. |
|
After15Days |
Boolean |
|
|
True or False. |
|
AutomaticRenewal |
Object (can be NULL) |
|
|
Details below. |
|
Before30Days |
Boolean |
|
|
True or False. |
|
Before15Days |
Boolean |
|
|
True or False. |
|
Before7Days |
Boolean |
|
|
True or False. |
|
Before1Day |
Boolean |
|
|
True or False. |
|
OnExpirationDate |
Boolean |
|
|
True or False. |
|
After5Days |
Boolean |
|
|
True or False. |
|
After15Days |
Boolean |
|
|
True or False. |
FulfillmentInformation |
Object / Optional |
|
|
Details below. Can be NULL. Available only in Product API 2.5 and later. |
|
|
IsStartAfterFulfillment |
Boolean |
|
|
True or False. Depending on whether you want the subscription lifetime to start afther the completion of the fulfillment process or not. |
|
IsElectronicCode |
Boolean |
|
|
True or False. Depending on whether you configure the delivery of keys/codes for the product or not. |
|
IsDownloadLink |
Boolean |
|
|
True or False. Depending on whether you configure the delivery of a product file or not. |
|
IsBackupMedia |
Boolean |
|
|
True or False. Depending on whether you configure the delivery of backup media or not. |
|
IsDownloadInsuranceService |
Boolean |
|
|
True or False. Depending on whether you enable the Download Insurance Service or not, for a product for which you configure a product file. |
|
IsInstantDeliveryThankYouPage |
Boolean |
|
|
True or False. Depending on whether you enable instant delivery in the Thank You page or not. |
|
IsDisplayInPartnersCPanel |
Boolean |
|
|
True or False. Depending on whether you share access to the product file with your channel partners or not. |
ReturnMethod | Object | |
Information on the customer redirect method after a successful purchase. | ||
Type | String | |
Possible values:
|
||
URL | String | |
Website to which customers are redirected after a successful purchase. Example: "http://mySuccessURL.com" | ||
|
CodeList |
Object (can be NULL) |
|
|
Details below. |
|
Code |
String |
|
|
The unique code list identifier. |
|
Name |
String |
|
|
Name of the code list. |
|
Type |
String |
|
|
Code list type:
|
|
BackupMedia |
Object (can be NULL) |
|
|
Details below. |
|
Code |
String |
|
|
The unique backup media identifier. |
|
Name |
String |
|
|
Name of the backup CD/DVD. |
|
Type |
String |
|
|
Media type: CD |
|
ProductFile |
Object (can be NULL) |
|
|
Details below. |
|
Code |
String |
|
|
Unique product file identifier. |
|
Name |
String |
|
|
Display name. |
|
File |
String |
|
|
Name of the product file. |
|
Version |
String |
|
|
File version. |
|
Size |
String |
|
|
File size. |
|
Type |
String |
|
|
File type. |
|
LastUpdate |
String |
|
|
YYYY-MM-DD HH-MM-SS. Date time stamp when you last updated the file. |
|
AdditionalInformationByEmail |
String (can be NULL) |
|
|
The text you set up in the Additional fulfillment information - by email area. |
|
AdditionalInformationEmailTranslations |
Object (can be NULL) |
|
|
Array of localized Additional fulfillment information - by email texts. |
|
AdditionalThankYouPage |
String (can be NULL) |
|
|
The text you set up in the Additional fulfillment information - "Thank you" page area. |
|
AdditionalThankYouPageTranslations |
Array (can be NULL) |
|
|
Array of localized Additional fulfillment information - "Thank you" page texts. |