Skip to main content

How do I know what type of 2Checkout account I have?

Overview

If you are not sure or you don't remember what type of account you have on the 2Checkout platform, you can find this information in your Merchant Control Panel.

Availability

The information about the account type is available for all merchants who signed a contract with 2Checkout.

How to find your 2Checkout account type

To find out what type of account you have on the 2Checkout platform, follow these steps:

1. Log in to your Merchant Control Panel.

2. Navigate to the cogwheel in the top-right corner and click on Settings, as shown below.

account_type_1.png

3. On the Account Settings page, scroll down to the Account Information section and click on the Edit details button.

account_type_2.png

4. On the Account Information page, scroll down to the Account documents section and click on the PDF to open/download it. The PDF is the contract you signed with 2Checkout and includes the information about your account type, as well as details about margins and fees that apply to your account.

account_type_3.png

 

 

 

Assign to another customer

Overview

Use the setSubscriptionCustomer method. 2Checkout moves subscription under the customer for which you provide the 2Checkout customer reference or the External customer reference during the subscription update process.

json_diagram.png

Requirements

To move a subscription from a source customer to a target customer:

  • Use 2Checkout customer references or External customer references belonging to the target customer. 2Checkout re-assigns the subscription to the target customer. 
  • Customer references must be valid and associated to the target customer entity under which you move the subscription.
  • If you provide both the 2Checkout customer reference and External customer reference they need to belong to the same target customer entity.

Parameters

Parameters Type/Description

sessionID

Required (string)

 

Session identifier, the output of the Login method. Include sessionID into all your requests. 2Checkout throws an exception if the values are incorrect.  The sessionID expires in 10 minutes.

avangateCustomerReference

Required (int)

 

System-generated customer reference. Required unless you prefer to use ExternalCustomerReference.

externalCustomerReference

Optional (string)

 

External customer reference that you control. Optional when you use AvangateCustomerReference. If you include it, it needs to belong to the same customer as the AvangateCustomerReference.

Response

Parameters Type/Description

Boolean

true or false depending on whether the changes were successful or not.

Request

<?php

require ('PATH_TO_AUTH');

$subscriptionReference = 'YOUR_SUBSCRIPTION_REFERENCE';
$customerReference = CUSTOMER_REFERENCE;

$jsonRpcRequest = array (
'method' => 'setSubscriptionCustomer',
'params' => array($sessionID, $subscriptionReference, $customerReference),
'id' => $i++,
'jsonrpc' => '2.0');

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

Retrieve product information by code

Overview

Extract information about a product from the Avangate system using its unique ID and the code of the pricing list to which it is assigned to.

Requirements

Parameters

Parameter Type/Description
sessionID Required (string)
  Session identifier, which is the output of the Login method. An exception will be thrown if the values are incorrect.
productCode Required (string)
  The unique product identifier from your system.
pricingListCode Required (string)
  The unique identifier of the pricing list.

Response

Parameter Type/Description
ProductInfo Complet object
  Complex object containing arrays of SimpleProduct and PriceOptions objects.

Request

<?php

require ('PATH_TO_AUTH');  // Authentication example: https://knowledgecenter.avangate.com/Integration/Channel_Manager_API/JSON-RPC/02Authentication
require ('PATH_TO_SET_PARTNER'); // setPartner example: https://knowledgecenter.avangate.com/Integration/Channel_Manager_API/JSON-RPC/06Reference/Partner/00Set_partner

$productCode = 'YOUR_PRODUCT_CODE';
$pricingListCode = 'YOUR_PRICING_LIST_CODE';

$jsonRpcRequest = array (
'jsonrpc' => '2.0',
'id' => $i++,
'method' => 'getProductByCode',
'params' => array($sessionID, $productCode, $pricingListCode)
);
var_dump (callRPC((Object)$jsonRpcRequest, $host));

Errors

Error Description

INVALID_PARTNER

No partner is set.

INVALID_PRODUCT

Provide a valid product ID.

INVALID_PRICING_LIST_CODE

Provide a valid pricing list code.

PARTNER_PRICING_LISTS_NOT_FOUND

There are no pricing lists with the provided code.

PRODUCT_NOT_FOUND

There is no product with this ID in the given pricing list.

 

Retrieve all configurations

Overview

Use the getPricingConfigurations method to extract information on the pricing configurations you set for a product.

Parameters

Parameters Type/Description

sessionID

Required (string)

 

Session identifier, the output of the Login method. Include sessionID into all your requests. 2Checkout throws an exception if the values are incorrect.  The sessionID expires in 10 minutes.

ProductCode

Required (string)

 

The editable code that you control at product-level, not the unique, system-generated product ID.

Response

Parameters Type/Description

PricingConfiguration

Array of objects

Request

<?php

require ('PATH_TO_AUTH');

$productCode = 'YOUR_PRODUCT_CODE';

$jsonRpcRequest = array (
'jsonrpc' => '2.0',
'id' => $i++,
'method' => 'getPricingConfigurations',
'params' => array($sessionID, $productCode)
);
var_dump (callRPC((Object)$jsonRpcRequest, $host));

?>

Email notifications for proposal without Net terms

Overview

The email notifications sent by the CPQ app on new acquisition with immediate payment (without Net terms) are triggered when a new proposal is created.

Customer Email Notifications

When a new proposal is created as a new acquisition, and the Net terms option is not selected in CPQ, the following scenarios are possible when it comes to customer communication.

Scenario 1

If the salesperson fills in CPQ the same information for both delivery (sellTo) and billing (billTo), the customer will receive an email with the subject “<Merchant name> sent you a proposal”, when the proposal is sent.

The email contains a link for the Proposal UI and calls to review, accept, and conclude the proposal by making the payment.

The email type “Proposal Sent” can be found in the Merchant Control Panel’s email editor, under Shopper emails → Proposal tab, and will be customizable, similar to the other shopper emails.

proposal email cpanel.png

The email type “Proposal Sent” is displayed in the Merchant Control Panel only if the CPQ feature is enabled on the merchant’s account.

Scenario 2

If the salesperson fills in different information for the delivery (sellTo) and for billing (billTo) in the CPQ app, then these events will take place when the proposal is sent:

The “Proposal Sent” email will be sent to the delivery information (sellTo).

  • The email contains a link to Proposal UI and calls to review and accept the proposal.

After the proposal is accepted, a “Proposal Accepted” email is sent to the billing information (billTo) available on the proposal.

  • The subject of the email is “Pending payment for <merchant name> proposal”.
  • The email contains a link to the Proposal UI and calls to finalize the payment for that specific proposal.
  • The “Proposal Accepted” email can be found in the Merchant Control Panel’s email editor, under Shopper emails → Proposal tab, and will be customizable, similar to the other shopper emails.

proposal email cpanel_accepted.png

The “Proposal Accepted” email is displayed in the Merchant Control Panel only if the CPQ feature is enabled on the merchant’s account.

Retrieve order subscription references

Overview

List the references associated with the subscription generated for an order.

Requirements

Parameters

Parameter Type/Description
sessionID Required (String)
  Session identifier, output of the Login method. An exception is thrown if the values are incorrect.
refNo Required (String)
  The unique identifier of an order from the Avangate system.
pageNo Optional (Int)
 

Break down the subscription information using pagination into groups of 50 items (PartnerSubscription objects) per page.

Example values:

  • 1 - the first 50
  • 2 - the next 50
  • 3 - the next 50

Can be NULL.

Response

Parameter Type/Description

PartnerSubscription

Array of objects

 

Details below

 

SubscriptionReference

String

 

 

The unique reference associated with a subscription generated for a product included in a partner order.

 

HasEndUserInformation

Boolean

 

 

True or false, depending on whether end user information is attached to the subscription.

 

RegistrationStatus

String

 

 

Possible values:

  • Not registered
  • Registered

 

RegistrationEmails

String

 

 

The email used by the end user in the registration process. Can be NULL.

 

FullfilmentStatus

String

 

 

Fulfillment status possible values:

  1. DELIVERED - Order was fulfilled/delivered.
  2. NOT_DELIVERED - Fulfillment is blocked due to various reasons including lack of payment/credit, missing reseller/end user details.
  3. NO_DELIVERY_REQUIRED - No fulfillment confirmation is required.
  4. VENDOR_CONFIRMED_DELIVERY - Fulfillment has been confirmed.
  5. VENDOR_DELIVERY_CONFIRMATION_REQUIRED - You need to confirm fulfillment.

Request

<?php

require('PATH_TO_AUTH'); // Authentication example: https://knowledgecenter.avangate.com/Integration/Channel_Manager_API/SOAP/02Authentication
require('PATH_TO_setPartner'); // setPartner example: https://knowledgecenter.avangate.com/Integration/Channel_Manager_API/SOAP/06Reference/Partner/00Set_partner

$refNo = 'YOUR_ORDER_REFERENCE';

try {
    $SubscriptionsGenerated= $client->getOrderSubscriptions ($sessionID, $refNo, $pageNo);
} catch (SoapFault $e) {
    Echo "Subscriptions: " . $e->getMessage();
    exit;
}
var_dump ("Subscriptions ", $SubscriptionsGenerated);

Errors

Error Description

NOT_FOUND_PARTNER

A partner must be set first.

EMPTY_ORDER_REFERENCE

Order reference not provided.

INVALID_REFERENCE

Invalid order reference.

 

Create a new customer

Overview

Use the createCustomer method to add the details of a customer entity into the Avangate system. By default, customer status is Inactive until you assign a specific subscription to the customer. Following that action, customer status reflects the status of the attached subscription(s).

Parameters

Parameters

Type/Description

sessionID

Required (string)

 

Session identifier, the output of the Login method. Include sessionID into all your requests. Avangate throws an exception if the values are incorrect.  The sessionID expires in 10 minutes.

Customer

Object

Response

AvangateCustomerReference

Int

 

System-generated customer reference.

Request


<?php
 
 
function callRPC($Request, $hostUrl, $Debug = true) {
    $curl = curl_init($hostUrl);
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, 0);
    curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, 0);
    curl_setopt($curl, CURLOPT_SSLVERSION, 0);
    curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
    curl_setopt($curl, CURLOPT_HTTPHEADER, array('Content-Type: application/json', 'Accept: application/json'));
    $RequestString = json_encode($Request);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $RequestString);
 
 
    if ($Debug) {
        $RequestString;
    }
    $ResponseString = curl_exec($curl);
    if ($Debug) {
        $ResponseString;
    }
 
    if (!empty($ResponseString)) {
        $Response = json_decode($ResponseString);
        if (isset($Response->result)) {
            return $Response->result;
        }
        if (!is_null($Response->error)) {
            var_dump($Request->method, $Response->error);
        }
    } else {
        return null;
    }
}
 
$host = 'https://api.avangate.com/rpc/3.0/';
 
$merchantCode = "YOUR_MERCHANT_CODE";// your account's merchant code available in the 'System settings' area of the cPanel: https://secure.avangate.com/cpanel/account_settings.php
$key = "YOUR_SECRET_KEY";// your account's secret key available in the 'System settings' area of the cPanel: https://secure.avangate.com/cpanel/account_settings.php
 
$string = strlen($merchantCode) . $merchantCode . strlen(gmdate('Y-m-d H:i:s')) . gmdate('Y-m-d H:i:s');
$hash = hash_hmac('md5', $string, $key);
 
$i = 1; // counter for api calls
// call login
$jsonRpcRequest = new stdClass();
$jsonRpcRequest->jsonrpc = '2.0';
$jsonRpcRequest->method = 'login';
$jsonRpcRequest->params = array($merchantCode, gmdate('Y-m-d H:i:s'), $hash);
$jsonRpcRequest->id = $i++;
 
$sessionID = callRPC($jsonRpcRequest, $host);
 
var_dump($sessionID);
$newCustomer = new stdClass();
$newCustomer->AvangateCustomerReference = null;
$newCustomer->ExternalCustomerReference = 'ThisIsATestReference123456';
$newCustomer->FirstName = 'NewCustomer';
$newCustomer->LastName = 'NewCustomerLastName';
$newCustomer->Company = null;
$newCustomer->FiscalCode = null;
$newCustomer->Address1 = 'Address';
$newCustomer->Address2 = null;
$newCustomer->City = 'LA';
$newCustomer->Zip = '90210';
$newCustomer->CountryCode = 'us';
$newCustomer->Phone = null;
$newCustomer->Fax = null;
$newCustomer->Email = 'newcustomer@email.com';
$newCustomer->ExistingCards = null;
$newCustomer->Enabled = null;
$newCustomer->Trial = null;
$newCustomer->Language = 'en';

$jsonRpcRequest = array (
'method' => 'createCustomer',
'params' => array($sessionID, $newCustomer),
'id' => $i++,
'jsonrpc' => '2.0');

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

Retrieve SKU code by details

Overview

Use the getSKUCodeByDetails method to retrieve an SKU based on its included details.

Parameters

Parameters Type/Description

sessionID

Required (string)

 

Session identifier, the output of the Login method. Include sessionID into all your requests. Avangate throws an exception if the values are incorrect. The sessionID expires in 10 minutes.

 skuDetailsObject

Object

 

Details below

 

PricingConfigurationCode

Required (string)

 

 

Unique identifier of the pricing configuration.

 

Currency

Optional (string)

 

 

ISO currency code.

 

PurchaseType

Optional (string)

 

 

Purchase type identifier. Possible values:

  • NEW_PRODUCT
  • RENEWAL
  • UPGRADE

 

PriceOptions

Optional (stringArray)

 

 

Array of price options names.

 

Quantity

Optional (int)

 

 

Numeric identifier of product quantity.

Response

{SKUCode} // eg: SKU-EUR-1-10-N-A

Request

<?php
require ('PATH_TO_AUTH');

$skuDetailsObject = new \stdClass();
$skuDetailsObject->PricingConfigurationCode = 'YOUR_CODE';
$skuDetailsObject->Currency = 'USD';
$skuDetailsObject->PurchaseType = 'NEW_PRODUCT';
$skuDetailsObject->PriceOptions = ['A'];
$skuDetailsObject->Quantity = 1;

$jsonRpcRequest = new stdClass();
$jsonRpcRequest->jsonrpc = '2.0';
$jsonRpcRequest->method = 'getSKUCodeByDetails';
$jsonRpcRequest->params = array($sessionID, $skuDetailsObject);
$jsonRpcRequest->id = $i++;

$getSkuCodeByDetails = callRPC($jsonRpcRequest, $host);
var_dump($getSkuCodeByDetails);

Retrieve all additional fields

Overview

Use the getAdditionalFields method to extract information about additional fields you set up for your account.

Parameters

Parameters Type/Description

sessionID

Required (string)

 

Session identifier, the output of the Login method. Include sessionID into all your requests. 2Checkout throws an exception if the values are incorrect.  The sessionID expires in 10 minutes.

Response

Parameters Type/Description

AdditionalFields

Array of objects

Request

<?php

require ('PATH_TO_AUTH');

$jsonRpcRequest = array (
'jsonrpc' => '2.0',
'id' => $i++,
'method' => 'getAdditionalFields',
'params' => array($sessionID)
);
var_dump (callRPC((Object)$jsonRpcRequest, $host));


A/B testing campaigns for Download Insurance Service

Overview

Set up A/B testing campaigns for Download Insurance Service to identify the best way to offer DIS to your shoppers.

Requirements & limitations

The DIS A/B test will only be available if DIS is active for your account.

Important

When the shopper places the order, the test is considered successful regardless of the order or payment status.

Setup

  1. Navigate to the A/B Testing page and click the Overview tab.
  2. Click the New campaign button in the Download Insurance Service options section. If you already have an unfinished campaign, click Edit.
  3. Fill in the details of the new campaign, such as the campaign name, maximum number of tests and the date when the campaign should end.
  4. Add the test variations by allocating traffic to each of them and selecting the desired DIS options.

  1. Click Add variation.
  2. Repeat steps 4 and 5 until you have used the entire available traffic.
  3. Click Save campaign.
  4. Go back to the Overview tab and click the Start Campaign button when you want the campaign to begin.

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