Skip to main content

Start using the 2Checkout API

Overview

Use the 2Checkout API to:

  • Build apps that connect to the 2Checkout system
  • Place and manage orders
  • Manage subscriptions and customers
  • Create, update and extract product catalog and pricing information for your account
  • Manage partner accounts
  • Integrate with 2Checkout to automate your backend operations

 

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

Connecting to the 2Checkout API

To connect to the API, you need your merchant code, secret key, and secret word. These unique codes are automatically generated for your account, and you can retrieve them from your Control Panel Dashboard → Integrations → Webhooks and API. Copy the merchant code (found in the API section) and the Instant Notification Service (INS) secret word found in the Secret word area.

secret word.png

Architecture overview

For more details on how the 2Checkout API works, here is an overview based on the architecture used:

API Authentication

Use the merchant code and secret key to authenticate with the API. Click the links below to learn how to authenticate:

Read the API documentation

Once you've authenticated with the API, you can start configuring your environment for your specific usage scenario.

Our API documentation should help you get things done as fast as possible.

3rd party applications

You can build apps that connect to the 2Checkout system to expand existing functionalities and gain more insight into your activity while optimizing your sales. Read the documentation for detailed guidance on how to build your own apps:

2Checkout GitHub

Feel free to visit our GitHub repository to download and contribute to our code samples. We also encourage you to submit your own projects related to the 2Checkout API.

Webhooks

  • Instant Payment Notification (IPN) works as a message service generating automatic order/transaction notifications for your 2Checkout account. Use the notifications to process order data into your own management systems by synchronizing it with 2Checkout account events.
  • License Change Notification (LCN) works as a message service generating automatic subscription notifications for your 2Checkout account.

Refunds

Overview

Reimburse customers by issuing Total or Partial refunds for Completed/Finished orders. Control the amount that gets returned to your shoppers, by opting to pay back the full costs associated with an order (including taxes), or just a part of the sum paid ( including taxes).

Availability

You can request total and partial refunds for a period of up to three months since the order was finished and the product delivered to the customer. The Request refund button for Finished/Complete orders is removed for orders older than three months. Refunding is still possible for up to one year after the order was finished and/or delivered. However, for orders between three and twelve months old, you need to contact 2Checkout to issue a refund.

Refund requests placed for orders that have an open chargeback are only processed after the chargeback is closed.

Total refunds

Refund the full transaction amount of an order, including but not limited to the product price and taxes (calculated automatically by 2Checkout), as well as Backup Media and DIS (Download Insurance Service) costs.

Follow the steps below to initiate a total refund:

  1. Go to Orders & customers -> Order search.
  2. Select the eStore orders tab.
  3. Use the filters to search for the order that you want to reimburse.
  4. Click the order reference number.
  5. Click Request refund.
  6. Choose the Total refund type.
  7. Fill in the details of the reimbursement, including whether or not to re-use keys or disable subscriptions.
  8. Fill in the cancelation reason box.
  9. Click Request refund.

Partial refunds

Reimburse only part of the transaction amount paid for Completed/Finished orders, with the system automatically calculating the repayment taxes.

Follow the steps below to initiate a partial refund:

  1. Go to Orders & customers -> Order search.
  2. Select the eStore orders tab.
  3. Use the filters to search for the order that you want to reimburse.
  4. Click the order reference number.
  5. Click Request refund.
  6. Choose the Partial refund type.
  7. Fill in the details of the reimbursement, including whether or not to re-use keys or disable subscriptions.
  8. Fill in the cancellation reason box.
  9. Click Request refund.

The sum you set to be refunded is the final sum the customer will receive, including taxes.

Product file availability

Product files assigned to active subscriptions are still available for shoppers to download even after placing a partial refund. To cut shopper access to product files, disable the assigned subscription.

If the total amount of the partial refunds is equal to the total order value, shoppers do not have access to the product file anymore.

 

Subscription active

Subscription disabled

Partial refund

Product file available

Product file not available

Total refund

Product file not available

Product file not available

Adding custom refund reasons

You can define your own refund reasons, to tailor the refund process to your own business needs, and gain more control over what you offer to your shoppers. The reason codes created will be included in the refunds reports, increasing their accuracy, and helping you take better business decisions.

Important: adding new refund reasons completely replaces the existing default refund reasons in the 2Checkout platform.

New reasons are displayed as follows:

  • For shoppers: upon requesting a refund from 2Checkout myAccount
  • For merchants: upon refunding a transaction and inside the Refunds report export.

Follow the steps below to add new refund reasons.

  1. Go to Orders & customers -> Refunds.
  2. Go to the Refund settings tab.
  3. Click New reason.
  4. Enter the reason name.
  5. Click Save

You have to repeat the process for adding a new reason. After you save a refund reason, you can add localized versions. Click Edit, select the language that you want to edit, and enter the localized version. Then, click Save.

To delete a refund reason, click Delete on the reason list.

To reorganize the reason list, drag, and drop the reasons inside the list.

refunds.JPG

Your control over the refund process if further enhanced by the fact that the display order that you set in Control Panel will be reflected when customers are requesting refunds from their 2Checkout account, as displayed in the screenshot below.

customers_reasons

Take advantage of the new process by better engaging your customers and gathering their feedback.

Canceling refund requests

You can cancel a refund request as long as the reimbursement process hasn’t started.

Follow the steps below to cancel an unprocessed refund.

  1. Go to Orders & customers -> Order search.
  2. Select the eStore orders tab.
  3. Use the filters to search for the order that you initiated the refund for.
  4. Click the order reference number.
  5. Click You can view the refund details or cancel the request.
  6. Click Cancel this refund request.

Bundle refunds

You can request and issue refunds for orders containing product bundles. To request a bundle refund, follow the same steps described above for either a total or a partial refund while paying attention to the following two scenarios.

Parent-level subscription bundles

When issuing refunds for parent-level subscription bundles, you have the following options:

  • Cancel the subscription generated for the bundle. Customers can no longer use, renew or upgrade the products in the bundle.
  • Stop automatic billing. Customers can manually renew and upgrade the products included in the bundle.

Child-level subscription bundles

When issuing refunds for child-level subscription bundles, you have the following options:

  • Cancel all or some of the included subscriptions. Customers can no longer use, renew or upgrade the selected subscriptions.
  • Stop automatic billing. Customers can manually renew and upgrade the selected subscriptions.

FAQ

  1. Does 2Checkout send refund notifications?
    • Yes. Customers receive an email with information on the evolution of the refund, regardless of whether it was approved or rejected. You also get a notification message and have the option of viewing the details of an order for which a refund was issued.
  2. How is the refund reflected in the order status?
    • Once a total or partial refund was approved and the customer reimbursed, the status of the order changes to Refunded. The Request refund button changes to View original order for Refunded orders, with all the payment details illustrating the reimbursement. A refund request can still be placed after a partial refund, and the original order will display “Request refund”.
  3. How long does it take for a transaction to be refunded?
    • Once a refund was approved, reimbursement occurs. The refund amount will be available in the customer's bank account after the refund is processed, depending on the issuing bank.
  4. Can I issue more than one refund to a customer for the same order?
    • Yes. You can issue either a single total refund or several partial refunds for each order. 
  5. Can shoppers request refunds directly from 2Checkout?
    • Yes. 2Checkout evaluates refund requests from both you and your customers. In case your shoppers contact 2Checkout directly, 2Checkout notifies you via email. Failing to reply to the refund request that was referred to you, causes 2Checkout to issue the reimbursement automatically if it’s found to have merit. Please see the refunds section of your 2Checkout e-Commerce Agreement for additional details.
  6. Are there any costs associated with a refund?
    • No. Neither you nor the shopper gets charged when refunding an order, but the order processing commissions already received by 2Checkout will not be returned.
  7. Can keycodes for a refunded product be reused?
    • Keycodes for electronic delivery can be re-used only if they are part of static lists or if the lists allow the use of duplicates. Keycodes from static lists can be assigned to multiple instances of a product or to multiple products. To be able to reuse keycodes, select the Re-use keycodes checkbox when requesting a refund from the order via the Merchant Control Panel.
  8. What happens to refunded subscriptions?
    • The Disable license functionality impacts only renewal licenses managed through the 2Checkout platform, but not the licenses of the products acquired by your customers. For subscriptions, you control the transaction amount considered for a reimbursement, which can be the last payment or all payments a customer made, with forthcoming renewal licenses being canceled automatically.
  9. What types of orders can be refunded?
    • Total and partial refunds may be performed only against settled transactions, so the options are not available for Unfinished, Canceled or Processing (In Progress and Pending Approval) orders. In Progress and Pending Approval orders can only be reversed, not refunded. However, the reverse of a refund can only be performed by 2Checkout, so for this purpose contact our Refunds Department. 
  10. What happens to licenses when refunds are issued?
    • When a partial refund or total refund is issued, you have the option to disable the subscription by selecting the Cancel subscription checkbox when requesting a refund from the order via the Merchant Control Panel. Otherwise, subscriptions will remain active. 

myAccount custom domain

Overview

You have the option of hosting 2Checkout myAccount on a custom domain to offer a personalized experience to your shoppers complemented by branding and a design aligned with the look and feel of your website. Control the 2Checkout customer service platform for your shoppers, focusing it only on interactions they have with your company. Offer mature shopper portal management capabilities, enabling subscribers to manage subscriptions, upgrade and even update their information, including payment details, via a single account.

Availability

Contact 2Checkout for availability.  

Requirements

Custom domain. Contact 2Checkout to set up a custom domain. 

Custom 2Checkout myAccount domains

If you are already using custom domains for the shopping cart, we recommend enhancing the shopping experience even further via personalized myAccount domains. Custom 2Checkout myAccount domains are available in tandem with personalized Ordering Hosts, providing your customers with accounts that share the same domain as the shopping cart used to buy your products.

Take advantage of custom myAccount domains to centralize and offer access only to information for the products that shoppers purchase from you, filtering out their actions in the 2Checkout network that are not related to your subscriptions.

Monthly order report

The report centralizes data for finished and refunded orders within a specific time interval, paid in a specified currency. Data included in the report originates from the following sales channels: eStore, Affiliate Network, Network Cross-Sales, and Distribution Partners (a filter allowing the selection of specific partners is available). The Monthly Orders Report uses the 2Checkout currency exchange rates from the day when customers paid the orders, and as such, all aggregated amounts are estimated.

You can use this report to see the value of finished and refunded orders placed in a specific currency or the value of all the orders converted to the default payout currency.

The Compare with previous period option enables a year over year comparison of order data, including statistics from the year preceding the last 12 months.

Report data may differ from the 2Checkout Sales Report for accounts with EUR and USD settlement currencies, due to the exchange rate used during currency conversion.

Integrate PrestaShop

Overview

Merchants can use the PrestaShop connector to integrate with 2Checkout and process orders with ConvertPlus, InLine Cart, and 2Pay.js, and provide an improved experience to their shoppers.​

Availability

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

PrestaShop Settings

Regardless you are already using the PrestaShop connector or you want to start integrating with 2Checkout, you need to follow the steps below:

1. Download the 2Checkout payment module from GitHub by clicking on the Code button and then on Download ZIP.

prestashop_connector_1New.png

2. After downloading the .zip archive, open it and extract the folder twocheckout, then archive it separately as a .zip file.

3. Sign in to your PrestaShop admin and navigate to Modules → Module Manager.

prestashop connector_2.png

4. On the Module Manager page, click on Upload module and upload the twocheckout .zip folder.

prestashop connector_3.png

prestashop connector_4.png

5. After upload, the new module will appear as shown here:

prestashop connector_5.png

6. Click on Configure to add your information:

  • Seller ID (Merchant Code)
  • Buy Link Secret Word
  • Secret Key
  • Select the cart type:
  • Select "Demo mode" if you wish to enable it. This will allow you to place test orders using test payment methods, to check your integration with 2Checkout.
  • Select the style for the API form. You can choose to use the "Default style" or you can customize it by implementing the code snippet provided there.
  1. The Seller ID is your 2Checkout Merchant Code that you can obtain by logging in to your Merchant Control Panel and navigating to Integrations → Webhooks & API. 
  2. To find the Buy Link Secret Word, log  in to your 2 Checkout Merchant Control Panel and navigate to Integrations → Webhooks & API → Secret Word . Edit your  INS Secret Word to match the Buy Link Secret Word , copy the value and paste it in the PrestaShop admin.
  3. The Secret key can be found in your 2Checkout Merchant Control Panel, right next to the Merchant Code. Copy and paste it in your PrestaShop admin.

prestashop connector_6.png

7. Once you've filled in all the information, click on Update settings at the bottom of the page.

prestashop connector_7.png

8. Test your integration by placing an order. If your set-up is correct, you will be able to see the Pay with 2Checkout option:

  • for ConvertPlus and InLine checkout flow

prestashop connector_8New.png

  • for 2Pay.js checkout flow

test prestashop api payment.png

2Checkout Settings

  1. Sign in to your 2Checkout account.
  2. Navigate to Dashboard → Integrations → Webhooks & API
  3. Follow these steps to activate Redirect URL:
  4. Click Update to save your changes.
  5. Make sure to enable the IPN webhook notification in your Merchant Control Panel
  • Log in to the 2Checkout Merchant Control Panel and navigate to Integrations → Webhooks & API
  • Scroll down to the Notifications section and enable the IPN webhook

set up IPN in merchant control panel_1.png

  • For the Payment notification type field, select IPN or Email Text & IPN, and then click on the Configure IPN button.
  • On the IPN settings page, click on the Add IPN URL button and input the IPN URL available in the configuration page in Prestashop.

set up IPN in merchant control panel_2.png

set up IPN in merchant control panel_3.png

  • Enable all triggers and response tags

set up IPN in merchant control panel_4.png

About PrestaShop

PrestaShop is an eCommerce marketplace for small and medium merchants and offers them a variety of tools to download that help them build their online businesses. Fast, efficient, and easy to use, PrestaShop’s free eCommerce solution provides everything merchants need to open, operate, and maintain a successful online store.

For more information visit PrestaShop.com.

FAQ

1. Does the new connector use webhooks?​​​

Yes, it uses IPN, so make sure you enable it from your Merchant Control Panel.

2. Do order statuses get updated on the PrestaShop side if any change occurs after place order?​​​

Yes, both order and fraud statuses are synchronized, as well as refunds.​​

3. Can I place refunds?​​​

Yes, but only from the 2Checkout Control Panel. You will be able to place refunds from the PrestaShop portal in the next release of the connector.​

4. Can I use the connector with a 2Monetize account?​​​

No, you can't. This connector is built to cover only the 2Sell and 2Subscribe accounts.

Integrate WP-Invoice

Availability

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

WP e-Commerce Settings:

  1. Download or clone the 2Checkout payment module at https://github.com/craigchristenson/2checkout-wp-invoice
  2. Upload the files under the “wp-invoice” directory to “/wp-content/plugins/wp-invoice” on your web server.
  3. In your WordPress admin select Invoice -> Settings to open your WP Invoice settings.
  4. Under Payment select 2Checkout.
  5. Enter Display Name. Example: Credit Card (Visa, MasterCard, American Express, Discover, JCB, PIN Debit) and PayPal
  6. Enter your 2Checkout Merchant Code.
  7. Enter your 2Checkout Secret Word. (Must be the same value entered on your 2Checkout Control Panel.) To obtain the Secret Word, log in to your 2Checkout Merchant Control Panel account and navigate to Integrations → Webhooks & API → Secret Word → INS Secret word.  Your INS secret word should be the same as the buy-link secret word (can be found under Dashboard → Integrations → Webhooks & API, scroll down to the Secret Word area, under the INS Secret Word). Edit your INS secret word and buy-link secret word to match each other, then copy and paste them into your WP-Invoice admin. INS secret word.png
  8. For demo sales set Demo Mode to Yes. For live sales keep Demo Mode at No.
  9. Under Direct Checkout select Yes.
  10. Copy the URL provided under “2Checkout Approved URL/INS URL”.
  11. Click Save All Settings.

2Checkout Settings:

  1. Sign in to your 2Checkout account.
  2. Navigate to Dashboard → Integrations → Webhooks & API
  3. Follow these steps to activate Redirect URL:
    • In the Redirect URL section check “Enable return after sale”
    • For Return method, select Link in the Thank You Page or Header redirect
    • Set the Approved URL to the URL provided in your WP Invoice settings (Replace http://yourdomain.com with the actual URL to your domain)
    • Click Update to save your settings
  4. In the Webhooks and API section, under the Instant Notification Service (INS) card, check the Enable Global URL box. 
  5. Enter the Approved URL (it must be the same value entered in your WP Invoice settings) as the Global URL (replace http://www.yourdomain.com with your actual website URL)
  6. Enable all triggers.
  7. Click Update to save your changes.

About WP-Invoice

WP-Invoice lets WordPress blog owners send itemized invoices to their clients. Ideal for web developers, SEO consultants, general contractors, or anyone with a WordPress blog and clients to bill. The plugin ties into WP’s user management database to keep track of your clients and their information.

For more information visit: http://wordpress.org/extend/plugins/wp-invoice/

Integrate osCommerce

Overview

Integrate osCommerce to be able to process payments through the 2Checkout platform in over 200 countries and more than 100 currencies. 

osCommerce is an eCommerce and online store management software that helps merchants to launch their businesses.

Availability 

Before you are able to start accepting payments, 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. 

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

osCommerce Settings 

Perform the below set of instructions in your osCommerce account to integrate it with 2Checkout.

  1. Download the new 2Checkout module from Github.
  2. Upload the files to your server under your store’s directory.
  3. Log in to your osCommerce admin area.
  4. Navigate to Administration → Modules and click on Payment.

integrate_osCommerce-connector_1.png

5. On the Payment page, click Install on 2Checkout.

integrate_osCommerce-connector_2.png

6. Select 2Checkout API,2Checkout ConvertPlus, or 2Checkout InLine and click on Install Module.

integrate_osCommerce-connector_3.png

7. Enter your 2Checkout details:

  • 2Checkout Account ID. The 2Checkout ID is your 2Checkout Merchant Code, and you can find it in the 2Checkout Merchant Control Panel, under Integration → Webhooks and API.
  • Secret Key (you can find it in the 2Checkout Merchant Control Panel, under Integration → Webhooks and API)
  • Buy-Link Secret Word (you can find it in the 2Checkout Merchant Control Panel, under Integration → Webhooks and API)

integrate_osCommerce-connector_4.png

8. Under Test Mode select No for live sales or Yes for test sales.

9. Click Save Changes.

2Checkout Settings

  1. Log in to your 2Checkout Merchant Control Panel.
  2. Navigate to the Integrations → Webhooks & API section.
  3. Enable the IPN webhook notification.
    • Go to Integrations → Webhooks & API
    • Scroll down to the Notifications section and
    • Enable the IPN webhook
    • For the Payment notification type field, select IPN or Email Text & IPN, and then click on the Configure IPN button.
    • On the IPN settings page, click on the Add IPN URL button and input the IPN URL available on the configuration page in osCommerce.
    • Enable all triggers and response tags.

About osCommerce

osCommerce (Open-Source Commerce) is an eCommerce and online store management software. ​It’s one of the oldest eCommerce solutions that help merchants to launch their businesses.​ It has support for both physical and digital products, as well as services.​

osCommerce provides a complete package of solutions to different aspects of online business(features like billing, product display, multi-language options, different currencies, etc.)

 

Integrate SalesForce

Overview

Integrate Salesforce with 2Checkout to ensure that data on orders your shoppers place through the 2Checkout platform is readily available in your Salesforce account. You can push not only order data but also additional information such as customer and subscription info, based on a range of triggers that you control. You can then employ Salesforce capabilities to manage order data extracted from the 2Checkout platform.

Availability

The Salesforce connector is available as an add-on. Contact 2Checkout for more information. 

  • Standard - 2Checkout pushes data into Salesforce for a static collection of objects/fields.
  • Custom - 2Checkout provides support and works closely with you to define custom integrations, providing you will full control over where and how the order data is pushed into your Salesforce account.

Requirements

All requirements listed in this section are mandatory.  

Match product codes across platforms

Enter Product codes when first creating products in Salesforce. In addition, editing existing products will allow you to also change product codes Make sure the product codes of items configured in the 2Checkout Control Panel are identical to the product codes of the matching items in Salesforce.

Advanced integration for bundle products

The Salesforce connector supports bundled products. 2Checkout - Salesforce integrations reflect bundle sales, but also break down bundles and report order data for each product actually reaching customers. 

Price and tax data is provided only for the bundle. Products sold as a part of bundle offerings feature 0 (zero) prices and taxes.

2Checkout Price Book

Price Book with the name Avangate is required in Salesforce for the integration to work. All products in Salesforce that mirror those configured in the 2Checkout platform should be added to the Avangate Price Book

For 2Checkout products with base price use the value of the Default price. For 2Checkout products without base price, use the value of the first price interval, or set it to 0 (zero).

Multi-currency support

The Salesforce connector supports multiple currencies for the data extracted from the 2Checkout system and sent into Salesforce. The capability enables you to match the currencies of your sales through 2Checkout with the currencies in Salesforce. 

To create a custom price book, follow these steps: 

  1. Login into the Salesforce platform.
  2. Navigate to Products, and in the Maintenance section at the bottom of the Products home page, click Manage Price Books.
  3. Select New, and enter the details of the price book, such as a name and a description (optional).
  4. Check Active and then click Save.
You are required to configure product prices in all currencies for the markets you're selling into, and not only for USD.

The Connector will only push your sales data into Salesforce for the products that have a price defined in the same currencies as available in the 2Checkout platform.

For example, if you configured the price of Product A as $99.99 for the US and 88.99 EUR for Europe, but only defined $99.99 in Salesforce, data for sales in EUR will not be uploaded to Salesforce. The Connector will not convert sales for sales in currencies that you haven't defined in Salesforce.

2Checkout user privileges

Access to the Salesforce connector in the 2Checkout Control Panel is only available to users with the necessary privileges. To enable access to the connector, click on Account settings, then on the Manage user access button in the User access, identify the user which you will grant Salesforce integration privileges and edit the assigned role. Check the Salesforce integration option under Setup to enable access to the Salesforce connector for a specific user.

Salesforce account

Use a Salesforce Enterprise, Developer or Unlimited account.

Salesforce user privileges

To use the Salesforce integration provided by 2Checkout, it's mandatory that you provide valid Salesforce.com account information for a user with Salesforce API privileges.

When the 2Checkout connector creates custom fields in Salesforce, it enables view/read privileges only for Admin (System Administrator) and Standard (Standard User) profiles.

Required: To make sure your Salesforce user has view/read privileges for the 2Checkout custom fields:

  1. Assign the Admin or Standard roles to the Salesforce user you utilize with the 2Checkout Salesforce connector, or,
  2. Enable view and read privileges manually for all 2Checkout custom fields in your account for your Salesforce user.

Without these privileges, custom fields will not be accessible when using the Salesforce API with your credentials, and will not be included in the WSDL.

IP addresses for 2Checkout services

2Checkout is using the following IP networks, which need to be set as allowed in your firewalls in order to connect or receive connections from 2Checkout:

  • 80.84.242.0/24
  • 91.220.121.0/25
  • 5.35.210.128/25
  • 184.106.7.192/29
  • 85.17.14.128/27

Enable the integration

Once you're done with the configuration requirements above you need to enable integration to have 2Checkout push order and subscription data into your Salesforce account.

Select 'No' at any time to pause integration and temporarily stop 2Checkout account details from reaching Salesforce.

2Checkout pushes order and subscription data into your Salesforce account only while the integration is enabled. 2Checkout does not transfer data for intervals of time when you disable the integration, however, the system queues the data and starts pushing it into your Salesforce account once you re-enable the connection beginning with the information logged after you disabled integration.

Integration data

By default the Salesforce connector pushes data for:

  • Finished and Refunded 2Checkout orders.
  • Created and Renewed subscriptions.

Salesforce integrates refunded orders in the same manner as handled by the 2Checkout system. For each refund, the 2Checkout system generates a new order with a negative value, representing the funds paid back to the shopper.

2Checkout order data is pushed into your Salesforce account at one-minute intervals but it might take a few minutes before the details are available.

Integration data triggers

Select the events for which 2Checkout pushes order and subscription data into your Salesforce account. 2Checkout is pushing data for at least the default triggers (marked in bold below).

Order triggers Subscription triggers
  1. Pending orders
  2. Approved orders (sent before electronic delivery)
  3. Authorized orders (sent after electronic delivery)
  4. Reversed orders
  5. Completed orders
  6. Canceled orders
  7. Refund orders
  1. Create subscription
  2. Renew subscription
  3. Enable/Disable subscription
  4. Enable/Disable auto-renewal
  5. Update subscription status
  6. Update expiration date
  7. Update end user

Test orders

The 2Checkout Salesforce integration supports test orders as long as you enabled the test order system.

2Checkout and Salesforce equivalents

Essentially, the details of the order pushed into Salesforce by the connector are part of the information available for exporting either as CSV (Comma Separated Values) or XLS (Excel Format) in Order search under the Orders & customers area of the 2Checkout Control Panel. The table below outlines the equivalents between the 2Checkout platform and Salesforce. 2Checkout orders will be available as Salesforce opportunities once the connector is set up and starts pushing the data.

 

2Checkout

Salesforce

Order

Opportunity

Order line

Opportunity Line Item

Order/Subscription billing details

Account

Order delivery/fulfillment details

Contact

Products

Product

Product prices

Price books

Subscription

Licence

Setup 

Access the Salesforce connector administration area by navigating to Salesforce integration under Setup.

Setup requirements

  1. A valid Salesforce account for a user with privileges to use the Salesforce API.
  2. Access to the Salesforce API requires the security token generated by Salesforce and associated with the username only when your Salesforce account also requires one. To get your security token, login into the Salesforce platform, click on your name, and in the left-hand side pane, under Personal Setup, expand My personal information, and click on Reset My Security Token. You'll receive the new security token via email.
  3. The Enterprise WSDL file describing the structure of the application on Salesforce. Note: The Enterprise WSDL file needs to be downloaded and re-uploaded into the 2Checkout Salesforce connector the first when changes are operated to the structure of the application on Salesforce. To download an enterprise WSDL file, login into Salesforce, open the drop-down button for Your Name, select Setup and in the left-hand side pane, under App Setup, click on Develop and then API. Click the Generate Enterprise WSDL link, and right-click the document displayed and choose Save as. When you have managed packages installed, you'll first need to select the Package Version for each of your installed managed packages. After clicking Generate Enterprise WSDL and then, on the next screen, hit Generate.
  4. The Metadata WSDL file associated with the Salesforce account designed to allow the modification of the structure of the Salesforce objects and fields through the API. This Metadata WSDL file is needed only in standard integration scenarios with Salesforce. To download a metadata WSDL file, open the drop-down button for Your Name, select Setup and in the left-hand side pane, under App Setup, click on Develop and then API. Click the Generate Metadata WSDL link, and right-click the document displayed and choose Save as. When you have managed packages installed, you'll first need to select the Package Version for each of your installed managed packages. After clicking Generate Enterprise WSDL and then, on the next screen, hit Generate.

Configuration

Once you have the credentials for a Salesforce account for a user with API rights, the associated security token, and the Enterprise and Metadata WSDL files, you can start setting up the connector.

  1. Enter the username and password for your Salesforce account. 
  2. Provide the security token. 
  3. Upload the Enterprise and Metadata WSDL files.
  4. Click Continue to have the 2Checkout system check whether it can establish a connection with Salesforce or not. The 2Checkout system validates all items provided, as they are used to connect to your Salesforce account.
  5. A warning will be displayed if the validation fails. In such a case please check that all the details provided are correct. Also, verify that the Enterprise and Metadata WSDL files are the same as the latest versions available through Salesforce. Make sure that the Salesforce credentials you're providing are associated with a Salesforce user with API privileges.
  6. When first setting up the 2Checkout - Salesforce integration you will be presented with a warning message informing you of the changes that the connector is designed to make to the structure of the application of Salesforce. The Salesforce connector creates a new object named License, and also adds a number of fields to existing objects. The new objects and fields are all necessary for standard integrations to order data from the 2Checkout system into Salesforce. 
  7. When you meet all requirements, 2Checkout saves the information.

The integration is limited to sending order data from the 2Checkout system only in the custom fields that it creates during the setup process. Note: order data is also pushed into required fields for Salesforce objects, and into the following standard Salesforce fields: Billing/Delivery address fields under Account as well as Billing/Mailing address fields under Contact. When the 2Checkout connector creates custom fields in Salesforce, it enables view/read privileges only for Admin (System Administrator) and Standard (Standard User) profiles.

Required: To make sure your Salesforce user has view/read privileges for the 2Checkout custom fields:

1. Assign the Admin or Standard roles to the Salesforce user you utilize with the 2Checkout Salesforce connector, or,

2. Enable view and read privileges manually for all 2Checkout custom fields in your account for your Salesforce user.

Without these privileges, custom fields will not be accessible when using the Salesforce API with your credentials, and will not be included in the WSDL.

Salesforce connector custom fields

All custom fields created by the Salesforce connector are labeled with the Avangate prefix as in the following example: Avangate_FieldName__c.

The following list provides additional details about the custom object and fields created by the 2Checkout Salesforce connector, all of which can also be created manually:

 

Account

Avangate_Record__c

  • label: Avangate record
  • type: Checkbox
  • default: false

Avangate_Company__c

  • label: Company
  • type: Text
  • length: 255

Avangate_Email__c

  • label: Email
  • type: Email
  • unique: true

Avangate_VAT_Id__c

  • label: VAT ID
  • type: Text
  • length: 25

 

Contact

Avangate_Record__c

  • label: Avangate record
  • type: Checkbox
  • default: false

 

Opportunity

Avangate_Record__c

  • label: Avangate record
  • type: Checkbox
  • default: false

Avangate_Payment_Method__c

  • label: Payment method
  • type: Text
  • length: 50

Avangate_Approval_Status__c

  • label: Approval status
  • type: Text
  • length: 25

Avangate_Order_Date__c

  • label: Order date
  • type: DateTime

Avangate_Order_Status__c

  • label: Order status
  • type: Text
  • length: 25

Avangate_Order_Finish_Date__c

  • label: Order finish date
  • type: DateTime

Avangate_Order_No__c

  • label: Order number
  • type: Number
  • scale: 0
  • precision: 11

Avangate_Total_Price__c

  • label: Total price
  • type: Number
  • scale: 2
  • precision: 11

Avangate_Reference_No__c

  • label: Reference number
  • type: Text
  • length: 11

Avangate_Currency__c

  • label: Currency
  • type: Text
  • length: 3

 

OpportunityLineItem

Avangate_Record__c

  • label: Avangate record
  • type: Checkbox
  • default: false

Avangate_Currency__c

  • label: Currency
  • type: Text
  • length: 3

Avangate_Unit_Price__c

  • label: Unit price
  • type: Number
  • scale: 2
  • precision: 11

Avangate_Total_VAT__c

  • label: Total VAT
  • type: Number
  • scale: 2
  • precision: 11

Avangate_Unit_Discount__c

  • label: Unit discount
  • type: Number
  • scale: 2
  • precision: 11

Avangate_Pricing_Options_Names__c

  • label: Pricing options names
  • type: Text
  • length: 100

Avangate_SKU__c

  • label: SKU code
  • type: Text
  • length: 25

Avangate_Pricing_Options_Values__c

  • label: Pricing options values
  • type: Text
  • length: 100

Avangate_Promotion_Coupon__c

  • label: Promotion coupon
  • type: Text
  • length: 25

Avangate_Licence_Codes__c

  • label: Licence codes
  • type: LongTextArea
  • visibleLines: 3
  • length: 5000

Avangate_Total_Without_VAT__c

  • label: Total(without VAT)
  • type: Number
  • scale: 2
  • precision: 11
 

 

Avangate_Licence__c

Avangate_Record__c

  • label: Avangate record
  • type: Checkbox
  • default: false

Avangate_Renewal_Status__c

  • label: Renewal status
  • type: Text
  • length: 25

Avangate_Purchase_Date__c

  • label: Purchase date
  • type: DateTime

Avangate_Renewal_Interval__c

  • label: Renewal interval
  • type: Text
  • length: 25

Avangate_Expiration_Date__c

  • label: Expiration date
  • type: DateTime

Avangate_Disabled__c

  • label: Disabled
  • type: Checkbox
  • default: false

Avangate_Registration_Date__c

  • label: Registration date
  • type: DateTime

Avangate_Trial__c

  • label: Trial
  • type: Checkbox
  • default: false

Avangate_License_Type__c

  • label: License type
  • type: Text
  • length: 25

Avangate_Lifetime__c

  • label: Lifetime
  • type: Checkbox
  • default: false

Avangate_Licence_Code__c

  • label: Licence code
  • type: Text
  • length: 25

Avangate_Opportunity__c

  • label: Opportunity
  • type: Lookup
  • length: 20
  • referenceTo: Opportunity
  • relationshipName: OpportunityLicences
  • relationshipOrder: 0

Avangate_Delivered_Codes__c

 

  • label: Avangate delivered codes
  • description: Text
  • type: Text
  • length: 255

Avangate_Account__c

 

  • label: Account
  • description: Licence end user
  • type: Lookup
  • length: 20
  • referenceTo: Account
  • relationshipName: LicenceAccount
  • relationshipOrder: 0

Activate the 2Checkout Salesforce integration

After the initial successful setup, the status of the connection to Salesforce is Inactive. You need to manually activate the integration for the 2Checkout system to start sending order data into Salesforce.

Activation requirements

Before activating the integration, you will need to re-download the Enterprise WSDL file and re-upload it via the Salesforce connector. This is necessary because the setup process changed the Salesforce structure, and the connector needs the most recent version of the WSDL, describing the updated Salesforce structure for your account for 2Checkout order data to be pushed correctly into the required and custom fields.

Important! Before uploading the WSDL, make sure that the custom 2Checkout fields were created and are included in the WSDL. If not, check your account privileges to make sure you have view/read privileges for the custom 2Checkout fields and re-download and re-upload the WSDL.

Data connection

2Checkout order data integration into Salesforce starts immediately after the connection configured with the Salesforce connector is activated. This date does not change, even if you disable and re-enable the connection. The Salesforce connector pushes all data for finished orders in the 2Checkout system into Salesforce from the moment of the initial activation.

What happens if I deactivate the connection?

If the connection is deactivated and then re-enabled, the connector will also push the data from the interval when the connection was disabled.

How often is the data pushed into Salesforce?

Once the connection is live, the 2Checkout system runs at periodic intervals and checks for order data that needs to be pushed into Salesforce. Details for any new finished and refunded orders identified are then transmitted and made available into Salesforce.

What happens in the case of configuration issues?

Be advised, all products need to be correctly configured in Salesforce to mirror their 2Checkout system configurations, namely share identical product codes, and be grouped into the Avangate Price Book. At the same time, orders containing products not defined in Salesforce at all will be ignored by the Salesforce connector. If a single product from an order is configured incorrectly, the Salesforce connector will not push the data for that order into Salesforce. Contact 2Checkout support directly if you notice discrepancies and follow the guidance provided to resolve product configuration issues. Once you deal with the problem, the Salesforce connector will try to push all order data into Salesforce, including details it was previously unable to integrate.

Data flow

  1. Create a new Account for orders with new billing details, or update an existing Account if the same billing details were already used in the past. The billing details are extracted from the subscription information for end-users and from the sale information for partners. Accounts are tied to the email address shoppers and partners use to place orders.
  1. Create a new Contact for orders with new delivery details, or update an existing Contact if the same delivery details were already used in the past. Multiple Contacts can be linked to a single Account. Contacts can share the same delivery email address, but be different from one another if they don't also share the contact full name (first name and last name).
  1. The Salesforce connector will now push the order data and create a new Opportunity using the information taken from the order. Opportunities are automatically linked to Account and Contact entries.
  2. Create a new Opportunity Line Item using the information taken from the order lines. A new line item is created for each product included in an order, containing all subscription codes/keys generated for that product. Order lines are linked to previously created opportunities with the product featured in each opportunity line item being linked to the correspondent Avangate Price Book entry defined in Salesforce.
  3. A new License entry is created for each generated subscription code, and linked to the corresponding opportunity.
  4. Existing Subscriptions will only be updated when new orders are placed referencing the same subscription code, such as in the case of subscription renewals or upgrades, for example.

Avangate data and Salesforce fields 

The Avangate data is mapped into Salesforce in the following fields:

Account

Name:

BillingCompany / BillingFirstName + BillingLastName

Avangate_Record__c:

Checked for orders pushed by Avangate

Avangate_Email__c:

BillingEmail

Phone:

BillingPhone

BillingStreet:

BillingAddress

BillingCity:

BillingCity

BillingState:

BillingState

BillingCountry:

BillingCountry

BillingPostalCode:

BillingZip

ShippingStreet:

DeliveryAddress

ShippingCity:

DeliveryCity

ShippingState:

DeliveryState

ShippingCountry:

DeliveryCountry

ShippingPostalCode:

DeliveryZip

Type:

Shopper type - end user or partner

Avangate_Company__c:

BillingCompany

Avangate_VAT_Id__c:

BillingVATId

 

Contact

Avangate_Record__c:

IsAvangateOrder

FirstName:

BillingFirstName

LastName:

BillingLastName

Phone:

BillingPhone

Email:

BillingEmail

MailingStreet:

BillingAddress

MailingCity:

BillingCity

MailingState:

BillingState

MailingCountry:

BillingCountry

MailingPostalCode:

BillingZip

OtherStreet:

DeliveryAddress

OtherCity:

DeliveryCity

OtherState:

DeliveryState

OtherCountry:

DeliveryCountry

OtherPostalCode:

DeliveryZip

 

Opportunity

Avangate_Record__c:

IsAvangateOrder

Avangate_Approval_Status__c:

Approval status

CloseDate:

OrderCompleteDate

Avangate_Order_Status__c:

Order status

Avangate_Order_No__c:

OrderNumber

Avangate_Reference_No__c:

OrderRefferenceNumber

Avangate_Payment_Method__c:

OrderPaymentMethod

Avangate_Order_Date__c:

OrderDate

Avangate_Order_Finish_Date__c:

OrderCompleteDate

Avangate_Total_Price__c:

TotalPrice

Avangate_Currency__c:

PaymentCurrency

StageName:

OrderApprovalStatus

 

OpportunityLineItem

Avangate_Record__c:

IsAvangateOrder

Quantity:

Quantity

Description:

Info

Avangate_Currency__c:

Currency

TotalPrice:

Avangate_Total_Without_VAT__c + Avangate_Total_VAT__c - Avangate_Unit_Discount__c * Quantity

Avangate_Unit_Price__c:

Price

Avangate_Unit_Discount__c:

Discount

Avangate_SKU__c:

SKU

Avangate_Promotion_Coupon__c:

PromotionCoupon

Avangate_Total_Without_VAT__c:

TotalWithoutVAT

Avangate_Total_VAT__c:

TotalVAT

Avangate_Pricing_Options_Names__c:

PricingOptionsText

Avangate_Pricing_Options_Values__c:

PricingOptionsValue

Avangate_Licence_Codes__c:

Purchased licence codes

 

License

Avangate_Record__c:

IsAvangateOrder

Avangate_Purchase_Date__c:

PurchaseDateTime

Avangate_Expiration_Date__c:

ExpirationDateTime

Avangate_Registration_Date__c:

DateRegistered

Avangate_Renewal_Status__c:

Auto|Manual|N/A

Avangate_Renewal_Interval__c:

Product renewal interval

Avangate_Disabled__c:

Disabled

Avangate_Trial__c:

Trial

Avangate_Lifetime__c:

Lifetime

Avangate_Licence_Code__c:

LicenceCode

Name:

LicenceCode

Avangate_Delivered_Codes__c Ativation codes delivered for the license/subscription
Avangate_Account__c Link to end user data when the license is purchased through a partner company

Re-activating the 2Checkout Salesforce connection

You have the option of deactivating the 2Checkout Salesforce connection at any time, but the integration can also be automatically deactivated by the system for reasons such as the modification of the password used for the Salesforce account set up in the connector or the resetting of the security token.

Another example of an issue that can cause the automatic deactivation of the connection is related to the Enterprise WSDL file becoming outdated due to changes operated to Salesforce objects/fields. The connection can also be dropped if the fields/objects required by the 2Checkout system for the integration are missing.

In such scenarios click the Fix account setup button and go through the steps of the setup process again, making sure that the username and password are correct, that the security token is valid, that the latest Enterprise and Metadata WSDL files are provided, and that the Salesforce user-provided has API privileges.

Note: Every time the connection is automatically deactivated, you will receive an email notification, and need to take action to resolve the issues that caused the system to disable the integration.

 

Integrate AbanteCart

Availability

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

AbanteCart Settings:

  1. Login to your AbanteCart admin.
  2. Under the Extensions menu, click Payments and select 2Checkout.
  3. Under Payment Gateways select 2Checkout.
  4. Enter your 2Checkout Account ID.
  5. Enter your INS Secret Word (Must be the same value entered on your 2Checkout Control Panel.)  To obtain the INS Secret Word, log in to your 2Checkout Control Panel and navigate to Dashboard → Integrations → Webhooks & API → Secret Word → INS Secret word.  Your INS secret word should be the same as the buy-link secret word (can be found in your Merchant Control Panel, under Dashboard → Integrations → Webhooks & API, scroll down to the Secret Word area, under the INS Secret Word). Edit your INS secret word and buy-link secret word to match each other, then copy and paste them into your AbanteCart admin.INS secret word.png
  6. Under Test mode, select live sales or testing for demo sales.
  7. Under Order Status, select Completed.
  8. Save your changes.

2Checkout Settings:

  1. Sign in to your 2Checkout account.
  2. Navigate to Dashboard → Integrations → Webhooks & API
  3. Follow these steps to activate Redirect URL:
    • In the Redirect URL section check “Enable return after sale”
    • For Return method, select Link in the Thank You Page or Header redirect
    • Set the Approved URL to the URL provided in your AbanteCart admin (Replace http://yourdomain.com with the actual URL to your domain)
    • Click Update to save your settings
  4. In the Webhooks and API section, under the Instant Notification Service (INS) card, check the Enable Global URL box. 
  5. Enter the Notifications URL provided in your AbanteCart admin as the global endpoint URL.
  6. Click Update to save your changes.

About AbanteCart

AbanteCart is a shopping cart and eCommerce application that is not only one the best and technologically advanced around, but it is also completely free, thanks to donations and contributions from satisfied users and sponsors. AbanteCart’s solution enables small to medium-sized online businesses to have a complete, multifunction eCommerce platform for absolutely no fees or subscription charges.

AbanteCart is built with unique and innovative architecture and has been designed with the user in mind. This enables people with little or no experience to use AbanteCart almost instantly. AbanteCart has also been designed with experienced users in mind and provides advanced tools with greater UI. Users do not need any programming skills, knowledge of code, or previous cart experience to use applications.

In addition to a great user interface, AbanteCart’s core code is flexible and empowered with a special extension API to allow expandability to any specific and demanding eCommerce requirement.  With this in mind, properly extended AbanteCart applications can be upgraded in the future without any hassle.

AbanteCart has rapidly become popular among small to medium-sized merchants and continues to introduce new features and extensions every day.

For more information visit: AbanteCart.com

 

Integrate VirtueMart

Availability

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

VirtueMart Settings

 

  1. Download or clone extension at https://github.com/craigchristenson/VirtueMart-2Checkout
  2. In your Joomla admin, under Extensions → Extension Manager
  3. Upload tco.zip under Upload Package File
  4. Under Components → Shop → VirtueMart → Payment Methods, click New
  5. Select 2Checkout as the Payment Method
  6. Enter a Payment Method Name
  7. Select Yes for Published
  8. Enter a Payment Description (Example: Credit Card - Visa, MasterCard, American Express, Discover, JCB, and PayPal)
  9. Click Configuration
  10. Enter your 2Checkout Seller ID (This is your Merchant code and can be found here)
  11. Enter your 2Checkout Buy-Link Secret Word (This is your INS secret word and can be found here)
  12. Set Sandbox to Yes for sandbox mode. For live sales keep Sandbox at No
  13. Set Inline Checkout to Yes to use Inline Checkout. For hosted checkout keep Inline Checkout at No
  14. (Optional) Select your preferred logo if you have one (VirtueMart Images are stored in /images/stories/virtuemart/payment)
  15. Click Save

2Checkout Settings

1.    Sign in to your 2Checkout account
2.    Navigate to the Integrations section → Webhooks & API, and go to the Redirect URL section 
3.    Under Return method, select Header Redirect
4.    Click Update to save your settings

About VirtueMart

VirtueMart is an Open Source E-Commerce solution (a Component or Plug-in) for the Joomla! Content Management System. It can be run as a Shopping Cart, or in Catalog mode. You need to install Joomla! first (as the "Framework"), and then install & configure VirtueMart.

 

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