Skip to main content

Retrieve pricing list information

Overview

Get the extended info about the pricing list available for a partner, including the products and their pricing options, based on the pricing list code.

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
pricingListCode Required (string)
  The unique identifier of the pricing list.

Response

Parameter Type/Description
PricingList Object

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

$pricingListCode = 'YOUR_PRICING_LIST_CODE';

try {
    $PartnerPricingListInfo= $client->getPricingListInformation ($sessionID, $pricingListCode);
} catch (SoapFault $e) {
    echo "PricingLists: " . $e->getMessage();
    exit;
}
var_dump ("PricingLists", $PartnerPricingListInfo);

Error

Error Description
INVALID_PARTNER No partner is set.
PARTNER_PRICING_LISTS_NOT_FOUND There are no pricing lists with provided code.

Retrieve assigned additional fields

Overview

Use the getAssignedAdditionalOrderFields method to extract information about the additional fields assigned to a specific product.

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.

productCode

Required (string)

 

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

Request

<?php

require ('PATH_TO_AUTH');

$productCode = 'YOUR_PRODUCT_CODE';

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

?>

Response

Parameters Type/Description

AdditionalField

Array of objects

Configure shipping methods

Overview

If you plan to offer tangible products via 2Checkout you will need to create at least one shipping method. Read below to learn how you can create a shipping method right from your 2Checkout Merchant Control Panel account.

Create a shipping method

To create a shipping method, follow these steps:

  1. Log in to your Merchant Control Panel account.
  2. Navigate to Setup → Fulfillment, and click on the Shipping methods tab.
  3. In the Add new shipping method area, fill in the following info:
    • Name (mandatory) - This name will be displayed to customers when the shipping method is available for them to select, so you may want to make it fairly descriptive.
    • Tracking URL (optional) - If you will be shipping by a method that will provide tracking numbers, you may want to list the URL at which the tracking numbers may be traced in the Tracking URL field. The URL provided for the shipping method will be included in the shipment confirmation email that can be sent to the customer when the order is marked as shipped.

Click Add to save your shipping method. After saving your work, you are directed to the Edit shipping method page, from where you can perform additional changes.

Countries setup

The Countries section is used to specify what countries a shipping method applies to. Possible configurations are:

  • All Trusted Countries - Ship to all supported countries.
  • Home Country Only - Ship only within your home country.
  • Custom List -  Select specific countries that your shipping method will be used for.
If a buyer is not located within any of the countries for which the shipping method applies, there will be no shipping options available to them during the ordering process.

Example (Custom list): In this example, only 4 countries are added to the shipping method. 

shipping method countries.png

Use the Search bar when looking for countries to add in your shipping method configuration.

Pricing setup

The options in the Pricing section decide how the cost of your shipping method will be calculated. Possible price configurations are:

  • Free - Creates a shipping method with a base price of ’0.00′. The shipping method will show ‘Free’ in the price column at checkout. No weight or order total surcharges can be added to 'Free' shipping methods, however, the handling fee set at product level 'will apply.
  • Priced - Opens more advanced pricing schemes. Use this option to charge a higher shipping fee based on several factors (country, weight, order amount) or a combination of those factors. The handling fee set at the product level will also apply with this method if they are designated for products included in the order.

Advanced pricing setup

If you selected the pricing option 'Priced' you will be presented with a menu for defining the shipping method surcharge.

Enter a Base Price for your shipping method, in your preferred currency. The Base Price will always be charged on shipping methods that are assigned one regardless of any other surcharges set up for the method. 

Fixed shipping fee

If you selected 'Priced' for your pricing scheme, and only fill in a base price, this will be the flat-rate shipping charge that is used to calculate shipping. Your Base Price can be 0.00 but cannot be a negative value.

Example (fixed price): In this example, the shipping method has a fixed price of $10, and is not affected by customer delivery country, product weight or order total.

fixed price _ shipping.png

Surcharge based on the delivery country

To add surcharges based on customer delivery country, mark the Delivery countries checkbox. You will see displayed a list of the countries added in your shipping method, and you have the possibility to define a surcharge for each individual country. The surcharge currency is the one defined for the base price.

Example (surcharge based on country): In this example, each of the 4 countries added in the shipping method has a surcharge assigned. As the base price defined is $0, only the surcharge amount will be displayed to customers as the shipping method fee in the cart.

delivery_shipping.png

Surcharge based on the total weight

To add surcharges based on the total order weight, mark the Total weight checkbox.

To create a new weight threshold click Add surcharge and specify an amount to be charged if the order weight is under or equal to the maximum weight you define. For example, if you create a surcharge for 10 kg at $5 and 20 kg at $10 and the order weighs 8 kg the shipping surcharge will be $5 plus your base price. If the order weight is 11 kg, the surcharge will be $10 plus your base price.

Keep in mind is that our system allows any measurement unit (ex: kilos, ounces, or pounds) so long as all weights are designated in that measurement. Feel free to use your preferred weight measurements so long as you use them globally for your account.

 

Example (surcharge based on weight): In this example, there are 3 weight thresholds set. If the total order weight is lower than 10 kg, the surcharge added is $5.

For a total order weight between 10.01 - 20.00 kg, the surcharge amount added is $10. A total order weight between 20.01 and 30.00 kg will lead to the display of a $15 fee in the cart. According to the setup, we apply a $5 overcharge per additional unit over 30.00 kg. For instance, a total order weight of 31.00 kg will see a surcharge of $20, while a total order weight of 32.00 kg will have a surcharge of $25.

total_weight_shipping.png

Surcharge based on order total amount

To add surcharges based on the total order amount, mark the Order total checkbox. 

To create a new order total threshold click Add surcharge and specify an amount to be charged if the order total is under or equal to the maximum amount you define.

Example (surcharge based on amount): In this example, there are 4 total amount thresholds set. If the total order amount is lower than $10, the surcharge added is $5.

As your customers continue to spend more on their orders, the shipping surcharge decreases, with the final threshold of $1 for orders that are above $30.

order total_shipping.png

 

Add coupon

Overview

Use the addPromotionCoupon method to add single or multiple coupons to a 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 add coupons to.

promotionCoupon

Required (object)

 

type

Required (string)

 

 

Coupon type. Available values:

  • SINGLE, use in conjunction with Code
  • MULTIPLE, use in conjunction with Codes

 

Code/Codes

Required (string / array of strings)

 

 

Coupon code (for SINGLE) or array of coupon codes (for MULTIPLE).

Response

Parameter Type/Description
promotionCoupon Object

Request

<?php

require ('PATH_TO_AUTH');

// Promotion code corresponding to the promotion you want to add coupons to
$promotionCode = '';

// Define single coupon object
$promotionCoupon = new stdClass;
$promotionCoupon->Type = 'SINGLE';
$promotionCoupon->Code = 'YOUR_CODE_HERE';

// Define multiple coupon object
$promotionCoupon = new stdClass;
$promotionCoupon->Type = 'MULTIPLE';
$promotionCoupon->Codes = ['YOUR_CODE_1', 'YOUR_CODE_2'];

try {
    $updatedPromotion = $client->addPromotionCoupon ($sessionID, $promotionCode, $promotionCoupon);
}

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

var_dump("UpdatedPromotion", $updatedPromotion);

 

Retrieve partner reseller list

Overview

Use this method to retrieve a list of resellers defined and stored for one of your partners.

Requirements

This method requires you to set a specific partner using setPartner.

Parameters

Parameters 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.

Response

Parameter Type/Description
Reseller Array of reseller objects.

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

try {
    $Resellers= $client->getPartnerResellers ($sessionID);
} catch (SoapFault $e) {
    Echo "AllResellers: " . $e->getMessage();
    exit;
}
var_dump ("AllResellers ", $Resellers);

Errors

Error Description

NOT_FOUND_PARTNER

Set a partner before calling this method.

 

Set the customer reference in the InLine Cart

Overview

Use the Cart object to set customer reference to the InLine Cart by calling theTwoCoInlineCart.cart.setCustomerReference(customer-reference)method.

Use case

  1. Add an HTML link or button in your page like the one below.
  2. Create a JavaScript click handler to execute the Inline Client desired methods.
  3. Use theTwoCoInlineCart.products.add({code, quantity, options})method to prepare your catalog product.
  4. In order to set currency use TwoCoInlineCart.cart.setCurrency(currency-code).
  5. In order to set order external reference useTwoCoInlineCart.cart.setCustomerReference(customer-reference)method.
  6. You can see below a signature token request payload for this example. A success response contains a JSON with the property “signature“ which needs to be used at the next step to set the signature using the TwoCoInlineCart method.
{
    "merchant": "AVLRNG",
    "currency": "USD",
    "reference": {
        "customer": "test-customer-ref"
    },
    "products": [
        {
            "code": "74B8E17CC0"
        }
    ]
}

The above payload will generate the signature b8c419f437a1b13065d191b8a0e124433d195d086a38448a67f126d01ffe7ad2.

7. Use the TwoCoInlineCart.cart.setSignature('b8c419f437a1b13065d191b8a0e124433d195d086a38448a67f126d01ffe7ad2') method to set the signature.

8. Use theTwoCoInlineCart.cart.checkout()method to show the cart on your page.

Sample request

HTML

<a href="#" class="btn btn-success" id="buy-button">Buy now!</a>

Javascript

window.document.getElementById('buy-button').addEventListener('click', function() {
  TwoCoInlineCart.cart.setCurrency('USD');
  TwoCoInlineCart.products.add({
    code: "74B8E17CC0"
  });
  TwoCoInlineCart.cart.setSignature('b8c419f437a1b13065d191b8a0e124433d195d086a38448a67f126d01ffe7ad2');
  TwoCoInlineCart.cart.setCustomerReference('test-customer-ref');
  TwoCoInlineCart.cart.checkout();
});

Demo

After setting the customer reference in the InLine cart using the above method, your cart should look like this:

 

Local payments in Japan - JCB

Overview

Japan is a large eCommerce market, given the high internet penetration rate and the large urban population. 75% of the over 127 million Japanese have purchased products online at least once. The latest studies show that nearly 90% of them have placed orders from mobile devices, such as smartphones and tablets.

ECommerce transactions in Japan have surpassed $100B in 2014, most of the electronic transactions taking place in the local market, with less than 20% of online shoppers buying products from abroad.

Japanese shoppers have spent $1.8B in purchasing products from businesses located in the US and China. Merchants selling to shoppers in the US and China have exported products amounting to roughly $1.4B and $0.5B respectively. Following the US and China, the biggest markets for Japanese merchants are South Korea and Thailand.

Japanese is the official language, with more than 125 million speakers, making localization a key element in the Japanese eCommerce scenery.

Related links

Key payment methods

When it comes to preferred payment methods, credit and debit cards are the payment methods of choice, with 71% of transactions. Cash and convenience store payments are the second most used payment method, totaling 18% of transactions. Other payment methods, including Direct Debit, amount to only 11% of the total number of transactions.

Payment methods Japan

Japan is no stranger to mobile payments either, being one of the first countries to introduce advanced electronic payment methods. The most popular mobile payment methods include smartcard chips and corresponding Java applications that link together mobile credit cards and e-money.

Visa and MasterCard are the two most popular card schemes used by Japanese shoppers, followed by JCB, American Express, and other payment methods.

Alternative payment methods used by Japanese shoppers include:

  • Bank transfers
  • Cash
  • Mobile Suica - mobile payment system used in Japan's biggest cities
  • PayPal
  • Yahoo! Easy payment - online payment service used on Yahoo! Japan Auctions

What 2Checkout offers

As of September 2011, over 70 million Japanese JCB cardholders were generating 9,600 billion yen in transactions annually. JCB holds a 40% market share in the Japanese credit card industry with no less than 56 million JCB cards in circulation.

In addition to Visa/MasterCard support, 2Checkout offers support for JCB.

With over 25% of all Japanese 2Checkout transactions having been paid with JCB, supporting this payment method is highly important for merchants wanting to penetrate the Japanese eCommerce market.

Besides payment processing, 2Checkout also covers support and legal issues:

  • Customer support: +81 (0)3-4579-0155
  • Risk and anti-fraud management
  • Tax compliance

Customize recurring charges

Overview

Customize the value of upcoming recurring charges at the subscription level. Custom next billing amounts take precedence over per-product pricing options you set up.

Custom subscription pricing enables you to easily control the costs that existing customers incur when they renew their subscriptions, as well as the associated number of recurring billing cycles.

Using Custom subscription pricing you'll be able to:

  • Reward customer loyalty with lower, differentiated prices.
  • Provide incentives for customers to prolong their subscriptions.
  • Reduce or increase price on-demand and benefit from granular control over the pricing of not just products but the subscriptions generated for your offerings.

Availability

All 2Checkout accounts. 

Subscriptions pricing user rights

To enable access to this functionality for users of your account, navigate to Account settings, and select Manage user access. Click on the Roles associated to specific accounts, and make sure that the checkbox next to the Subscriptions pricing option under Orders & Reports is checked.

Requirements

Custom subscription pricing can be used only in conjunction with auto-renewable and manually-renewable subscriptions that are Active. Lifetime subscriptions, those generated for products with the renewal system disabled and without a next recurring billing interval do not feature the custom pricing option.

You won't be able to set a custom price for canceled/ disabled and expired subscriptions. Past due subscriptions, those in the grace period are considered Expired.

Change the next billing amount of a subscription

Depending on the per-product pricing configuration, custom billing value can represent the net or the gross costs that customers incur. Essentially, the custom billing settings are designed to match the per-product pricing configuration.

  1. Navigate to the Subscriptions page under Orders & customers, and run a search to identify the customer for which you wish to modify the price of a subscription.

  2. Edit the subscription and click on the Current billing amount link.

  3. Hit the Update button and enter the custom next billing amount. This is either the net or gross value that the customer will be billed at least on the next subscription renewal billing cycle, or for several billing cycles, depending on the pricing configuration set for the product purchased by the customer. The options on this pop-up enable you to apply a custom price to:

    • All billing cycles

    • A limited number of billing cycles you control

Also, add a note along with the price modification if there is any information you'd like saved for the subscription.

4. Hit Save and the price change will immediately come into effect, although customers are only impacted on the next billing cycle.

When the number of billing cycles for which a custom price was defined expires, 2Checkout calculates the costs of future subscription renewals according to product pricing configuration.

Next billing amount update notifications

The 2Checkout system automatically sends out emails to end-users of subscriptions for which you're introducing changes impacting the billing amount. The notification is designed to provide information on the modification made, providing details on:

  • The new billing amount
  • The next billing date
  • The previous billing amount
  • The period of validity of the new billing amount

Currencies

The next billing amount currency is the same as that of the initial purchase and is used by 2Checkout for recurring charges. The subscription renewal billing currency can differ from the subscription value currency, which coincides with the settlement currency set for your account.

Allow customers to change pricing options on subscription renewal

Allow your customers to change the pricing options when manually renewing their subscriptions, to increase the flexibility of the renewal process.

Follow the steps below:

  1. Go to Setup -> Products.
  2. Click Edit on the product for which you would like to permit this behavior.
  3. Go to the Renewal tab.
  4. Under Product options, check the Change product options and quantity during manual renewal option.

After enabling this option, an edit pricing options link will be available on the checkout page. Subscription renewal price is calculated each time shoppers change the selected pricing options for a subscription, as depicted in the example below:

subscription.png

 
Customers cannot change the pricing options on manual renewals with custom prices set via the renewal URL.

Custom prices override product prices

Prices defined per subscription take precedence and override per-product pricing strategies, as well as any discounts configured. 

Subscription history

Per-subscription price changes are logged in the Subscription history area under Changes. Details logged include the type of change, the account user who made the modification, and info about the pricing variation.

Subscription import

Overview

Add/import subscriptions in the Avangate system.

 

Include card data with your subscription import only if you contacted Avangate to enable this functionality for your account. Otherwise, the import process results in a failure. Contact Avangate or your account manager directly for more details.

ATTRIBUTES

Parameters

Type/Description

ExternalSubscriptionReference

Required (string)

 

Unique identifier for your subscription. Mandatory when importing subscription data.

StartDate

Required (string)

 

Subscription start date(YYYY-MM-DD) - StartDate is mandatory when importing subscription data. If you changed the time zone for the Avangate API by editing system settings under Account settings, then the StartDate you provide must be in accordance with your custom configuration.

ExpirationDate

Required (string)

 

Subscription expiration date(YYYY-MM-DD) - ExpirationDate is mandatory when importing subscription data. If you changed the time zone for the Avangate API by editing system settings under Account settings, then the ExpirationDate you provide must be in accordance with your custom configuration.

Product

Required (object)

 

The product for which Avangate generated the subscription. Details below.

 

ProductCode

String

 

 

Unique product identifier that you control.

 

ProductId

Int

 

 

Unique, system-generated product identifier.

 

ProductName

String

 

 

Product name.

 

ProductQuantity

Int

 

 

Ordered number of units.

 

ProductVersion

String

 

 

Product version.

 

PriceOptionCodes

Array

 

 

The product options codes the customer selected when acquiring the subscription. Pricing options codes are case sensitive.

EndUser

Required (object)

 

The end user of the subscription. Details below.

 

Person

Object

    Details below. 

 

 

FirstName

String

 

 

 

End user's first name

 

 

LastName

String

 

 

 

End user's last name

 

 

CountryCode

String

 

 

 

End user country code [ISO3166-1 Alpha 2].

 

 

State

String

 

 

 

End user state.

 

 

City

String

 

 

 

End user city.

 

 

Address1

String

 

 

 

End user first address line.

 

 

Address2

String

 

 

 

End user second address line.

 

 

Zip

String

 

 

 

End user zip code.

 

 

Email

String

 

 

 

End user email address.

 

 

Phone

String

 

 

 

End user phone number.

 

 

Company

String

 

 

 

Company name.

 

Fax

String

 

 

End user fax.

 

Language

String

 

 

Language [ISO639-2] the Avangate system uses for communications.

DeliveryInfo

Optional (object)

 

The object contains information about the delivery/fulfillment made to the customer.

 

Description

String

 

 

Delivery description.

 

Codes

Array of objects

    Details below. 

 

 

Code

String

 

 

 

Delivered activation key/code.

 

 

Description

String

 

 

 

Code description for dynamic lists from your key generator. 

 

 

ExtraInfo

Object

 

 

 

Info set by your key generator for dynamic lists only.

 

 

 

CodeExtraInfo

Object

 

 

 

Type

String

 

 

 

Label

String

 

 

 

Value

String

 

 

File

Array of objects

      Details below. 

 

 

 

Content

String

 

 

 

 

Content of the file (base64 encoded).

 

 

 

ContentLength

Int

 

 

 

 

File size.

 

 

 

Filename

String

 

 

 

 

The name of the delivered file.

 

 

 

FileType

String

 

 

 

 

The type of the delivered file.

PartnerCode

Optional (string)

 

  • Empty: for ecommerce orders
  • Partner Code (mandatory)

ExternalCustomerReference

Optional (string)

 

Customer identifier you control.

SubscriptionValue

Optional (double)

 

Subscription value. The total costs incurred by the customer through the lifecycle of the subscription before you imported the item into the Avangate system.

When you send this parameter you must accompany it by ValueCurrency.

SubscriptionValueCurrency

Optional (string)

 

Mandatory when you also send the Value parameter. The currency associated to the subscription value.

AdditionalInfo

Optional (string)

 

Extra information that you can attach to a subscription, such as the source of the initial purchase.

NextRenewalPrice

Optional (double)

 

The future costs that subscribers would incur when their subscriptions are renewed. When provided, you must accompany it by NextRenewalPriceCurrency and CustomPriceBillingCyclesLeft.

NextRenewalPriceCurrency

Optional (string)

 

Mandatory when you send CustomPriceBillingCyclesLeft. The currency associated with the subscription next renewal price value.

CustomPriceBillingCyclesLeft

Optional (string)

 

Mandatory when you send NextRenewalPrice. Avangate applies the next renewal price to the number of billing cycles you define.

CardPayment

Optional (object)

 

Include payment (credit/debit card) information that Avangate uses for recurring billing to renew imported subscriptions. Importing subscriptions with payment data is available only to eligible Avangate accounts. Contact Avangate directly for additional details.

 Card payment

Add credit/debit card details when importing subscriptions. Avangate uses payment information in the recurring billing process.

CardPayment

Object

CardNumber

Required (string)

 

The credit/debit card number.

CardType

Required (string)

 

VISA, VISAELECTRON, MASTERCARD, MAESTRO, AMEX, DISCOVER, DANKORT, CARTEBLEUE, JCB.

ExpirationYear

Required (string)

 

The year in which the card expires.

ExpirationMonth

Required (string)

 

The month in which the card expires.

HolderName

Required (string)

 

Card holder name.

CCID

Required (string)

 

Credit Card Identification - an extra ID printed on the card, usually a 3-4 digit number, the CVC2/CVV2.

HolderNameTime

Required (int)

 

The interval of time in seconds in which shoppers enter their name in the HolderName field. An abnormally short interval is usually a red flag for fraud attempts.

AutoRenewal

Optional (bool)

 

True or false, depending on whether the customer or you enabled or disabled subscription auto-renewals.

CardNumberTime

Optional (int)

 

The interval of time in seconds in which shopper enter their card number in the CardNumber field. An abnormally short interval is usually a red flag for fraud attempts.

Can be NULL, but not a negative number.

 

Unassign from product group

Overview

Use the unassignProductGroup method to unassign a product from a specific product group and assign it to the General product group instead.

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 code of the product you wish assigned to the group.

groupCode Required (string)
  Unique, system-generated identifier assigned to product groups. 

Response

bool(true)
<?php

require ('PATH_TO_AUTH');

$productCode = "YOUR_PRODUCT_CODE";
$groupCode = "YOUR_PRODUCT_GROUP_CODE";

$jsonRpcRequest = array (
'jsonrpc' => '2.0',
'id' => $i++,
'method' => 'unassignProductGroup',
'params' => array($sessionID, $productCode, $groupCode)
);

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

?>

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