Skip to main content

Unassign additional fields

Overview

Use the unassignAdditionalField method to update additional fields 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.

FieldCode

Required (string)

 

Field identifier. Alpha-numeric chars, underscores and dashes.

ProductCode

Required (string)

 

The unique product code that you control not the system-generated product identifier.

Response

bool(true)

Request

<?php

require ('PATH_TO_AUTH');

$ProductCode = 'YOUR_PRODUCT_CODE';
$FieldCode = 'YOUR_FIELD_CODE';

try {
    $UnassignedAdditionalField = $client->unassignAdditionalField($sessionID, $FieldCode, $ProductCode);
}

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

var_dump("UnassignedAdditionalField", $UnassignedAdditionalField);

Use test orders

Overview

Place a test order using catalog products defined in your Merchant Control Panel.

Set the Payment details type to TEST in order to create an order with a test credit card or a 2Pay.js token generated with a test credit card in a test environment.
For the full list of test credit card details, check this article.

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.

Order

Required (Object)

 

Object designed to collect all data necessary for an order, including billing, product/subscription plan and payment details.

 

Response 

Parameters Type/Description

Order information

Object

Test order request with credit cards

<?php

require ('PATH_TO_AUTH');

$Order = new stdClass();
$Order->RefNo = NULL;
$Order->Currency = 'usd';
$Order->Country = 'US';
$Order->Language = 'en';
$Order->CustomerIP = '91.220.121.21';
$Order->ExternalReference = NULL;
$Order->Source = NULL;
$Order->Affiliate = new stdClass();
$Order->Affiliate->AffiliateCode = 'Partner123'
$Order->Affiliate->AffiliateSource = 'MobilePlatform'
$Order->CustomerReference = NULL;

$Order->Items = array();
$Order->Items[0] = new stdClass();
$Order->Items[0]->Code = 'my_subscription_1';
$Order->Items[0]->Quantity = 1;
$Order->Items[0]->PriceOptions = NULL;
$Order->Items[0]->SKU = NULL;
$Order->Items[0]->Price = NULL;
$Order->Items[0]->CrossSell = NULL;
$Order->Items[0]->Trial = false;
$Order->Items[0]->AdditionalFields = NULL;
$Order->Items[0]->SubscriptionStartDate = NULL; //If empty or null, subscriptions become active when purchase is made.

$Order->BillingDetails = new stdClass();
$Order->BillingDetails->FirstName = 'John';
$Order->BillingDetails->LastName = 'Doe';
$Order->BillingDetails->CountryCode = 'us';
$Order->BillingDetails->State = 'California';
$Order->BillingDetails->City = 'LA';
$Order->BillingDetails->Address1 = 'Address example';
$Order->BillingDetails->Address2 = NULL;
$Order->BillingDetails->Zip = '90210';
$Order->BillingDetails->Email = 'cosmin.deftu@2checkout.com';
$Order->BillingDetails->Phone = NULL;
$Order->BillingDetails->Company = NULL;
$Order->DeliveryDetails = NULL;

$Order->PaymentDetails = new stdClass ();
$Order->PaymentDetails->Type = 'TEST';
$Order->PaymentDetails->Currency = 'usd';
$Order->PaymentDetails->PaymentMethod = new stdClass ();
$Order->PaymentDetails->CustomerIP = '10.10.10.10';
$Order->PaymentDetails->PaymentMethod->RecurringEnabled = true;
$Order->PaymentDetails->PaymentMethod->CardNumber = "4111111111111111";
$Order->PaymentDetails->PaymentMethod->CardType = 'visa';
$Order->PaymentDetails->PaymentMethod->ExpirationYear = '2019';
$Order->PaymentDetails->PaymentMethod->ExpirationMonth = '12';
$Order->PaymentDetails->PaymentMethod->HolderName = 'John';
$Order->PaymentDetails->PaymentMethod->CCID = '123';
$Order->PaymentDetails->PaymentMethod->Vendor3DSReturnURL = "http://yoursuccessurl.com"; // used for 3DS ordering
$Order->PaymentDetails->PaymentMethod->Vendor3DSCancelURL = "http://yourcancelurl.com"; // used for 3DS ordering

$Order->AdditionalFields = NULL;
$Order->LocalTime = NULL;
$Order->GiftDetails = NULL;

try {
    $newOrder = $client->placeOrder($sessionID, $Order);
}
catch (SoapFault $e) {
    echo "newOrder: " . $e->getMessage();
    exit;
}

var_dump("newOrder", $newOrder);

 Test order request with 2Pay.js tokens

<?php

require ('PATH_TO_AUTH');

$Order = new stdClass();
$Order->RefNo = NULL;
$Order->Currency = 'usd';
$Order->Country = 'US';
$Order->Language = 'en';
$Order->CustomerIP = '91.220.121.21';
$Order->ExternalReference = NULL;
$Order->Source = NULL;
$Order->Affiliate = new stdClass();
$Order->Affiliate->AffiliateCode = 'Partner123'
$Order->Affiliate->AffiliateSource = 'MobilePlatform'
$Order->CustomerReference = NULL;

$Order->Items = array();
$Order->Items[0] = new stdClass();
$Order->Items[0]->Code = 'my_subscription_1';
$Order->Items[0]->Quantity = 1;
$Order->Items[0]->PriceOptions = NULL;
$Order->Items[0]->SKU = NULL;
$Order->Items[0]->Price = NULL;
$Order->Items[0]->CrossSell = NULL;
$Order->Items[0]->Trial = false;
$Order->Items[0]->AdditionalFields = NULL;
$Order->Items[0]->SubscriptionStartDate = NULL; //If empty or null, subscriptions become active when purchase is made.

$Order->BillingDetails = new stdClass();
$Order->BillingDetails->FirstName = 'John';
$Order->BillingDetails->LastName = 'Doe';
$Order->BillingDetails->CountryCode = 'us';
$Order->BillingDetails->State = 'California';
$Order->BillingDetails->City = 'LA';
$Order->BillingDetails->Address1 = 'Address example';
$Order->BillingDetails->Address2 = NULL;
$Order->BillingDetails->Zip = '90210';
$Order->BillingDetails->Email = 'cosmin.deftu@2checkout.com';
$Order->BillingDetails->Phone = NULL;
$Order->BillingDetails->Company = NULL;
$Order->DeliveryDetails = NULL;

$Order->PaymentDetails = new stdClass ();
$Order->PaymentDetails->Type = 'TEST';
$Order->PaymentDetails->Currency = 'usd';
$Order->PaymentDetails->PaymentMethod = new stdClass ();
$Order->PaymentDetails->PaymentMethod->EesToken = “90007562-681b-4df5-9797-53faf8abbc92”;
$Order->PaymentDetails->PaymentMethod->Vendor3DSReturnURL = "https://example.com";
$Order->PaymentDetails->PaymentMethod->Vendor3DSCancelURL = "https://example.com";

$Order->AdditionalFields = NULL;
$Order->LocalTime = NULL;
$Order->GiftDetails = NULL;

try {
    $newOrder = $client->placeOrder($sessionID, $Order);
}
catch (SoapFault $e) {
    echo "newOrder: " . $e->getMessage();
    exit;
}

var_dump("newOrder", $newOrder);

External orders tracking in the 2Checkout affiliate network

Overview

Take advantage of External Order Tracking to keep track of sales generated by members of the 2Checkout Affiliate Network for services/products that you sell using multiple payment processors and different affiliate networks or a third-party ecommerce platform, in addition to those sold through the 2Checkout system, if any.

External Order Tracking ensures that 2Checkout rewards Affiliates for referred orders sold outside the 2Checkout platform. The 2Checkout Affiliate Network currently features over 40,000 affiliates working on a pay-per-sale commission-based model. According to the data in our system, companies selling mainstream software can experience an average jump in sales of 10%-15% simply by leveraging the 2Checkout Affiliate Network.

This technology is based on two types of pixel tracking implementations. While both implementations have the same behavior, their inner workings are quite different.

Image pixel

An invisible image pixel to track shopper actions once they buy a product/subscription after being redirected via a link from an 2Checkout Affiliate. 2Checkout uses the recorded data to provide you with reports and to pay the affiliates who generate sales of your products/services.

iFrame pixel

The most common way of tracking conversions. Tests have shown that iFrame pixels are much more accurate than image pixels. Additionally, iFrame pixels offer more room for further developments, if necessary.

External Order Tracking Requirements

Image pixel requirements

Should you choose to use the image pixel technology, you must meet the following requirements:

  • Enable the 2Checkout Affiliate Network for your account.
  • Use a custom domain with 2Checkout(e.g. store.merchant.com).
  • Use a custom domain with third-party ecommerce providers(e.g. store.merchant.com).
  • Configure products sold through a third-party platform within the 2Checkout platform.
  • Assign the products to commissions lists associated with 2Checkout affiliates. Make sure to specify a commission you're willing to pay for affiliate referrals.
  • Contact your 2Checkout account manager for details on legal / financial requirements.

iFrame pixel requirements

Should you choose to use the iFrame pixel technology, you must meet the following requirements:

  • Enable the 2Checkout Affiliate Network for your account.
  • Configure products sold through a third-party platform within the 2Checkout platform.
  • Assign the products to commissions lists associated with 2Checkout affiliates. Make sure to specify a commission you're willing to pay for affiliate referrals.
  • Contact your 2Checkout account manager for details on legal / financial requirements.

Important: iFrame pixel tracking does not require you to create a custom domain with 2Checkout.

Integrating Image Pixel Tracking

Provided that you meet all the requirements mentioned above you can now move to the integration stage.

  1. Go to Affiliate Network -> Build your network and select the External Orders Tracking tab.
  2. Copy the JavaScript code available on this page into the source code of the Thank You pages that you use outside 2Checkout
  3. Replace the UPPER-CASE values with the corresponding order variables in the external ordering platform. Depending on whether or not you're using a custom domain, you will need to configure the tracking.type parameter accordingly
    • tracking.type='image' or tracking.type='iframe' if you are using a custom domain
    • tracking.type='iframe' if you are not using a custom domain

Integrate the modified JavaScript code into the source code of the Thank you page displayed to shoppers at the end of a successful sale. This area is designed to offer a range of details, including an external order reference, info on the products sold, their value, etc.

External Order Tracking relies on cookies to track the activity of the shopper during the purchase process. Essentially, when users click links from 2Checkout affiliates, 2Checkout records the clicks and places tracking cookies on their machines. 2Checkout affiliate links can point to a specific product or multiple offerings from you, or redirect to your website.

External Order Tracking comes into play when users complete an order with the third-party payment provider you're using, reaching the confirmation screen at the end of the ordering process. This page features the tracking script (an invisible 1x1 pixel image or iFrame) set up to record the details of the sale.

You can see completed sales tracked with Pixel Tracking in the External orders area of your Control Panel, under Affiliate Network.

Confirm external orders to credit 2Checkout Affiliates

For affiliates to be credited and paid for the referred purchases, even if the commission is warranted, you need to first approve external orders manually. Make sure to check the validity of external orders with purchases made through the third-party platform you're using.

The information recorded contains the external reference of products, the date when the order was placed, the affiliate whose link was used, the names of theexternal products and the number of units purchased, as well as the price paid by the shopper and the associated currency.

Before confirming external orders, match the products tracked via Pixel Tracking with those you defined in the 2Checkout platform. Once an external product is matched with one defined in the 2Checkout platform, subsequent matches involving the same two items will be done automatically by the system. Note: You cannot match multiple products from the same external order with a single product in the 2Checkout system.

The commission that 2Checkout Affiliates receive is calculated based on the price recorded when the External Order is placed successfully, and is not impacted by the pricing schemes you configure in the 2Checkout platform.

External orders in the 2Checkout platform can show the following status messages:

  • Pending
  • Processing
  • Rejected
  • Confirmed

You can edit and confirm both Pending and Rejected orders. When you confirm an external order, a new order is also generated in the 2Checkout platform, which will be available in the Order search area, under Orders & customers.

You can approve external orders either one by one, or selecting multiple items at once. Note that once you confirm an external order, its details are locked and can no longer be modified. For unconfirmed external orders, any changes will be reflected real-time across all items in this area, if the modifications impact additional orders than the one being edited.

Rejected orders will be ignored by 2Checkout and affiliates will not receive any commission.

When do 2Checkout affiliates receive a commission?

2Checkout's Affiliate Network is based exclusively on a pay-per-sale model. This means that affiliates receive a commission, a percentage out of the price for all shopper purchases that they refer. You alone control the value of the commission paid to affiliates in the 2Checkout Network when a visitor referred by them purchases a product or a service on your website.

Do affiliates automatically receive commission for ever sale they generate?

No. You first need to confirm the sales reported by our External Tracking technology as valid.

Under which conditions can I reject sales?

You can reject all invalid or erroneously reported sales if identified as such. For example, you can reject an order to avoid duplicate crediting of an affiliate that works with both 2Checkout Affiliate Network and another affiliate network.

What does the Other message stand for?

Orders can contain additional costs on top of the price of the products purchased. When 2Checkout identifies such costs, including taxes (VAT, sales tax), shipping taxes, etc., they're featured in a manner designed to make it clear that they cannot be matched with a product in the 2Checkout system.

How does 2Checkout calculate the affiliate commission?

2Checkout calculates the affiliate commission only according to the price of the products shoppers acquire from you, disregarding any additional costs they pay.

Why is the commission of some external orders zero (0) even if they're valid sales?

The affiliate commission for the selected 2Checkout match is 0 because the affiliate initially promoted a different product than the one purchased by the shopper. As such, the 2Checkout system has determined that the commission is not warranted.

You should reject orders for which the commission's value is zero (0). However, even if you try to approve them, the 2Checkout system is designed to disregard them, since there's no commission to pay affiliates.

Commission zero

 

Can the commission for an External Order be modified?

Only for Pending External Orders, by modifying the commission settings for affiliates, which will be applied automatically.

What values can be sent for the parameters market as optional in the JavaScript code?

Either the first and last name, company, email, postal code, etc. in the case of setContact, for example, when they exist, or null otherwise. Replace each optional parameter with NULL. Alternativelly, the entire line: tracking.setContact('FIRST_NAME', 'LAST_NAME', 'COMPANY', 'EMAIL', 'POSTAL_CODE', 'CITY', 'STATE', 'FISCAL_CODE', 'ISO_COUNTRY_CODE', 'ADDRESS'); can be removed.

What happens when the "none" option is selected when matching products?

2Checkout will not pay Affiliates a commission for External Products which you don't match with items configured in 2Checkout (their equivalents) and select noneinstead.

What data does the external order tracking mechanism captures?

We only capture data that we receive from the after sales page in the 3rd party ecommerce platform.

The mandatory values that we need in order for External Order Tracking to function are:

  1. Order ID (from 3rd party eCommerce solution, for sync purposes - e.g. if one of their orders gets refunded, the merchant will be able to reject the order in 2Checkout also);
  2. Currency - the currency that was used in the order;
  3. Total Price - price paid by the customers;
  4. Product details:
    • Product name - name of product from 3rd party eCommerce solution
    • Unit price - unit price in 3rd party eCommerce solution
    • Quantity - quantity
    • Product ID - product ID in 3rd party eCommerce solution

There are some optional variables also that the merchant can send: First name, last name, company, email, postal code, city, state, fiscal code, country code (ISO), address.

Update coupon

Overview

Use the updatePromotionCoupon method to add single or multiple coupons to a promotion.

Updating a promotion with multiple coupons causes any existing single coupon to be removed.

Parameters

Parameter Type/Description

promotionCode

Required (string)

 

The code corresponding to the promotion that you want to update.

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);

 

Remove coupon

Overview

Use the deletePromotionCoupon method to remove single or multiple coupons from a promotion.

Parameters

Parameter Type/Description

promotionCode

Required (string)

 

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

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 remove coupons from
$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);

 

Assign order/product additional fields

Overview

Use the assignAdditionalField method to update additional fields for your account.

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.

FieldCode

Required (string)

 

Field identifier. Alpha-numeric chars, underscores and dashes.

Required

Boolean

 

True or False depending on whether you want make the field mandatory or not.

ProductCode

Required (string)

 

The unique product code that you control not the system-generated product identifier.

Request

<?php

require ('PATH_TO_AUTH');

$ProductCode = 'YOUR_PRODUCT_CODE';
$FieldCode = 'YOUR_FIELD_CODE';
$Required = true;

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

?>

Response

bool(true)

Change time zones in the 2Checkout system

Overview

The 2Checkout platform supports time zones and Daylight Saving Time corrections when reporting the date and time. Time zone support enables you to gain better insight into the performance of your business operations correlating it with your preferred time zone, or the one that best matches your geographical location.

2Checkout date-time stamps:

  • GMT+02:00 by default;
  • The time zone you set using Account settings.

The 2Checkout platform enables you to control the Time zone for:

  • The Control Panel
  • The 2Checkout API

Note: The Time zones set for the Control Panel and for the API can coincide, but at the same time they can be different, since they work independent of one another. For example, you can set GMT-8 if you're on Pacific Time for the Control Panel, and GMT-6 for Central America for the API.

Impact

Changing the Time zones in the 2Checkout platform impacts the way in which the system reports:

  • the date and time of orders placed by your customers and partners;
  • when placing partner orders;
  • subscriptions generated by the system;
  • changes happening through the lifetime of subscriptions;
  • delivery confirmations;
  • refunds.

Note: 2Checkout corrects for Daylight Saving Time. The date and time information can vary through the inclusion of Daylight Savings depending on your country and the period of the year.

In addition, date and time info sent through IPN (Instant Payment Notification) and LCN (License Change Notification) will also adapt to reflect the time zone you opt to use for the 2Checkout API.

Exceptions

  1. Accounting area - All Accounting data recorded and provided by the 2Checkout platform uses the system's default GMT+02:00 time zone and cannot be changed. The accounting reports, emails you receive from 2Checkout, the Accounting area in the Control Panel, invoices, Product overview, Orders overview and Products report will display the GMT+02:00 time zone of 2Checkout's system.
  2. Bonus programs for 2Checkout affiliates use the default GMT+02:00 time zone.
  3. The 2Checkout sales reports use default GMT+02:00 time zone.
  4. Parts of the 2Checkout API not related to IPN and LCN.

Time zone setup

To set up or change time zones in the 2Checkout platform for your account, navigate to Account settings, and in the System settings area, click on the Edit system settings button at the bottom of the page.

By default, the Control Panel uses the (GMT+02:00) Athens, Bucharest, Istanbul time zone to display the date, to which Daylight Saving might apply, depending on country and period of the year. Using the dropdown menus, you can change the Control Panel display time zones in order & customers related areas (Order Search, Customers, Delivery Confirmations, Place Partner Order and Partner Refunds) and the time zoned used in the 2Checkout APIs for IPN (Instant Payment Notification) and LCN (License Change Notification).

Displaying time zone details

When you select a time zone it is displayed throughout the Control Panel, but Daylight Saving Time corrections will only be made for the actual date and time.

This means that if you select GMT + 01:00, when the associated offset increases to GMT + 02:00 because of Daylight Savings, the date and time reported by the system will change accordingly, even though GMT + 01:00 will appear per your settings.

Orders search for both eStore orders and Partner orders enable you to swap the report time zone between the 2Checkout default and the custom time zone you selected.

The same is valid for the Subscriptions ManagementCustomers and the Partner Refunds report.

The time zone is also displayed on the Dashboard (home page of the Control Panel) under the Latest orders area. In addition, when editing the details of a subscription, time zone information will also be displayed.

2Checkout API time zones

2Checkout sends out datetime stamps in the following situations:

  • By default for every LCN (License Change Notification). This behavior cannot be switched off.
  • For IPN (Instant Payment Notification) but only if under IPN settings you check the TIMEZONE_OFFSET option in the notification details area.

LCN - TIMEZONE_OFFSET: The time zone you selected or the default GMT+02:00 time zone of the 2Checkout system.

IPN - TIMEZONE_OFFSET: The time zone you selected or the default GMT+02:00 time zone of the 2Checkout system.

IDN_DATE - If you changed the time zone for the 2Checkout API by editing system settings under Account settings, then the IDN_DATE will be calculated according to your custom configuration. 2Checkout will use your custom set time zone for the IDN_DATE when calculating the HASH, and it's important that you also use the same datetime stamp, also per the custom time zone.

IRN_DATE - If you changed the time zone for the 2Checkout API by editing system settings under Account settings, then the IRN_DATE will be calculated according to your custom configuration. 2Checkout will use your custom set time zone for the IRN_DATE when calculating the HASH, and it's important that you also use the same datetime stamp, also per the custom time zone.

Electronic delivery - TIMEZONE: The time zone you selected or the default GMT+02:00 time zone of the 2Checkout system.

FAQ

Will changing the time zone prolong or shorten the lifetime of subscriptions sold?

No. Changing the time zone has no impact on the lifecycle of subscriptions you already sold and are used by your customers. Only the datetime stamps reported by the 2Checkout system vary when swapping one time zone for another. Similarly, changing time zones will not impact renewals or expiration deadlines, for example.

Some orders just placed appear with datetime stamps in the future or in the past. How is this possible?

Such discrepancies occur only in scenarios in which you opted to set a time zone different than the one specific to your geographical location.

If you're based in the UK but use (GMT+01:00) Amsterdam, Berlin, Bern, Rome, Stockholm, Vienna instead of (GMT+00:00) Greenwich Mean Time : Dublin, Edinburgh, Lisbon, London, then orders your customers place between 11:00 PM and 12:00 AM (UK time) are reported as being placed the next day.

Similarly, if you're based in the UK but instead of using (GMT+00:00) Greenwich Mean Time : Dublin, Edinburgh, Lisbon, London, you change the time zone settings in the 2Checkout Control Panel to (GMT-06:00) Central Time (US & Canada), orders your customers place after 12:00 AM are reported as being placed the previous day.

Available time zones

  • (GMT-11:00) Midway Island, Samoa
  • (GMT-10:00) Hawaii
  • (GMT-09:00) Alaska
  • (GMT-08:00) Tijuana, Baja California
  • (GMT-08:00) Pacific Time (US & Canada)
  • (GMT-07:00) Mountain Time (US & Canada)
  • (GMT-07:00) Chihuahua, La Paz, Mazatlan - Old
  • (GMT-07:00) Chihuahua, La Paz, Mazatlan - New
  • (GMT-07:00) Arizona
  • (GMT-06:00) Saskatchewan
  • (GMT-06:00) Guadalajara, Mexico City, Monterrey - Old
  • (GMT-06:00) Guadalajara, Mexico City, Monterrey - New
  • (GMT-06:00) Central Time (US & Canada)
  • (GMT-06:00) Central America
  • (GMT-05:00) Indiana (East)
  • (GMT-05:00) Eastern Time (US & Canada)
  • (GMT-05:00) Bogota, Lima, Quito, Rio Branco
  • (GMT-04:30) Caracas
  • (GMT-04:00) Santiago
  • (GMT-04:00) Manaus
  • (GMT-04:00) La Paz
  • (GMT-04:00) Atlantic Time (Canada)
  • (GMT-03:30) Newfoundland
  • (GMT-03:00) Montevideo
  • (GMT-03:00) Greenland
  • (GMT-03:00) Georgetown
  • (GMT-03:00) Buenos Aires
  • (GMT-03:00) Brasilia
  • (GMT-02:00) Mid-Atlantic
  • (GMT-01:00) Cape Verde Is.
  • (GMT-01:00) Azores
  • UTC (this option will only appear in the drop down menu for the 2Checkout API time zone selection)
  • (GMT+00:00) Casablanca
  • (GMT+00:00) Greenwich Mean Time : Dublin, Edinburgh, Lisbon, London
  • (GMT+00:00) Monrovia, Reykjavik
  • (GMT+01:00) Amsterdam, Berlin, Bern, Rome, Stockholm, Vienna
  • (GMT+01:00) Belgrade, Bratislava, Budapest, Ljubljana, Prague
  • (GMT+01:00) Brussels, Copenhagen, Madrid, Paris
  • (GMT+01:00) Sarajevo, Skopje, Warsaw, Zagreb
  • (GMT+01:00) West Central Africa
  • (GMT+02:00) Amman
  • (GMT+02:00) Athens, Bucharest, Istanbul
  • (GMT+02:00) Beirut
  • (GMT+02:00) Cairo
  • (GMT+02:00) Harare, Pretoria
  • (GMT+02:00) Helsinki, Kyiv, Riga, Sofia, Tallinn, Vilnius
  • (GMT+02:00) Jerusalem
  • (GMT+02:00) Minsk
  • (GMT+02:00) Windhoek
  • (GMT+03:00) Baghdad
  • (GMT+03:00) Kuwait, Riyadh
  • (GMT+03:00) Moscow, St. Petersburg, Volgograd
  • (GMT+03:00) Nairobi
  • (GMT+03:00) Tbilisi
  • (GMT+03:30) Tehran
  • (GMT+04:00) Abu Dhabi, Muscat
  • (GMT+04:00) Baku
  • (GMT+04:00) Caucasus Standard Time
  • (GMT+04:00) Port Louis
  • (GMT+04:00) Yerevan
  • (GMT+04:30) Kabul
  • (GMT+05:00) Ekaterinburg
  • (GMT+05:00) Islamabad, Karachi
  • (GMT+05:00) Tashkent
  • (GMT+05:30) Chennai, Kolkata, Mumbai, New Delhi
  • (GMT+05:30) Sri Jayawardenepura
  • (GMT+05:45) Kathmandu
  • (GMT+06:00) Almaty, Novosibirsk
  • (GMT+06:00) Astana, Dhaka
  • (GMT+06:30) Yangon (Rangoon)
  • (GMT+07:00) Bangkok, Hanoi, Jakarta
  • (GMT+07:00) Krasnoyarsk
  • (GMT+08:00) Beijing, Chongqing, Hong Kong, Urumqi
  • (GMT+08:00) Irkutsk, Ulaan Bataar
  • (GMT+08:00) Kuala Lumpur, Singapore
  • (GMT+08:00) Perth
  • (GMT+08:00) Taipei
  • (GMT+09:00) Osaka, Sapporo, Tokyo
  • (GMT+09:00) Seoul
  • (GMT+09:00) Yakutsk
  • (GMT+09:30) Adelaide
  • (GMT+09:30) Darwin
  • (GMT+10:00) Brisbane
  • (GMT+10:00) Canberra, Melbourne, Sydney
  • (GMT+10:00) Guam, Port Moresby
  • (GMT+10:00) Hobart
  • (GMT+10:00) Vladivostok
  • (GMT+11:00) Magadan, Solomon Is., New Caledonia
  • (GMT+12:00) Auckland, Wellington
  • (GMT+12:00) Fiji, Kamchatka, Marshall Is.
  • (GMT+13:00) Nuku'alofa

Update order/product additional fields

Overview

Use the updateAdditionalField method to update additional fields for your account.

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.

AdditionalField

Object

 

Additional field object.

Response

bool(true)

Request

<?php

require ('PATH_TO_AUTH');

$AdditionalField                             = new stdClass();
$AdditionalField->Label                      = 'Do you agree with the new newsletter policy 2015?';
$AdditionalField->Type                       = 'LISTBOX';
$AdditionalField->Code                       = 'NewsletterPolicy1234576';
$AdditionalField->ApplyTo                    = 'ORDER';
$AdditionalField->Values                     = array();
$AdditionalField->Values[0]                  = 'YES';
$AdditionalField->Values[1]                  = 'NO';
$AdditionalField->ValidationRule             = null;
$AdditionalField->Translations               = array();
$AdditionalField->Translations[0]            = new stdClass();
$AdditionalField->Translations[0]->Label     = "Êtes-vous d'accord avec la politique de la newsletter?";
$AdditionalField->Translations[0]->Values    = array();
$AdditionalField->Translations[0]->Values[0] = 'Oui';
$AdditionalField->Translations[0]->Values[1] = 'Non';
$AdditionalField->Translations[0]->Language  = 'fr';
$AdditionalField->Translations[1]            = new stdClass();
$AdditionalField->Translations[1]->Label     = 'Haben Sie mit dem Newsletter Politik zu?';
$AdditionalField->Translations[1]->Values    = array();
$AdditionalField->Translations[1]->Values[0] = 'Ja';
$AdditionalField->Translations[1]->Values[1] = 'Nein';
$AdditionalField->Translations[1]->Language  = 'de';

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

?>

 

VAT ID support for Express PayPal Checkout

Overview

VAT-registered business customers based in the European Union can now use the PayPal Express Checkout flow to pay for their orders being charged according to the VAT ID they provide.

After customers confirm the payment with PayPal, 2Checkout redirects them to the shopping cart and allows them to enter their VAT ID before placing the order.

Availability

This feature is available for all 2Checkout accounts and applies to the PayPal Express Checkout purchase flow.

Usage

Buy links generated on the Express Checkout purchase flow include DESIGN_TYPE=2 by default for new 2Checkout accounts.

Existing 2Checkout customers can easily leverage this enhancement by altering the DESIGN_TYPE parameter within the buy links from DESIGN_TYPE=1 to DESIGN_TYPE=2.

Using DESIGN_TYPE=1 does not enable VAT ID support.

Purchase flow

1. Shoppers reach the shopping cart, select PayPal as their payment method and proceed to checkout.

 

2. They log in to their PayPal account

3. PayPal asks them to confirm the payment

4. Shoppers return to the shopping cart to confirm the billing and delivery data and enter their VAT ID.

5. They place the order.

Pricing configuration

Overview

Use this object to add/create and update/edit pricing configurations for your account. You can assign one or multiple price option groups to pricing configurations.

You identify a pricing configuration using its unique identifier: Code.

Parameters

Parameters Type/Description

Name

String

 

Pricing configuration name.

Default

Boolean

 

True for the default pricing configuration

BillingCountries

Array of strings

 

ISO codes of the countries assigned to the pricing configuration.

Empty unless a pricing configuration has specific countries assigned.

PricingSchema

String

 

DYNAMIC – With a base price

FLAT – Without a base price

PriceType

String

 

Possible values:

• NET

• GROSS

DefaultCurrency

String

 

The ISO code of the default currency for the pricing configuration

Prices

Object

 

Details below.

 

Regular

Array of objects

 

 

Details below.

 

 

Amount

Int

 

 

 

The price of the product. Use -1 to delete it.

 

 

Currency

String

 

 

 

ISO code of the currency for the product price.

 

 

MinQuantity

Int

 

 

 

The minimum quantity of volume discounts. Default is 1.

 

 

MaxQuantity

Int

 

 

 

The maximum quantity of volume discounts. Default is 99999.

 

 

OptionCodes

Array of objects

 

 

 

Details below.

 

 

 

Code

String

 

 

 

 

System generated pricing options group code (you can also configure it) that the 2Checkout system uses to calculate product prices for pricing configurations without a base price.

 

 

 

Options

StringArray

 

 

 

 

The pricing options group option code you configured that the 2Checkout system uses to calculate product prices for pricing configurations without a base price.

 

Renewal

Array of objects

 

 

Details below.

 

 

Amount

Int

 

 

 

The price of the product. Use -1 to delete it.

 

 

Currency

String

 

 

 

ISO code of the currency for the product price.

 

 

MinQuantity

Int

 

 

 

The minimum quantity of volume discounts. Default is 1.

 

 

MaxQuantity

Int

 

 

 

The maximum quantity of volume discounts. Default is 99999.

 

 

OptionCodes

Array of objects

 

 

 

Details below.

PriceOptions

Array of objects

 

Details below.

 

Code

String

 

 

System generated pricing options group code (you can also configure it) that the 2Checkout system uses to calculate product prices for pricing configurations without a base price.

 

Required

Boolean

 

 

true – you set the price options group as required during the purchase process.

false - you did not set the price options group as required during the purchase process.

 

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