Skip to main content

Product

Overview

Use the Product object to create/add, update/edit and retrieve subscription plans/products for your account. You can control:

  • Product information
  • Pricing
  • Subscription plan settings and renewal configuration
  • Subscription plan recurring billing
  • Fulfillment
  • Shipping classes
  • Localization

 

Parameters Type/Description

AvangateId

String

 

Unique, system-generated 2Checkout product ID. Read-only.

ProductCode

String

 

The product code that you can define for each of your offerings. Needs to be unique.

ProductType

String

 

REGULAR or BUNDLE

ProductName

String

 

The name of the product

ProductVersion

String

 

The product version number

GroupName

String

 

The name of the Product Group to which the product belongs. Cannot be set as part of the addProduct API call.

ShippingClass

Object

 

Existing shipping class object with the structure detailed below.

 

Name

String

 

 

The name of the shipping class

 

Amount

Decimal

 

 

The shipping costs

 

Currency

String

 

 

The currency ISO code used for shipping costs - ISO 4217.

 

ApplyTo

String

 

 

Possible values:

• PRODUCT

• ORDER

 

Type

Possible values:

• FIXED

• PERCENT

PurchaseMultipleUnits boolean
 

Possible values:

  • TRUE - customers can purchase multiple units of this product.
  • FALSE - customers can purchase only one unit at a time.

 

Default value is TRUE.

GiftOption

boolean

 

True or false depending on whether the product can be gifted or not.

ShortDescription

String

 

The product's short description

LongDescription

String

 

The product's long description

SystemRequirements

String

 

System requirements

ProductCategory

String

 

Product category

Platforms

Array of Platform objects

 

Array of objects detailing the platforms supported by the application. Details below.

 

PlatformName

String

 

 

The label of the platform per the product configuration.

 

Category

String

 

 

Platform category per product configuration. 

ProductImages

Array of Image objects

 

Image object. Details below. Read-only.

 

Default

Boolean

 

 

True or False depending on whether you set the image stored at the address in the URL parameter as default or not.

 

URL

String

 

 

The location of the image on the 2Checkout system.

TrialUrl

String (anyURI)

 

The URL from where shoppers can download trial software.

TrialDescription

String

 

Descriptive text entered for trials.

Enabled

Boolean

 

True/false depending on whether the products are active or disabled. When empty, 2Checkout marks the product as disabled.  

AdditionalFields

Array of AdditionalFieldAssigned objects

 

Array of existing additional fields assigned to products. Details below.

 

Label

String

 

 

The name of the additional field assigned to a product.

 

Code

String

 

 

The code of the additional field assigned to a product.

 

Enabled

Boolean

 

 

True or false depending on whether the assigned product field is enabled or not.

 

Required

Boolean

 

 

True or false depending on whether the assigned product field is required or not.

 

URLParameter

String

 

 

The value of the system generated URL parameter for the product field that can be used in Buy Links.

Translations

Array of ProductTranslation objects

 

Details below.

 

LongDescription

String

 

 

The translated long description in the language corresponding to the Translation object.

 

TrialUrl

String

 

 

The trial URL for users speaking the language corresponding to the Translation object.

 

TrialDescription

String

 

 

 

 

SystemRequirements

String

 

 

Localized system requirements.

 

Name

String

 

 

Localized product name.

 

Description

String

 

 

Localized product short description.

 

Language

String

 

 

ISO 639-1 two-letter code.

PricingConfigurations

Array of PricingConfiguration objects

 

Details below. 2Checkout creates pricing configurations during the process when you add a product.

 

Name

String

 

 

Pricing configuration name

 

Code

String

 

 

System-generated identifier.

 

Default

boolean

 

 

True for the default pricing configuration

 

BillingCountries

Array of strings

 

 

ISO codes of the countries assigned to the pricing configuration.

Empty unless specific countries are assigned to a pricing configuration.

 

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.

 

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

 

 

Price option identifier.

 

Options

Array of strings

 

 

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.

 

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 PriceOptionCode objects

 

 

Details below.

 

Code

String

 

 

Price option identifier.

 

Options

Array of strings

 

 

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

 

PriceOptions

Array of AssignedPriceOptionGroup 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 or False depending on whether you want to make it mandatory for shoppers to select the price option during the puyrchase process.

BundleProducts

Array of BundleProductCode objects

 

Details below.

 

ProductId

String

 

 

Unique, system-generated product ID.

 

ProductCode

String

 

 

Editable product code that you control.

Fulfillment

String

 

BY_2CHECKOUT

NO_DELIVERY – The 2Checkout system finalizes orders immediately after it receives payment confirmation.

BY_VENDOR – you are responsible for delivering/fulfilling orders

Prices

Array of Price objects

 

Use this object only when Pricing Configurations are not available for your account. Details below.

 

Amount

Int

 

 

The price of the product.

 

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

 

 

Price option identifier.

 

Options

Array of strings

 

 

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

GeneratesSubscription

boolean

 

TRUE or FALSE depending on whether you set the product to generate subscriptions or not.

 

NULL for bundles for which you set the following subscription management option: “Use the subscription settings of each product in the bundle”

SubscriptionInformation

ProductSubscriptionInformation Object

 

Details below. NULL for bundles which you set to use the renewal settings of child products and not of the parent bundle.

 

DeprecatedProducts

Array

 

 

Deprecated products.

 

BundleRenewalManagement String

 

 

Possible values:

  • GLOBAL
  • INDIVIDUAL

Can be NULL.

 

BillingCycle

String

 

 

The number of subscription billing cycle units (months or days).  Possible values:

  • 0 (zero represents a one-time fee)

Days

  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14

 

Months

  • 1
  • 2
  • 3
  • 6
  • 12
  • 15
  • 18
  • 24
  • 36 (max)

 

BillingCycleUnits

String

 

 

The units of the billing cycle:

  • M - months

D - days

 

IsOneTimeFee

Boolean

 

 

True or False depending on whether the subscription is evergreen or not.

 

ContractPeriod

Object

 

 

Details below.

 

Period

Int

 

 

The contract period in months or days. -1 for unlimited contracts.

 

PeriodUnits

String

 

 

The contract period units

days | months

 

IsUnlimited

boolean

 

 

This flag is true if the contract is for an unlimited period

 

Action

String

 

 

The action performed after the subscription expires.

Possible values CANCEL | RESTART

 

EmailsDuringContract Boolean

 

 

True or False depending on whether you suppress renewal notification emails throughout the duration of the contract or not.

 

UsageBilling

Int

 

 

The usage billing interval must be smaller than or equal to the grace period.

 

Interval of time within the grace period, when the 2Checkout system attempts to automatically charge customers for recurring costs and additional metered usage fees (in arrears). 2Checkout renews subscriptions only after subscribers make all outstanding payments per the renewal settings (from the expiration or the renewal date). If automatic renewal and usage charges fail, subscriptions can be manually renewed only by the end of the grace period, after which they expire.

 

Can be NULL.

 

GracePeriod

Object

 

Type

String

 

 

CUSTOM – you configured grace period setting at product level.

GLOBAL – global grace period settings apply.

 

Period

String

 

 

Number of days set for the grace period.

 

PeriodUnits

String

 

 

D - Days.

 

IsUnlimited

Boolean

 

 

True or False depending on whether you set the grace peri2od to unlimited or not.

 

RenewalEmails

Object

 

 

Details below. Can be NULL. Available only in Product API 2.5 and later.

 

Type 

String

 

 

GLOBAL - Send emails according to the global renewal notification settings.

CUSTOM – per product renewal notification settings

 

Settings

Object (can be NULL)

 

 

Details below.

 

ManualRenewal Object (can be NULL)

 

 

Details below.

 

Before30Days Boolean

 

 

True or False.

 

Before15Days Boolean

 

 

True or False.

 

Before7Days Boolean

 

 

True or False.

 

Before1Day 

Boolean

 

 

True or False.

 

OnExpirationDate Boolean

 

 

True or False.

 

After5Days

Boolean

 

 

True or False.

 

After15Days 

Boolean

 

 

True or False.

 

AutomaticRenewal

Object (can be NULL)

 

 

Details below.

 

Before30Days Boolean

 

 

True or False.

 

Before15Days Boolean

 

 

True or False.

 

Before7Days Boolean

 

 

True or False.

 

Before1Day 

Boolean

 

 

True or False.

 

OnExpirationDate 

Boolean

 

 

True or False.

 

After5Days

Boolean

 

 

True or False.

 

After15Days 

Boolean

 

 

True or False.

FulfillmentInformation

Object

 

Details below. Can be NULL. Available only in Product API 2.5 and later.

 

IsStartAfterFulfillment  Boolean

 

 

True or False. Depending on whether you want the subscription lifetime to start afther the completion of the fulfillment process or not.

 

IsElectronicCode 

Boolean

 

 

True or False. Depending on whether you configure the delivery of keys/codes for the product or not.

 

IsDownloadLink 

Boolean

 

 

True or False. Depending on whether you configure the delivery of a product file or not.

 

IsBackupMedia 

Boolean

 

 

True or False. Depending on whether you configure the delivery of backup media or not.

 

IsDownloadInsuranceService Boolean

 

 

True or False. Depending on whether you enable the Download Insurance Service or not, for a product for which you configure a product file.

 

IsInstantDeliveryThankYouPage Boolean

 

 

True or False. Depending on whether you enable instant delivery in the Thank You page or not.

 

IsDisplayInPartnersCPanel Boolean

 

 

True or False. Depending on whether you share access to the product file with your channel partners or not.

 

CodeList 

Object (can be NULL)

 

 

Details below.

 

Code 

String

 

 

The unique code list identifier.

 

Name 

String

 

 

Name of the code list.

 

Type 

String

 

 

Code list type:

  • STATIC

DYNAMIC

 

BackupMedia 

Object (can be NULL)

 

 

Details below.

 

Code 

String

 

 

The unique backup media identifier.

 

Name 

String

 

 

Name of the backup CD/DVD.

 

Type 

String

 

 

Media type:

CD

 

ProductFile

Object (can be NULL)

 

 

Details below.

 

Code 

String

 

 

Unique product file identifier.

 

Name 

String

 

 

Display name.

 

File 

String

 

 

Name of the product file.

 

Version 

String

 

 

File version.

 

Size

String

 

 

File size.

 

Type 

String

 

 

File type.

 

LastUpdate 

String

 

 

YYYY-MM-DD HH-MM-SS. Date time stamp when you last updated the file.

 

AdditionalInformationByEmail String (can be NULL)

 

 

The text you set up in the Additional fulfillment information - by email area.

 

AdditionalInformationEmailTranslations Object (can be NULL)

 

 

Array of localized Additional fulfillment information - by email texts.

 

AdditionalThankYouPage String (can be NULL)

 

 

The text you set up in the Additional fulfillment information - "Thank you" page area.

 

AdditionalThankYouPageTranslations Array (can be NULL)

 

 

Array of localized Additional fulfillment information - "Thank you" page texts.

 

Add translations

Overview

Use the addPromotionTranslations method to add localized texts to existing promotions.

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 translations to.

promotions

Required (array of PromotionTranslations objects)

PromotionTranslations  Object

 

language

Required (string)

 

 

ISO country code corresponding to the country you want to set the translation for.

 

name

Required (string)

 

 

Localized promotion name applicable to the selected country.

Response

Parameters Type/Description

promotionTranslation

Object

Request

<?php

require ('PATH_TO_AUTH');

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

// Defining a translation for German shoppers
$promotionTranslation1 = new stdClass;
$promotionTranslation1->Language = 'de'; 
$promotionTranslation1->Name = 'YOUR_GERMAN_PROMOTION_NAME';

// Defining a translation for Bulgarian shoppers
$promotionTranslation2 = new stdClass;
$promotionTranslation2->Language = 'bg'; 
$promotionTranslation2->Name = 'YOUR_BULGARIAN_PROMOTION_NAME';

$translations = [$promotionTranslation1, $promotionTranslation2];

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

 

Pricing

Overview

Update subscription plan/product pricing using the PriceOptionsGroup and the PricingConfiguration objects.

PriceOptionsGroup  

Use this object to add/create and edit/update price options for your account.

Parameters Type/Description

PriceOptionsGroup

Object

Name

String

 

Price option group name. Use this parameter when adding a new price options group. To edit the name of a price option group use the Name parameter under the Translations object.

Description

String

 

Pricing option group description.

Translations

Array of objects

 

Details below.

 

Name

String

 

 

Product pricing options group name, localized under Options.

 

Description

String

 

 

Product pricing options group description, localized under Options.

 

Language

String

 

 

ISO language code. (ISO 639-1 two-letter code).

Code

String

 

Unique code that The 2Checkout system generates or set for each pricing options group.

Type

String

 

The type of the pricing options group. Possible values:

· RADIO

· CHECKBOX

· INTERVAL

· COMBO

Options

Array of objects

 

Details below.

 

Name

String

 

 

Pricing option child name.

 

Description

String

 

 

Pricing option child description.

 

Translations

Array of objects

 

 

Details above.

 

 

Name

String

 

 

 

Localized product pricing options group name under PriceOptionGroup.

Localized pricing option child name under Options.

 

 

Description

String

 

 

 

Localized product pricing options group description under PriceOptionGroup.

Localized pricing option child description under Options.

 

 

Language

String

 

 

 

ISO language code. (ISO 639-1 two-letter code).

 

Code

String

 

 

The code you set or that the 2Checkout system generated for each pricing option child inside a pricing options group parent.

 

ScaleMin

Int

 

 

The minimum value of a scale interval set for each pricing option child inside a pricing options group parent of the type INTERVAL.

 

ScaleMax

Int

 

 

The maximum value of a scale interval set for each pricing option child inside a pricing options group parent of the type INTERVAL.

 

SubscriptionImpact

Object

 

 

Details below.

 

Months

String

 

 

The value in months the 2Checkout system adds or subtracts from the initial billing cycle of a subscription.

 

Impact

String

 

 

Possible values:

· ADD

· SUBTRACT

· LIFETIME

 

PriceImpact

Object

 

 

Details below.

 

 

ImpactOn

String

 

 

 

Possible values:

  • BASE corresponding to impact on base price
  • GLOBAL for impact on calculated sum.

 

 

Impact

String

 

 

 

Impact on price per unit:

  • ADD
  • SUBTRACT

 

 

Percent

String

 

 

 

The value of the percentage out of the price per product unit, when you use PERCENT for Method.

 

 

Method

String

 

 

 

Possible values:

· PERCENT

· FIXED

 

 

Amounts

Array of objects.

 

 

 

Details below.

 

 

 

Currency

String

 

 

 

 

Currency ISO code - ISO 4217.

 

 

 

Amount

String

 

 

 

 

The amount defined for each specific currency active for your account, when you use FIXED for Method.

 

Default

Boolean

 

 

TRUE for preselected options.

Missing for options that are not preselected.

PriceOptionGroup  

Use this object to search for, retrieve information on price option groups (including those assigned to specific products) for your account.

Parameters Type/Description

PriceOptionGroup

Array of objects

Name

String

 

Price option group name.

 

Use this parameter when adding a new price options group.

 

To edit the name of a price option group use the Name parameter under the Translations object.

Description

String

 

Pricing option group description.

Translations

Array of objects

 

Details below.

Code

String

 

Unique code that The 2Checkout system generates or set for each pricing options group.

Type

String

 

The type of the pricing options group. Possible values:

· RADIO

· CHECKBOX

· INTERVAL

· COMBO

Options

Array of PriceOption objects

 

Details below.

 

Parameters Type/Description

PriceOption

Object

Code

String

 

The code you set or that the 2Checkout system generated for each pricing option child inside a pricing options group parent.

ScaleMin

Int

 

The minimum value of a scale interval set for each pricing option child inside a pricing options group parent of the type INTERVAL.

ScaleMax

Int

 

The maximum value of a scale interval set for each pricing option child inside a pricing options group parent of the type INTERVAL.

SubscriptionImpact

SubscriptionLifetimeImpact object

 

Details below.

PriceImpact

Object

 

Details below.

Default

Boolean

 

TRUE for preselected options.

Missing for options that are not preselected.

Name

String

 

Pricing option child name.

Description

String

 

Pricing option child description.

Translations

Array of objects

 

Details below.

 

Parameters Type/Description

SubscriptionLifetimeImpact

Object

Months

String

 

The value in months the 2Checkout system adds or subtracts from the initial billing cycle of a subscription.

Impact

String

 

Possible values:

· ADD

· SUBTRACT

· LIFETIME

 

Parameters Type/Description

PriceImpact

Object

ImpactOn

String

 

Possible values:

  • BASE corresponding to impact on base price
  • GLOBAL for impact on calculated sum.

Impact

String

 

Impact on price per unit:

  • ADD
  • SUBTRACT

Percent

String

 

The value of the percentage out of the price per product unit, when you usePERCENT for Method.

Method

String

 

Possible values:

· PERCENT

· FIXED

Amounts

Array of objects.

 

Details below.

 

Parameters Type/Description

Amount

Object

Currency

String

 

Currency ISO code - ISO 4217.

Amount

String

 

The amount defined for each specific currency active for your account, when you use FIXED for Method.

 

Parameters Type/Description

Translations

Object

Name

String

 

Localized product pricing options group name under PriceOptionGroup.

Localized pricing option child name under Options.

Description

String

 

Localized product pricing options group description underPriceOptionGroup.

Localized pricing option child description under Options.

Language

String

 

ISO language code. (ISO 639-1 two-letter code).

PricingConfiguration  

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 Type/Description

PricingConfiguration

Object

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.

 

Recurring payment failed (Direct Debit)

Overview

Use the variables in the list below to customize the Recurring payment failed (Direct Debit).

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
2CHECKOUT_LOGO 2Checkout logo URL https://secure.2checkout.com/images/e...endor_logo.png Yes

BANKACCOUNT

2Checkout bank account

[NLXXABNAXXXXXXXXXX (IBAN)]

No

BANKIBAN

2Checkout bank IBAN

ABNANL2XXX

No

BANKNAME

2Checkout bank name

 ABN AMRO Bank Amsterdam

No

BANKROUTINGNUMBER

2Checkout bank routing number

0

No

BANKSWIFT

2Checkout bank swift code

ABNANL2XXX

No

BUSINESS_COMPANY

2Checkout company name

2Checkout

No

BUSINESS_HOTLINE

2Checkout support phone

0

No

BUSINESS_HOTLINEUS

2Checkout US hotline number

0

No

BUSINESS_OPEMAIL

2Checkout operational email address

0

No

BUSINESS_SUPEMAIL

2Checkout support email address

support@2checkout.com

No

BUSINESS_WEBSITE

2Checkout website

http://www.2checkout.com

Yes

BUY_NOW_NEW_LINK

* Prefilled buy link

0

No

COMMERCIALNAME

Merchant's commercial name

0

Yes

CURRENCY

Order billing currency

EUR]

Yes

CURRENCY_ORIGINAL

Original order currency (applicable to refunds)

0

No

ENCRYPTED_MERCHANT_CODE

Encrypted merchant code

FGTH45HG

No

FIRSTNAME

Shopper's first name used on the delivery information

First

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

GENERALTOTAL

Total order price

[23

Yes

HAS_RENEWAL_PRODUCTS

Flag that indicates whether at least one product has renewal settings

0

No

IS_RENEWAL

Flag that indicates whether at least one product has renewal settings

0

No

LASTNAME

Shopper's last name used on the delivery information

Last

No

MYACCOUNT_URL_UPDATE_CC

URL for updating credit card information in myAccount

0

No

MY_ACCOUNT_URL_UPDATE_CC

URL for updating credit card information in myAccount

http://www.example.com/myaccount/

No

NAMES_OF_PRODUCTS

Names of all products in the order, comma-separated

0

No

ORDERDATE

Order placement date

41641

Yes

ORDER_AMOUNT_ORIGINAL

Original order value (applicable to refunds)

0

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

PAYMENT_TYPE_INFO

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

0

No

PRODUCTS

0

0

No

PRODUCTS[index1].BILLING_CYCLE

Indicates how many renewals have been successfully performed so far (on the subscription)

11

No

PRODUCTS[index1].DISCOUNT

Product discount value per product line

[2.00

No

PRODUCTS[index1].INFO

Additional product information defined by the merchant when generating buy links

[Product name info]

No

PRODUCTS[index1].LICENSE_TYPE

Type of purchased subscription

TRIAL

No

PRODUCTS[index1].PCODE

Product code.

2016

No

PRODUCTS[index1].PID

Product ID number

4572431

No

PRODUCTS[index1].PNAME

Product name

Product name

No

PRODUCTS[index1].PRICE

Product unit price

[20.00

No

PRODUCTS[index1].PRODUCT_OPTIONS[index2]

0

0

No

PRODUCTS[index1].PRODUCT_OPTIONS[index2].OptionText

Ignore internal var.

0

No

PRODUCTS[index1].PROMONAME

Name of the promotion applied to the product

[Some promotion]

No

PRODUCTS[index1].QUANTITY

Purchased product quantity

[1]

No

PRODUCTS[index1].SHORT_DESCRIPTION

Short product description

0

No

PRODUCTS[index1].TOTAL

Total gross price per product line (before applying discounts)

[23.00

No

PRODUCTS[index1].VAT

VAT/Sales tax value per product line

[5

No

PRODUCTS_DATA[index1].IdProduct

Product ID number

0

No

PRODUCTS_DATA[index1].PRODUCT_SHORT_DESCRIPTION

Short product description

0

No

PRODUCTS_LIST

Products data.

Product name

Yes

PRODUCTS_NO

Number of products in cart

1

No

REFNO

Order reference number

[9xxxxx]

Yes

RETRYLINK

Payment retry link

https://shop.example.com/order/finis...?id=xxxxxxxxxx

No

RETRY_LINK

Payment retry link

0

No

SELLERCOMPANY

Merchant's company name

[Software Company Name]

No

TOTALEQUIV

The order amount converted to all the merchant's currencies

0

No

UNSUBSCRIBE_LINK

Shopper unsubscribe link

0

No

UPLOADLINK

File upload link

0

No

UPLOAD_LINK

File upload link

0

No

WEBSITE

Website where the shopper placed the order

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

No

How to add affiliate marketing resources

Availability

The text and image affiliate marketing resources are available for all 2Checkout accounts with the Affiliate Network enabled.

Activate affiliate landing pages

If you want to activate landing pages for your affiliates, please contact 2Checkout for details.

Tip: Before you start adding Affiliate Marketing Resources, make sure you have them uploaded on a server. You can use your own hosting domain, or upload them in your 2Checkout Account by going to Setup -> Media Center.

Allowed file types: .gif .jpg .png .css .js .ico .zip .ttf. Upload file size limit: 750 MB. For larger files please contact us. Disk space 2048 MB. 

For maximum browser compatibility, JPEG files must have the RGB color space. JPEG files uploads of CMYK type are not allowed.

How to add affiliate marketing resources

Assist your affiliates' efforts in selling your products with additional marketing materials:

  • Custom text (descriptions, features, etc.) - Use custom texts to offer your affiliates extra details about your products that they can use to better promote them. Offers details such as the target audience of the product, its specifications, benefits and advantages.
  • Links to product image files - Use product images to offer your affiliates extra details about your products that they can use to better promote them.
  • Custom landing pages - Use custom made landing pages to give your affiliates the option to redirect shoppers to landing pages designed to optimize your conversion rate and increase sales.

To control affiliate access to a resource, assign it to products that belong to one of your affiliate commissions lists. Unassigned resources are available to all your affiliates. Promotions are not mandatory for a resource to be available in the Affiliate Network.

What are affiliate landing pages?

Custom landing pages allow you to redirect your affiliates' traffic to separate pages designed to increase the conversion rate. By using custom landing pages for each product, you gain more control over your shoppers' purchase experience.

Additionally, landing pages give your affiliates an easy way to send targeted traffic to your products, increasing the conversion rate per product by narrowing down the traffic to visitors who are truly interested in buying what you offer.

2Checkout recommends creating multiple landing pages for your products, thus increasing the chance of receiving relevant traffic from your affiliates.

How to add new affiliate marketing resources

You can define these resources in the Affiliate Marketing Resources area of the Control Panel. To access it, navigate to Marketing tools -> Channel resources.

  1. Click Add affiliate resource.
  2. Choose the type of the marketing resource to add. You can choose between:
    • Text
    • Image
    • Landing page
  3. Define the details of the new resource:
    • For text resources: name and description
    • For image resources: name and URL
    • For landing pages: name and URL
  4. Assign products to the marketing resource by clicking Assign product and choosing the products you want to assign to this resource from the list. You can search for specific products in the Product name search box.
  5. (Optional) Assign promotions to the marketing resource by clicking Assign promotion and choosing the promotions you want to assign to this resource from the list. You can search for specific promotions in the Search promotion search box.
  6. Click Save resource

That's it! You can now see the resource in the Affiliate Marketing Resources page. You can edit or delete it as you please.

What do your affiliates see?

Affiliates can see the marketing resources in the Affiliate Control Panel when they generate new links for your products. They can use the Link type drop-down menu to select the type of resource to use: text, image or landing page.

In the example below, the affiliate chose to use a landing page called My New Landing Page. Once they generate the link, the shoppers accessing it will be redirected to your new landing page.

Your affiliates can see a preview of each resource by clicking the preview links in the Marketing materials section.

By using the landing page's URL, your affiliates can redirect segments of their traffic to each product's landing page.

Manage leads

Overview

Use the markLeads method to mark a lead as used and/or stop follow-ups.

Request Parameters

Parameters Required Type/Description
LeadCode Required String. Unique system-generated identifier.
Used Required

Boolean. With possible values:

TRUE - 

FALSE - 

StopFollowups Required

Boolean. With possible values:

TRUE - 

FALSE - 

Request Example

<?php

require ('PATH_TO_AUTH');

$markLead = [
    'LeadCode' => '60E6C4B574',
    'StopFollowups' => false,
    'Used' => true
];

try {
    $leadData = $client->markLeads($sessionID, [$markLead]);
} catch (SoapFault $e) {
    echo "markLeads: " . $e->getMessage();
    exit;
}

var_dump("markLeads", $leadData);

Response Example

class stdClass#18 (2) {
  public $Response =>
  string(37) "1 leads have been marked successfully"
  public $Errors =>
  array(0) {
  }
}

Update a customer

Overview

Use the updateCustomerInformation method to update the details of a customer entity from the Avangate system.

Parameters

Parameters Type/Description

sessionID

Required (string)

 

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

Customer

Object (required)

Use this object to update customer information.

UpdateEndUserSubscriptions

Optional (boolean)

You can push the changes made on the customer info to the end-user details for all subscriptions belonging to this customer. Set true to have the changes reflected on the end-user details for all subscriptions. If null or false, the changes are made only at the customer level. Default value is false.

Response

Parameters Type/Description

Boolean

true or false depending on whether or not the operation succeeded.

Request


<?php
$host   = "https://api.avangate.com";
$client = new SoapClient($host . "/soap/4.0/?wsdl", array(
    'location' => $host . "/soap/4.0/",
    "stream_context" => stream_context_create(array(
        'ssl' => array(
            'verify_peer' => false,
            'verify_peer_name' => false
        )
    ))
));

function hmac($key, $data)
{
    $b = 64; // byte length for md5
    if (strlen($key) > $b) {
        $key = pack("H*", md5($key));
    }
    
    $key    = str_pad($key, $b, chr(0x00));
    $ipad   = str_pad('', $b, chr(0x36));
    $opad   = str_pad('', $b, chr(0x5c));
    $k_ipad = $key ^ $ipad;
    $k_opad = $key ^ $opad;
    return md5($k_opad . pack("H*", md5($k_ipad . $data)));
}
$merchantCode = "YOUR_MERCHANT_CODE";// your account's merchant code available in the 'System settings' area of the cPanel: https://secure.avangate.com/cpanel/account_settings.php
$key = "YOUR_SECRET_KEY";// your account's secret key available in the 'System settings' area of the cPanel: https://secure.avangate.com/cpanel/account_settings.php
$now          = gmdate('Y-m-d H:i:s'); //date_default_timezone_set('UTC')
$string = strlen($merchantCode) . $merchantCode . strlen($now) . $now;
$hash   = hmac($key, $string);
try {
    $sessionID = $client->login($merchantCode, $now, $hash);
}
catch (SoapFault $e) {
    echo "Authentication: " . $e->getMessage();
    exit;
}
$customerReference = 298084139;
$externalCustomerReference = 'Apitest123456'; //Optional, but if you include it it needs to belong to the same customer as the internal Avangate customer reference
try {
    $customerInfo = $client->getCustomerInformation($sessionID, $customerReference, $externalCustomerReference);
}
catch (SoapFault $e) {
    echo "customerInfo: " . $e->getMessage();
    exit;
}
$customerInfo->Email = 'newemailaddressupdated@email.com';
$UpdateEndUserSubscriptions = false; // // Optional, but if true the changes made on customer info are pushed to all subscriptions from this customer.
try {
    $updatedCustomerInfo = $client->updateCustomerInformation($sessionID, $customerInfo, $UpdateEndUserSubscriptions);
}
catch (SoapFault $e) {
    echo "updatedCustomerInfo: " . $e->getMessage();
    exit;
}
var_dump("updatedCustomerInfo", $updatedCustomerInfo);

Retrieve account's time zone

Overview

Use the getTimezone method to retrieve information on the time zone used by your account for the Avangate API.

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.

Response

Timezone

String

 

The time zone you selected or the default GMT+02:00 time zone of the Avangate system.

Request


<?php
$host   = "https://api.avangate.com";
$client = new SoapClient($host . "/soap/4.0/?wsdl", array(
    'location' => $host . "/soap/4.0/",
    "stream_context" => stream_context_create(array(
        'ssl' => array(
            'verify_peer' => false,
            'verify_peer_name' => false
        )
    ))
));

function hmac($key, $data)
{
    $b = 64; // byte length for md5
    if (strlen($key) > $b) {
        $key = pack("H*", md5($key));
    }
    
    $key    = str_pad($key, $b, chr(0x00));
    $ipad   = str_pad('', $b, chr(0x36));
    $opad   = str_pad('', $b, chr(0x5c));
    $k_ipad = $key ^ $ipad;
    $k_opad = $key ^ $opad;
    return md5($k_opad . pack("H*", md5($k_ipad . $data)));
}
$merchantCode = "YOUR_MERCHANT_CODE";// your account's merchant code available in the 'System settings' area of the cPanel: https://secure.avangate.com/cpanel/account_settings.php
$key = "YOUR_SECRET_KEY";// your account's secret key available in the 'System settings' area of the cPanel: https://secure.avangate.com/cpanel/account_settings.php
$now          = gmdate('Y-m-d H:i:s'); //date_default_timezone_set('UTC')
$string = strlen($merchantCode) . $merchantCode . strlen($now) . $now;
$hash   = hmac($key, $string);
try {
    $sessionID = $client->login($merchantCode, $now, $hash);
}
catch (SoapFault $e) {
    echo "Authentication: " . $e->getMessage();
    exit;
}
try {
    $Timezone = $client->getTimezone($sessionID);
}
catch (SoapFault $e) {
    echo "Timezone: " . $e->getMessage();
    exit;
}
var_dump("Timezone", $Timezone);

Search leads

Overview

Use the searchLeads method to retrieve leads created in the 2Checkout system.

Request Parameters

Parameters Required Type/Description
Page Required String. The page in the result set.
Limit Required Number. The number of items to be retrieved on each page.

Request Example

<?php

require ('PATH_TO_AUTH');

$LeadSearchInput = new stdClass();

$LeadSearchInput->Type = "New";
$LeadSearchInput->Language = "BG";
$LeadSearchInput->Country = "RO";
$LeadSearchInput->Page = 1;
$LeadSearchInput->Limit = 200;

try {
    $leadData = $client->searchLeads($sessionID, $LeadSearchInput);
} catch (SoapFault $e) {
    echo "searchLeads: " . $e->getMessage();
    exit;
}

var_dump("searchLeads", $leadData);

Response Example

class stdClass#4 (2) {
  public $Items =>
  class stdClass#5 (1) {
    public $0 =>
    class stdClass#6 (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#7 (1) {
        public $0 =>
        class stdClass#8 (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#9 (5) {
            public $CycleLength =>
            NULL
            public $CycleUnit =>
            NULL
            public $CycleAmount =>
            NULL
            public $ContractLength =>
            NULL
            public $ContractUnit =>
            NULL
          }
          public $RenewalInformation =>
          class stdClass#10 (1) {
            public $SubscriptionReference =>
            NULL
          }
          public $MarketingCampaigns =>
          class stdClass#11 (3) {
            public $Type =>
            string(2) "23"
            public $ParentCode =>
            string(1) "m"
            public $CampaignCode =>
            string(2) "23"
          }
          public $Price =>
          class stdClass#12 (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#13 (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#14 (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#15 (1) {
        public $ShippingMethod =>
        class stdClass#16 (1) {
          public $Code =>
          string(5) "sdfsd"
        }
      }
      public $PaymentDetails =>
      class stdClass#17 (4) {
        public $Type =>
        string(2) "CC"
        public $Currency =>
        string(3) "EUR"
        public $PaymentMethod =>
        class stdClass#18 (2) {
          public $RecurringEnabled =>
          bool(false)
          public $CardPayment =>
          class stdClass#19 (1) {
            public $InstallmentsNumber =>
            string(2) "23"
          }
        }
        public $CustomerIP =>
        string(7) "1.2.3.4"
      }
      public $Promotions =>
      array(1) {
        [0] =>
        string(0) ""
      }
    }
  }
  public $Pagination =>
  class stdClass#20 (3) {
    public $Page =>
    int(1)
    public $Limit =>
    int(200)
    public $Count =>
    int(1)
  }
}

Launch new online revenue streams, fast

Do you have a blueprint for selling online? Most companies recognize the need to transition from selling products to services but struggle with how to strategize, execute and successfully roll out the change within their organizations.

HP Software and IDC Research discussed about

  • What is Digital Commerce, and Why is it growing so fast?
  • What challenges can you expect when you transition to SaaS?
  • How to identify all the elements needed for a global approach to online sales

Watch our interactive session that combines an analyst perspective with the real-world experience of an enterprise software leader, and walk away with insights that you can apply immediately.

Join Our Webinar

 

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