2Checkout Plugin API Keys Setup Guide

Please check ‘Activate Live Payment Transaction Mode’ settings provided in System Settings > General Settings > Checkout tab before switching to sandbox/production modes. 

To configure this plugin, go to System Settings > Plugins > Regular Payment Methods > 2Checkout > Settings. 

Fig. 1: 2Checkout Plugin Settings (Admin panel)

The 2checkout library provides developers with a simple set of bindings to the 2Checkout Payment API, Hosted Checkout, Instant Notification Service and Admin API. The Yo!Kart system is configured with Hosted Checkout only. 

To configure the keys please follow the below steps - 

  1. Visit https://www.2checkout.com/ which will redirect the admin to the website’s homepage. 

Fig. 2: 2Checkout Homepage

Click on ‘Signup for Free’ to sign up (if not a registered user) or click on ‘Login’ to proceed with a registered account. Please complete the signup process and then try to login. 

  1. Once logged in, the admin will be redirected to the Dashboard page as shown in figure 3 below. 

Fig. 3: 2Checkout Dashboard

  1. Go to Integrations > Webhooks & API from the side-navigation bar. 

Fig. 4: Webhooks & API 

This page includes four tabs. Please stay in the ‘Webhooks & API’ tab. 

  1. Scrolling down, under the API section, the ‘Merchant Code’, ‘Publishable Key’, and ‘Private Key’ are mentioned. 

Fig. 5: API and Secret Word

The ‘Secret Key’ is mentioned in the ‘Secret Word’ section provided below the API section. Please refer to the figure 5 above which highlights the keys that are required for configuration. 

The admin must copy and paste these keys in their settings in the respective input fields (Figure 1). 

  1. Once the keys are configured, scroll down to find the ‘Redirect URI’ section as shown in figure 6. 

Fig. 6: Redirect URL

Select ‘Enable Return After Sale’ check-box. Enter the ‘Approved URL’ as <DOMAIN>/public/index.php?url=twocheckout-pay/callback. Select Header Redirect from the ‘Return Method’ drop-down. Click on the ‘Update’ button to save the changes.