Skip to main content

Order session contents

Overview

Retrieve the current cart session content, and learn insights about your customers actions in cart.

You can obtain the VAT or sales TAX based on current cart items, prefill the customer information based on the subscription reference, or get the price applied in cart by using the API method from below.

 

SOFORT Banking

Overview

Direct credit transfer system designed to allow the immediate delivery of goods and services through instant notification and confirmation support, something not possible with a traditional wire transfer. DIRECTebanking.com does not require users to have a credit card, to fund a virtual account, or even register, but it enables them to automatically trigger credit transfers to you. Sofortbanking's market share of online payments in Germany was 4% in 2010.

Workflow

  1. When placing the order, shoppers in Germany, Austria, Belgium, Switzerland and The Netherlands can select SOFORT Banking as a payment option.
  2. On the next page, customers can place their order.
  3. To proceed to checkout and complete the transaction shoppers need to click the Finalize payment on SOFORT Banking button. They'll be redirected to the DIRECTebanking website.
  4. A set of instructions on how to finalize the payment is presented to customers. They are required to select the country where their bank account is located and enter the bank sort code for Austria and Germany, first 3 digits of the account number for Belgium, the bank name for The Netherlands, and the Clearing number (BC-number) for Switzerland. On the next screens, shoppers will need to provide the name of the owner of the online banking account, and the account number, as well as the information they entered when registering for online banking. Orders need to be confirmed with a PIN or TAN (provided by the bank).

Retrieve a lead

Overview

Use the getLead method to retrieve leads created in the 2Checkout systems by fetching the lead code.

Request Parameters

Parameters Required Type/Description

LeadCode

Optional

String/Array of strings. Retrieves all leads based on their unique identification code (system-generated).

 

 

Email

Optional

String. A valid email address used by the customer

Type

Optional String. Must be one of the existing types of leads:
  • New
  • Used
  • UsedSuccess
  • Stopped
  • NotStopped

StartDate

Optional String. The start date of the interval; format must be yyyy-mm-dd.

EndDate

Optional String. The end date of the interval; format must be yyyy-mm-dd.

ProductCode 

Optional

String/Array of strings. Searches for all leads containing the product code.

Language

Optional String. The language of the shopper cart; ISO 639-1 two-letter code.

Country

Optional String. The customers billing country; ISO 3166 two-letter code.

GeneratedFrom 

Optional String. API, shopping cart, ConvertPlus. Display the leads based on the source where they were created – via API or via the 2Checkout ordering engines.

Request Example

<?php

require ('PATH_TO_AUTH');

$jsonRpcRequest = array (
    'method' => 'getLead',
    'params' => array($sessionID, '60E6C4B574'),
    'id' => $i++,
    'jsonrpc' => '2.0'
);

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

Response Example

class stdClass#18 (14) {
  public $LeadCode =>
  string(10) "60E6C4B574"
  public $GeneratedFrom =>
  string(3) "API"
  public $CartId =>
  string(11) "CartIdValue"
  public $Currency =>
  string(3) "EUR"
  public $Language =>
  string(2) "BG"
  public $ExternalReference =>
  string(18) "REST_API_3CHECKOUT"
  public $MachineId =>
  string(6) "123asd"
  public $LocalTime =>
  string(19) "2019-11-05 16:48:28"
  public $Items =>
  class stdClass#19 (1) {
    public $0 =>
    class stdClass#20 (15) {
      public $Code =>
      string(10) "04C26C50F8"
      public $Quantity =>
      string(1) "2"
      public $SKU =>
      NULL
      public $Name =>
      string(5) "softy"
      public $Description =>
      NULL
      public $IsDynamic =>
      bool(false)
      public $Tangible =>
      bool(false)
      public $PurchaseType =>
      string(7) "PRODUCT"
      public $PriceOptions =>
      NULL
      public $RecurringOptions =>
      class stdClass#21 (5) {
        public $CycleLength =>
        NULL
        public $CycleUnit =>
        NULL
        public $CycleAmount =>
        NULL
        public $ContractLength =>
        NULL
        public $ContractUnit =>
        NULL
      }
      public $RenewalInformation =>
      class stdClass#22 (1) {
        public $SubscriptionReference =>
        NULL
      }
      
      }
      public $MarketingCampaigns =>
      class stdClass#23 (3) {
        public $Type =>
        string(2) "23"
        public $ParentCode =>
        string(1) "m"
        public $CampaignCode =>
        string(2) "23"
      }
      public $Price =>
      class stdClass#24 (2) {
        public $Amount =>
        string(2) "20"
        public $Type =>
        string(6) "CUSTOM"
      }
      public $AdditionalFields =>
      NULL
      public $SubscriptionStartDate =>
      string(19) "2019-11-05 16:48:28"
      }
  
  public $BillingDetails =>
  class stdClass#25 (12) {
    public $FirstName =>
    string(8) "Customer"
    public $LastName =>
    string(9) "2Checkout"
    public $Phone =>
    NULL
    public $Company =>
    NULL
    public $FiscalCode =>
    string(8) "32423423"
    public $Email =>
    string(22) "customer@2checkout.com"
    public $Address1 =>
    string(12) "Test Address"
    public $Address2 =>
    NULL
    public $City =>
    string(2) "LA"
    public $Zip =>
    string(5) "12345"
    public $CountryCode =>
    string(2) "RO"
    public $State =>
    string(2) "CA"
  }
  public $DeliveryDetails =>
  class stdClass#26 (12) {
    public $FirstName =>
    string(8) "Customer"
    public $LastName =>
    string(9) "2Checkout"
    public $Phone =>
    NULL
    public $Company =>
    NULL
    public $FiscalCode =>
    string(8) "32423423"
    public $Email =>
    string(22) "customer@2checkout.com"
    public $Address1 =>
    string(12) "Test Address"
    public $Address2 =>
    NULL
    public $City =>
    string(2) "LA"
    public $Zip =>
    string(5) "12345"
    public $CountryCode =>
    string(2) "RO"
    public $State =>
    string(2) "CA"
  }
  public $DeliveryInformation =>
  class stdClass#27 (1) {
    public $ShippingMethod =>
    class stdClass#28 (1) {
      public $Code =>
      string(5) "sdfsd"
    }
  }
  public $PaymentDetails =>
  class stdClass#29 (4) {
    public $Type =>
    string(2) "CC"
    public $Currency =>
    string(3) "EUR"
    public $PaymentMethod =>
    class stdClass#30 (2) {
      public $RecurringEnabled =>
      bool(false)
      public $CardPayment =>
      class stdClass#31 (1) {
        public $InstallmentsNumber =>
        string(2) "23"
      }
    }
    public $CustomerIP =>
    string(7) "1.2.3.4"
  }
  public $Promotions =>
  array(1) {
    [0] =>
    string(0) ""
  }
}

 

Update product

Overview

Use the updateProduct method to update the configuration of a subscription plan/product you already configured 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.

Product

Required (object)

 

Use this object to configure your subscription plans/products.

 

You can update/edit all parameters, except the following:

  • AvangateID
  • ProductType

Exceptions

When updating a subscription plan/product, you also update its PricingConfigurations. However, you cannot modify:

  • The pricing configuration CODE.
  • The PricingSchema from DYNAMIC to FLAT or vice versa.  

Request

<?php

require ('PATH_TO_AUTH');

$ProductCode = 'NewProdCodeAPI12345';

try {
$myProduct = $client->getProductByCode($sessionID, $ProductCode);
}

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

$myProduct->ProductName = 'Edited_From_API_Again';

var_dump ($myProduct);

try {
    $NewSubscriptionPlan = $client->updateProduct($sessionID, $myProduct);
}

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

var_dump("UpdatedProductInfo", $NewSubscriptionPlan);

?>

Response

bool(true)

 

Pricing configuration

Overview

This object is returned directly or within a successful response from the following API requests:

Retrieve a pricing configuration by name            Retrieve a pricing configuration by code               Retrieve pricing configurations

Pricing configuration object

Parameters Type/Description

Name

String

 

Pricing configuration name.

Code

String

 

System-generated identifier. Read-only.

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.

 

 

Next renewal price

Overview

Use the methods below to set or retrieve information related to the next renewal price to be charged on a customer's subscription.

 

Generate SKU Schema

Overview

Stock keeping unit or SKU is a number assigned to a particular product by a digital or physical retail store for easy identification and inventory tracking purposes. The SKU number is a string of alphanumeric characters that uniquely identify details such as price, product options, and manufacturer of a particular product or service. SKUs are used in order notifications, electronic delivery, export files, etc.

SKU Management

For companies that manage large product catalogs with defined SKUs and that make regular changes to their prices and products (new versions, new options), the manual process performed in the Merchant Control Panel needs to be supported by an automatic solution as well. By using an automated flow, merchants decrease the time needed for this process, and also reduce the risk of human errors associated with the manual process.

In the 2Checkout platform, SKUs can be associated with a unique combination made up of:

  • Product identification element
  • Pricing configuration
  • Plus minimum one of the following:
    • Currency – defined as applicable to all currencies or only to specific ones
    • Volume Discounts – defined as specific quantity or intervals (applicable only according to the volume discounts that are defined at pricing configuration level)
    • Purchase Types – possible values: new purchase, renewal, upgrade, and trial
    • Pricing Options – will be available considering the pricing option groups assigned to the selected pricing configuration

 

 

Reseller

Overview

Structure

Reseller Object
ResellerCode String
  Unique, system generated reseller identifier. Can be NULL.
Company String
  Reseller company name. Can be NULL.
FirstName String
  Reseller first name. Can be NULL.
LastName String
  Reseller last name. Can be NULL.
Email String
  Reseller email. Can be NULL.
Phone String
  Reseller phone. Can be NULL.
Fax String
  Reseller fax. Can be NULL.
Country String
  Reseller country ISO language code (ISO 639-1 two-letter code). Can be NULL.
State String
  Reseller state. For example, "Alabama","Alaska","Arizona". Can be NULL.
City String
  Reseller city. Can be NULL.
Address String
  Reseller address. Can be NULL.
PostalCode String
  Reseller ZIP code. Can be NULL.

 

Purchase order status change

Use the variables in the list below to customize the Purchase order status change shopper email according to your needs. Check the 'Mandatory' column to see the variables that are required in your customized version of the e-mail.

Variable name Description Test Value Mandatory

ALLOW_MYACCOUNT_PROMO

Include or exclude myAccount information in the email body

1 No
AVANGATE_LOGO Avangate logo URL https://secure.avangate.com/images/e...endor_logo.png Yes

BANKACCOUNT

Avangate bank account

[NLXXABNAXXXXXXXXXX (IBAN)] No

BANKNAME

Avangate bank name

ABN AMRO Bank Amsterdam No

BANKSWIFT

Avangate bank swift code

ABNANL2XXX No

BASE_URL

Merchant's full host

https://secure.avangate.com No

BUSINESS_COMPANY

Avangate company name

Avangate Yes

BUSINESS_HOTLINE

Avangate support phone

0 No

BUSINESS_HOTLINEUS

Avangate US hotline number

0 No

BUSINESS_OPEMAIL

Avangate operational email address

0 No

BUSINESS_OPFAX

Avangate operational fax number

0 No

BUSINESS_SUPEMAIL

Avangate support email address

0 No

COMMERCIALNAME

Merchant's commercial name

0 Yes

CURRENCY_ORIGINAL

Original order currency (applicable to refunds)

0 No

DELIVERABILITY

Order delivery status

0 No

ENCRYPTED_MERCHANT_CODE

Encrypted merchant code

0 No

EXTRA_INFO

0

0 No

FIRSTNAME

Shopper's first name used on the delivery information

John No
GATEWAY_ERROR_CODE Gateway error code GW_PROCESSING_ERROR
See the full
list of Possible Values
No
GATEWAY_ERROR_MESSAGE Reason why the transaction failed. (e.g. Invalid card, insufficient funds) Error processing the card transaction. The card account has not been debited. Card data is invalid or incomplete. No

HAS_RENEWAL_PRODUCTS

Flag that indicates whether at least one product has renewal settings

0 No

HOTLINE_NUMBERS

0

0 No

HOTLINE_NUMBERS.NG_PHONE[index1].HotlineName

Countries where Avangate support information is available

0 No

HOTLINE_NUMBERS.NG_PHONE[index1].HotlineValue

Avangate phone number(s) for shopper support

0 No

IS_RENEWAL

Flag that indicates whether at least one product has renewal settings

0 No

LANGUAGE

Order language (abbreviated) selected by shopper

en No

LASTNAME

Shopper's last name used on the delivery information

Doe No

NAMES_OF_PRODUCTS

Names of all products in the order, comma separated

0 No

ORDERDATE

Order placement date

10/9/2019 No

ORDER_AMOUNT_ORIGINAL

Original order value (applicable to refunds)

10/9/2019 No

ORDER_DATE_STANDARD_FORMAT

Standard format used for the order placement date

0 No

ORDER_FLOW

Purchase flow used to place the order

0 No

ORDER_STATUS

Order status

0 No

PAYABLE_TO

Payee name (applicable to wire transfer)

0 No

PAYMENT_TYPE_INFO

English payment method name. Includes last four card digits (if applicable).

0 No

PO_STATUS

Status of the Purchase Order

0 Yes

PRODUCTS

0

0 No

PRODUCTS[index1].LICENSE_TYPE

Type of purchased subscription

0 No

PRODUCTS[index1].PNAME

Product name

0 No

PRODUCTS[index1].SHORT_DESCRIPTION

Short product description

0 No

PRODUCTS_DATA[index1].IdProduct

Product ID number

0 No

PRODUCTS_DATA[index1].PRODUCT_SHORT_DESCRIPTION

Short product description

0 No

PRODUCTS_NO

Number of products in cart

0 No

REFNO

Order reference number

9xxxxxx Yes

RETRYLINK

Payment retry link

0 No

RETRY_LINK

Payment retry link

0 No

SHOPPER_REFERENCE_NUMBER

Shopper  reference number

PO12345 No

UPLOADLINK

File upload link

0 No

UPLOAD_LINK

File upload link

0 No

USER_EMAIL

Email address used by shopper to login/signup to myAccount

example@customer-email.com No

USER_TOKEN

Shopper token for Avangate myAccount access

0 No

WEBSITE

Website where the shopper placed the order

http://www.software-company-website.com Yes

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