Skip to main content

Add pricing configuration

Overview

Use the addPricingConfiguration method to add a new pricing configuration 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.

PricingConfiguration

Required (object)

 

Use this object to add a new pricing configuration for your account.

ProductCode

Required (string)

 

The code of the produt you assign the configuration to.

Response

bool(true)

Request

<?php

require ('PATH_TO_AUTH');

$PricingConfiguration = new stdClass();
$PricingConfiguration->Default = True;
$PricingConfiguration->Name = 'New Pricing Configuration Through API';
$PricingConfiguration->BillingCountries = array();
$PricingConfiguration->BillingCountries[0] = 'RO';
$PricingConfiguration->BillingCountries[1] = 'DE';
$PricingConfiguration->PricingSchema = 'DYNAMIC';
$PricingConfiguration->PriceType = 'NET';
$PricingConfiguration->DefaultCurrency = 'USD';
$PricingConfiguration->Prices = new stdClass();
$PricingConfiguration->Prices->Regular = array();
$PricingConfiguration->Prices->Regular[0] = new stdClass();
$PricingConfiguration->Prices->Regular[0]->Amount = 69.09;
$PricingConfiguration->Prices->Regular[0]->Currency = 'USD';
$PricingConfiguration->Prices->Regular[0]->MinQuantity = 1;
$PricingConfiguration->Prices->Regular[0]->MaxQuantity = 35;
$PricingConfiguration->Prices->Regular[0]->OptionCodes = array();
$PricingConfiguration->Prices->Regular[0]->OptionCodes[0] = new stdClass();
$PricingConfiguration->Prices->Regular[0]->OptionCodes[0]->Code = 'G77ICHEM1C';
$PricingConfiguration->Prices->Regular[0]->OptionCodes[0]->Options = array();
$PricingConfiguration->Prices->Regular[0]->OptionCodes[0]->Options[0] = 'zh5onfolw7';
$PricingConfiguration->Prices->Regular[0]->OptionCodes[0]->Options[1] = '75rjldfcnz';
$PricingConfiguration->Prices->Regular[0]->OptionCodes[1] = new stdClass();
$PricingConfiguration->Prices->Regular[0]->OptionCodes[1]->Code = 'BAWAQB8LZP';
$PricingConfiguration->Prices->Regular[0]->OptionCodes[1]->Options = array();
$PricingConfiguration->Prices->Regular[0]->OptionCodes[1]->Options[0] = 'r3oi06opvi';
$PricingConfiguration->Prices->Regular[0]->OptionCodes[1]->Options[1] = '76gqbq4bhd';
$PricingConfiguration->Prices->Regular[1] = new stdClass();
$PricingConfiguration->Prices->Regular[1]->Amount = 64.66;
$PricingConfiguration->Prices->Regular[1]->Currency = 'USD';
$PricingConfiguration->Prices->Regular[1]->MinQuantity = 36;
$PricingConfiguration->Prices->Regular[1]->MaxQuantity = 83;
$PricingConfiguration->Prices->Regular[1]->OptionCodes = array();
$PricingConfiguration->Prices->Regular[1]->OptionCodes[0] = new stdClass();
$PricingConfiguration->Prices->Regular[1]->OptionCodes[0]->Code = '8RNXV3T3RE';
$PricingConfiguration->Prices->Regular[1]->OptionCodes[0]->Options = array();
$PricingConfiguration->Prices->Regular[1]->OptionCodes[0]->Options[0] = 'rorqkqnd9p';
$PricingConfiguration->Prices->Regular[1]->OptionCodes[0]->Options[1] = 'aeu89gqdg6';
$PricingConfiguration->Prices->Regular[1]->OptionCodes[1] = new stdClass();
$PricingConfiguration->Prices->Regular[1]->OptionCodes[1]->Code = 'DJYD713MKC';
$PricingConfiguration->Prices->Regular[1]->OptionCodes[1]->Options = array();
$PricingConfiguration->Prices->Regular[1]->OptionCodes[1]->Options[0] = 'y2z2squ7c1';
$PricingConfiguration->Prices->Regular[1]->OptionCodes[1]->Options[1] = 'g74qfskbjg';
$PricingConfiguration->Prices->Renewal = array();
$PricingConfiguration->Prices->Renewal[0] = new stdClass();
$PricingConfiguration->Prices->Renewal[0]->Amount = 7.89;
$PricingConfiguration->Prices->Renewal[0]->Currency = 'USD';
$PricingConfiguration->PriceOptions = array();
$PricingConfiguration->PriceOptions[0] = new stdClass();
$PricingConfiguration->PriceOptions[0]->Code = 'FKQ8CFLYKM';
$PricingConfiguration->PriceOptions[0]->Required = false;
$PricingConfiguration->PriceOptions[1] = new stdClass();
$PricingConfiguration->PriceOptions[1]->Code = 'TH1HKFOTFR';
$PricingConfiguration->PriceOptions[1]->Required = true;


$ProductCode= 'API_Imported_123456';

$jsonRpcRequest = array (
    'jsonrpc' => '2.0',
    'id' => $i++,
    'method' => 'addPricingConfiguration',
    'params' => array($sessionID, $PricingConfiguration, $ProductCode) //Use product ID and not product code for API versions 2.3 and earlier
);

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

?>

Set partner invoice (card payment)

Overview

Use this method to mark the partner invoice that the partner will pay. setProforma works in conjunction with setPaymentDetails and is a prerequisite for payProforma. Call setProforma, then setPaymentDetails and payProforma in this specific order to pay for a Partner Invoice.

You can pay only a single partner invoice at a time.

Requirements

This method requires that a specific partner be set using setPartner.

Parameters

Parameters Type/Description
sessionID Required (String)
  Session identifier, output of the Login method. An exception is thrown if the values are incorrect.
proformaNumber Required (String)
  The unique number of the partner invoice associated with one or more orders.

Response

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

$proformaNumber = 'YOUR_PROFORMA_NUMBER';

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

 

Errors

Error Description

INVALID_PARTNER

No partner is set.

PAYMENT_PROFORMA

You have to use setPaymentDetails first.

PAYMENT_PROFORMA

This is a paid partner invoice.

PAYMENT_ERROR

Authorization error.

 

Mandatory physical product info

Overview  

To configure your tangible products, make sure you have the mandatory information on hand, including name, recurring billing plan, pricing.

Mandatory physical product details 

Attribute Description

Name

Use unique names to identify your products. Localize product names names to increase conversion in different markets.

Product code

Map product identifiers in your system with products in 2Checkout. If you do not supply a product code, 2Checkout generates a random string instead.

Product type

Regular - standalone product.

Bundle - the item is part of a bundle you sell as a standalone product. You need to create at least 2 products before setting up your first bundle.

Default currency

2Checkout defaults to this currency during the purchase process. Note that localized payment methods generally only support a limited number of currencies.

Price type

Possible values:

  • Dynamic pricing (with base price - you do not check 'This product does not have a base price') - Dynamic pricing (with base price) is a basic charge configuration. 2Checkout supports both one-time and recurring dynamic pricing, and offers the possibility to control various cost components through product options pricing. 

  • Static pricing (without base price) This product does not have a base price' - Static pricing (without base price) configurations enable you to control product costs for each possible combination of options available to shoppers in the cart.

Price

Product price per billing cycle. Available only when you don't check the 'This product does not have a base price' option. 

Billing cycle

The interval of time (in days or months) at the end of which either 2Checkout renews the subscription automatically through a recurring charge, or the subscriber purchases a renewal manually.  

Currency conversion

Possible values:

  •  Let 2Checkout auto convert to other currencies during ordering process.
  • Or set price manually per currency.

In case 2Checkout handles your shopper tax management, you are also required to select the Price type, with two possible values:

  • Net - 2Checkout adds VAT or sales tax on top of the product prices during the ordering process. 
  • Gross - 2Checkout deducts VAT or sales tax from the total costs of orders. 

Optional physical product details

 

Attribute Description
Weight Our system allows multiple weight measurement units (ex: pounds, ounces or kilograms).

While you can use your preferred weight unit, we strongly recommend using the same measurement unit globally on your account (for creating shipping methods and in the setup of physical products).

Handling fee

Amount added on top of the product and shipping fees, for each product ordered (ex: if the same product is ordered 3 times, the handling fee is applied 3 times).

The fee can be defined with whole numbers or by using two place decimals (4.95).

Product group

Assign a specific cart design to a product group and all the products it includes will use the template during the purchase process.

Unit limitation

You can limit the number of units sold to only one, preventing shoppers from purchasing more.

Short description

Visible to customers on the Product page, during Up-selling campaigns and to affiliates in their Control Panel.

Long description

Visible to customers on the Product page(web version), during Up-selling campaigns and to affiliates in their affiliate XML feed.

Online bank transfers in Nordic countries

Market overview

With 93% of Sweden's population having Internet access, Swedes have spent 6 billion EUR on online purchases in 2014, out of which 1 billion went to foreign websites and online stores. Statistics show that around 35% of Swedes purchase products from online stores at least once a month. Swedes are also at the top when it comes to selling products online, being the most popular Nordic country to shop products online. Technology adoption contributes directly to the e-commerce market increase, 18% of the population having purchased products online via mobile devices in the last quarter of 2014.

Finland still lags behind Sweden when it comes to the online market, with Finns having spent just over 960 million EUR on foreign websites and online stores in 2014. That's by no means less impressive, considering it accounts for 40% of the entire Finnish e-commerce in the same year, the largest percentage in the Nordic region. 76% of Finns purchased products online in 2014 out of which 20% did it at least once a month. That's 1/5 of the population. When it comes to technologies used during purchase, 10% of Finns used mobile phones and tablets to purchase products online via mobile devices in the last quarter of 2014.

Key payment methods

Both Swedish and Finnish shoppers prefer using debit and credit cards for their purchases, with invoices and bank transfers being the second and third most popular payment methods.

PayPal and other third-party payment service providers are still far behind in terms of broad usage.

What 2Checkout offers

The three largest banking groups in Finland, accounting for 75% of the deposit and credit markets are:

  • Nordea Bank Finland
  • OP-Pohjola Group
  • Danske Bank

In Sweden, the highest online payment coverage is provided by Trustly, an online payment solution supporting online bank payments from all major local banks as well as providing support in:

  • Austria
  • Czech Republic
  • Denmark
  • Estonia
  • Finland
  • Germany
  • Latvia
  • Lithuania
  • Netherlands
  • Spain
  • Sweden
  • UK

2Checkout allows shoppers to pay through Trustly, one of the largest providers of banking services mainly for Nordic countries. Additionally, Trustly supports automatic refunds, helping sellers to reduce the number of complaints at the banks.

Payment method

Availability

Recurring billing support

Nordea Bank Finland

Finland

No

OP-Pohjola

Finland

No

Danske Bank

Finland

No

Trustly

Austria, Czech Republic, Denmark, Estonia, Finland, Germany, Latvia, Lithuania, Netherlands, Slovakia, Spain,  Sweden, UK.

No

By enabling online payments in Sweden and Finland, 2Checkout helps you increase your market share with more than 20% in both countries and benefit from higher conversion rates.

Restrict access to the Merchant Control Panel

Overview

Restrict access to the Merchant Control Panel only for specific IPs or IP ranges and increase the security of your account. By default, 2Checkout account users can access the Merchant Control Panel from any IP.

Availability

All 2Checkout accounts.

How to restrict access to the Merchant Control Panel

  1. Log in to your Merchant Control Panel.
  2. Navigate to the Settings cogwheel in the upper right corner and click on User Management.

restrict user access in Merchant Control Panel_1.png

3. On the User Management page, click on the Restrict access tab.

restrict user access in Merchant Control Panel_2.png

4. On the Restrict access page, click on the Add IP filter button.

5. Specify a static IP address or a range of IP addresses in the iFrame window.

6. Apply the restriction to all or only to selected Merchant Control Panel users. 

7. Click on the Add filter button to save the setting.

restrict user access in Merchant Control Panel_3.png

8. On the Restrict access page, click on the Activate button to enable the IP filtering system.

restrict user access in Merchant Control Panel_4.png

 

Remove sources

Overview

Use the deletePromotionSources method to define new sources for an existing promotion.

Parameters

Parameter Type/Description

sessionID

Required (string)

 

Output of the Login method.

promotionCode

Required (string)

 

The code corresponding to the promotion that you want to remove sources from.

promotionSources

Required (string array)

 

Array of strings defining the promotion sources to be removed.

Response

Parameter Type/Description

Status

Boolean

 

True or false

Request

<?php

require ('PATH_TO_AUTH');

// Promotion code corresponding to the promotion you want to remove sources from
$promotionCode = '';

// Sources array with the source values 
$sources = ['source1', 'source2'];

try {
    $updatedPromotion = $client->deletePromotionSources($promotionCode,$sources);
}

catch (SoapFault $e) {
    echo "UpdatedPromotion: " . $e->getMessage();
    exit;
}

var_dump("UpdatedPromotion", $updatedPromotion);

 

Retrieve partner pricing lists

Overview

Get information about all the pricing lists available to a specific partner and which can be used for a new purchase.

Requirements

Parameters

Parameter Type/Description
sessionID String (Int)
  Session identifier, which is the output of the Login method. An exception will be thrown if the values are incorrect

Response

Parameter Type/Description
SimplePricingList Array of Objects
  An array of pricing list objects with the structure described below.

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

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

Errors

Error Description

INVALID_PARTNER

No partner is set

PARTNER_PRICING_LISTS_NOT_FOUND

There are no pricing lists with provided code.

 

Retrieve an order

Overview

Use the getOrder method to retrieve details on a specific order placed with dynamic product information, or catalog products, using the unique, system generated reference.

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.

orderReference

Required (string)

 

Order reference number of older order, which is already approved/paid.

Response

Parameters Type/Description

Order information

Object (orders with catalog products)

Order information Object (orders with dynamic product information)

Request 

<?php

require ('PATH_TO_AUTH');

$orderReference = 'YOUR_ORDER_REFERENCE';

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

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

 

A/B testing scenarios for up-selling campaigns

Overview

Set up A/B testing scenarios for up-selling campaigns to identify the most efficient up-selling placement.

Requirements & limitations

  1. Up-selling placements applied through the UPSELL_DISPLAY_TYPE parameter directly into the URL are not taken into account in the A/B test.
  2. You need to activate the up-selling campaigns before you can use them in the A/B tests.

Important

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

Setup

  1. Go to the Upselling page and define the upselling campaigns that you want to test.
  2. Activate the up-selling campaigns that you want to use in your test.
  3. Navigate to the A/B Testing page and click the Campaigns tab.
  4. Scroll to the Up-selling campaign placement section and click Edit Campaign on an inactive campaign.If you don't have any existing campaigns, click the Configure new campaign button.
  5. 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. Make sure to select the up-selling campaign to run the tests on from the Up-selling campaign drop-down menu.
  6. Create a new scenario by selecting an up-selling placement style. You can choose between Interstitial webpage and Overlay window.
  7. Click Add Scenario.
  8. Repeat steps 6 and 7 until you have used the entire available traffic.
  9. Click Save campaign.
  10. Go back to the Campaigns tab and click Start Campaign when you want the campaign to begin.

What up-selling campaigns are being used in my A/B tests?

When you open an up-selling campaign's configuration page, a notification informs you if the campaign is being used in an A/B test at that moment.

Pay partner invoice (card payment)

Overview

Pay a partner invoice that was set using setProforma. Works in conjunction with setProforma and setPaymentDetails. Call setProforma, then setPaymentDetails and payProforma in this specific order to pay for a partner invoice.

Requirements

This method requires that a specific partner be set using setPartner.

You also need to use setProforma to mark a partner invoice for payment, and specify the payment method with setPaymentDetails.

Parameters

Parameter Type/Description
sessionID Required (String)
  Session identifier, output of the Login method. An exception is thrown if the values are incorrect.

Response

Parameter Type/Description
result Boolean
  True or false.

Request

<?php

require ('PATH_TO_AUTH');  // Authentication example: https://knowledgecenter.avangate.com/Integration/Channel_Manager_API/JSON-RPC/02Authentication
require ('PATH_TO_setPartner'); // setPartner example: https://knowledgecenter.avangate.com/Integration/Channel_Manager_API/JSON-RPC/06Reference/Partner/00Set_partner
require ('PATH_TO_setProforma'); // setProforma example: https://knowledgecenter.avangate.com/Integration/Channel_Manager_API/JSON-RPC/06Reference/14Billing/00Capture_card_payment/00Set_partner_invoice
require ('PATH_TO_setPaymentDetails'); // setPaymentDetails example: https://knowledgecenter.avangate.com/Integration/Channel_Manager_API/JSON-RPC/06Reference/14Billing/00Capture_card_payment/02Set_partner_invoice_payment_details

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

Errors

Error Description

INVALID_PARTNER

No partner is set.

PAYMENT_PROFORMA

You must use setPaymentDetails first.

PAYMENT_PROFORMA

This is a paid partner invoice.

PAYMENT_ERROR

Authorization error.

 

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