Skip to main content

Enable/Disable products

Overview

Use the setProductStatus method to enable / disable products 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.

productCode

Required (string)

 

Use this object to configure your subscription plan/products.

 

You can set all Product parameters except AvangateID. The 2Checkout system sets the unique product ID. The AvangateID is not editable.

Status

Required (Boolean)

 

True or False, depending on whether you want to enable or disable a subscription plan/product.

Request

<?php

require ('PATH_TO_AUTH');

$productCode = "YourProductCode";

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

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

?>

 

Response

bool(true)

Contracts

Overview

Subscription contract period capabilities provide an increased level of control over the evolution and lifecycle of subscriptions sold to your customers, on top of billing cycles. Adding a contract period to a subscription means that you can configure subscriptions that:

  • Renew a number of times during a contractual period after which the contract is automatically restarted, unless customers opt-out;
  • Renew a number of times during a contractual period after which the contract expires causing the subscriptions it governs to be disabled and blocking customers from renewing, either automatically or through manual payments.

Availability

Contact 2Checkout directly if you wish to start using contracts for your subscriptions. 

Requirements

Subscription contract period functionality can be used only in conjunction with products for which subscriptions are generated.

Contract settings impact only active subscriptions.

Create a subscription contract period

To create a subscription contract period, follow the steps:

  1. Go to Setup -> Products.
  2. Ssearch and find the product for which you want to define a subscription contract
  3. Click Edit.
  4. Select the Billing cycle specific for the subscriptions generated for the product from the list of options available under the Billing cycle drop down menu. Note:Subscription contract period is not available when the one time fee option is selected / for evergreen subscriptions.
  5. Configure the Contract period in months.

Contract period options

There are two subscription contract periods:

  1. Unlimited - When this option is selected, Contracts have no impact on the billing cycle or the lifecycle of subscriptions. Essentially, subscription with the billing cycle set to 1 month will be renewed on a monthly basis indefinitely is the Contract option selected is unlimited.
  2. Limited to [number of months] - When this option is selected, the Contract limits billing cycles to the number of months you configure.

Use this option to define the period of time the subscription can be renewed, according to the billing cycles configuration, per contract agreed with your customers. In addition, you can also set the outcome of the Contract expiration, by choosing one of two options:

  1. Automatically renews - 2Checkout renews the Contract automatically at the end of the contract period defined with the same value (if it was not modified), unless customers choose to not prolong the agreement, by opting out of the contract. Contracts restart when subscriptions are renewed for the first time past the duration of the old contract. If the value of the Contract period is modified, it will only impact new subscriptions sold. Existing subscriptions move under the new Contract when they renewed for the first time past the period of the old contract.
  2. Expires - the Contract expires at the end of the contract period defined. When Contracts expire the subscriptions they govern also expire automatically, and will not be switched to the manual renewal model. Customers will not be given the chance to prolong their agreement and the life of the subscription. The 2Checkout system will not send out emails to let customers make payments manually to renew subscriptions and their Contracts.

Editing contract settings

Contract period settings for a product can be edited at any time. However, the new contract period set will only impact new subscriptions sold to customers. Existing subscriptions will continue to be governed by the same contract as when they were first sold, until the contract is automatically renewed or expires. When subscriptions are renewed, 2Checkout swapes the period parameters of the old contract for the current contract settings defined.

Subscription upgrades

For an upgrade from Product A to Product B, where both products have contract settings the expected behavior for the subscription is to switch start a new contract cycle according to Product's B settings.

 

Product A

Product B

Subscription after upgrade from Product A to Product B

Contract

Yes

Yes

Yes (Product B Contract period settings)

No

Yes

Yes

No

No (Product B Contract period settings)

No

No

Renew with new product version

  1. When renewing with a new product version, from Product A to Product B, where Product A has no contract settings and B has contract settings, the expected behavior for the subscription is to start a contract on Product B's Contract settings.
  2. When renewing with a new product version from Product A to Product B, where Product A nd Product B both have contract settings, the expected behavior for the subscription to have its contract period swapped to the Product B Contract settings the first time it's renewed past the Contract period of Product A.
  3. If the contract for Product A is set to expire, then subscriptions will work only until contract expiration deadline, after which they will be disabled, regardless if the contract settings of Product B, in the context of a renewal with a new product version.

Trials

Contracts for products for which you're offering free or paid trails to your customers only start impacting subscriptions after evaluation versions converted to paying products.

Shopper emails for contracts

In concert with Subscription contract period feature, you can control emails 2Checkout sends to customers. Two options are available to send shopper emails:

  1. For each Billing cycle period - Customers  continue to receive emails according to the setup in place and your strategy to communicate subscription renewals and charges. Messages include:
    • Renewal notifications
    • Order confirmations
    • Payment receipts
  2. At the end of the Subscription contract period - Emails are sent to customers only at the end of the subscription contract period. When this option is selected, the 2Checkout system blocks all emails from being sent to the customers using the subscriptions of the product impacted by this configuration. As such, customers will not receive:
    • Renewal notifications;
    • Order confirmations;
    • Payment receipts.

 

Send shopper emails each billing cycle period:

  • The 2Checkout system sends emails to shoppers each billing cycle for limited contracts that are set to automatically renew.
  • The 2Checkout system sends emails to shoppers each billing cycle except the last, after which subscriptions are disabled for limited contracts that are set to expire.

 

Send shopper emails each subscription contract period:

  • The 2Checkout system send emails to shoppers when they first purchase the subscription and at the end of the last billing cycle of the contract period as well as the first time they renew after the contract is restarted for limited contracts that are set to automatically renew.
  • The 2Checkout system send emails to shoppers only when they first purchase the subscription for limited contracts that are set to expire.

Manual renewal messages

Send shopper emails each:

  • Billing cycle period: shoppers continue to receive manual renewal notifications ahead of the next upcoming expiration deadline as long as they manually renew their subscription.
  • Subscription contract period: shoppers do not receive manual renewal notifications.

FAQ

  • What happens when the contract period is not a multiple of billing cycles?

    • If the contract period is not a multiple of billing period, for example a 7 months contract for a subscription set to renew every 3 months, then the 2Checkout system will allow subscriptions to be renewed either automatically or manually only as long as the contract period is not exceeded. For example, in the scenario of a 3 months billing cycle subscription governed by a 7 months contract there will be only 2 billing cycles/ contract, after which the contract auto-renews or expires, according to the settings you configured.

Pause subscription

Overview

Use the pauseSubscription method to suspend all automatic charges for a predefined time period for a subscription.

Request Parameters

Parameters Required Type/Description
SubscriptionRef Required String. The system-generated reference code of the subscription.
ResumeDate Required Number.  Date when the subscription should be resumed. Format "YYYY-MM-DD". The resume date needs to be set within 3 years starting from the day the subscription expires. The timezone used is the one on the server.
PauseReason Optional String. Freeform text filled in by the merchant. Text is limited to 100 characters.

Request Example

<?php
$sb = "58";
$vers = "6.0";
$client = new SoapClient("http://api.sandbox" . $sb . ".avangate.local/soap/$vers/?wsdl", array(
    'location' => "http://api.sandbox" . $sb . ".avangate.local/soap/$vers/",
    'cache_wsdl' => WSDL_CACHE_NONE,
    "trace" => 1));
$date = gmdate('Y-m-d H:i:s');
$merchantCode = "666999";
$key = "%y~8|m]T84p[W4+O1]_?";
$string = strlen($merchantCode) . $merchantCode . strlen($date) . $date;
$hash = hash_hmac('md5', $string, $key);
$sessionID = $client->login($merchantCode, $date, $hash);
var_dump("session: ", $sessionID);
//$client->__setCookie('XDEBUG_SESSION', 'PHPSTORM');
$SubRef = "B7D8E72224";
$resumeDate = "2020-09-30 17:00:00";
$reason = "vacation leave";
try {
    $addPause = $client->setRenewalPause($sessionID, $SubRef, $resumeDate, $reason);
    var_dump("setRenewalPause:", $addPause);
} catch (SoapFault $e) {
    echo "Error setRenewalPause: " . $e->getMessage();
}
try {
    $renewalPause = $client->getRenewalPause($sessionID, $SubRef);
    var_dump("getRenewalPause:", $renewalPause);
} catch (SoapFault $e) {
    echo "Error getRenewalPause: " . $e->getMessage();
}
exit;

Response 

The pauseSubscription call returns the above TRUE/FALSE parameters.

Parameters Type/Description
SubscriptionRef

Boolean

  • TRUE - if the call was successful and a pause was scheduled; 
  • FALSE - if the pause mechanism is not enabled for the merchant OR any of the eligibility conditions were not met OR pause is not enabled for the product OR the maximum pause duration for the product was exceeded. In this case, the system also throws the following message: "The subscription is not eligible for pause."
ResumeDate

Boolean

  • TRUE - if the call was successful and a pause was scheduled; 
  • FALSE - if the pause mechanism is not enabled for the merchant OR any of the eligibility conditions were not met OR pause is not enabled for the product OR the maximum pause duration for the product was exceeded. In this case, the system also throws the following message: "The subscription is not eligible for pause."

INS triggers

Set INS triggers

In your Control Panel Dashboard, navigate to Dashboard → Integrations → Webhooks and API and click on the INS settings tab. Select the events for which 2Checkout sends notifications from the list of options available under Triggers.

For each trigger enabled, you are able to select which URL endpoint receives the notification, as well as customize the list of parameters included in the notification. Read more about INS parameters here.

Instant Notification Service (INS) provides automatic notifications for orders from the 2Checkout system, based on the following list of triggers you control:

Trigger Message type Description
Order created ORDER_CREATED

Order creation is a new order placed online by a buyer. You may want to automate inventory management, fulfillment or setup of login credentials based on this message.

For recurring:

It creates a new subscription. For all subsequent orders attached to the same subscription, this trigger will not generate an INS (the sale_id is the same for all renewal orders, meaning that a new sale is not created).

Fraud status changed FRAUD_STATUS_CHANGED

All orders must pass 2Checkout’s fraud review before they will be billed; therefore sellers are advised that goods should not be delivered until they have passed this fraud review. If an order fails the fraud review it will also be canceled. An order may change the fraud status more than once.

Fraud Status Changed is an invoice level message; it will be sent once for each fraud status change on a sale and will contain information about all items ordered.

Invoice status changed INVOICE_STATUS_CHANGED

This status indicates the progress of the payment process. Most orders go from ‘approved’ to ‘pending’ to ‘deposited’, at which point they are applied to your balance.

Invoice Status Changed is an invoice level message; it will be sent once for each status change on an invoice and will contain information about all items ordered.

For recurring: this trigger sends an INS when a renewal order is placed (manual or automatic).

Ship status changed SHIP_STATUS_CHANGED

This message indicates that the ship_status of an order has changed, from ‘not_shipped’ to shipped (e.g. when an order is marked shipped).

Ship Status Changed is an invoice level message; it will be sent once for each shipping status change on an invoice and will contain information about all items ordered.

Refund issued REFUND_ISSUED

This message will allow you to automate more accurate inventory and financial tracking.

Refund Issued is an item level message; it will be sent once for each refund item issued (product or partial) and will only contain information about that item.

Recurring stopped RECURRING_STOPPED

Recurring orders can be stopped by the buyer or the seller. This message will notify you when a recurring sale has been stopped so that you can disable the buyer’s service in your application.

Recurring Stopped is an item level message; it will be sent once for each recurring item stopped and will only contain information about that item.

Recurring restarted RECURRING_RESTARTED

After being stopped, recurring orders can be restarted by 2Checkout staff for a variety of reasons, the most common being per customer request. In this most common case, a customer calls 2Checkout and requests to restart billing on a recurring order.

Recurring Restarted is an item level message; it will be sent once for each recurring item restarted and will only contain information about that item.

Recurring installment success RECURRING_INSTALLMENT_SUCCESS

Recurring orders bill automatically according to schedule. This message will allow you to automate any processes which should be keyed off successful installment billing, such as extension of login credentials.

This message will send the same customer information and sale_id (and vendor_order_id, if provided) as the original Order Created message, however the successful billing will have generated a new invoice_id and will have incremented the item_rec_install_billed_# parameter.

Recurring Installment Success is an item level message; it will be sent once for each recurring item billed successfully and will only contain information about that item.

It triggers an INS only for Auto-renewal. No INS will be triggered for manual renewals.

Recurring installment failed RECURRING_INSTALLMENT_FAILED

Recurring orders bill automatically according to schedule, but billings are not always successful. This message will allow you to automate any processes which should be keyed off installment billing failure, such as suspension of login credentials.

This message will send the information based on the last successful installment billed, in other words, the invoice number is the last invoice successfully billed, installments_billed is not incremented, and date_next will often be a date in the past, indicating the original due date for the missed billing.

Recurring Installment Failed is an item level message; it will be sent once for each recurring item which fails to bill and will only contain information about that item.

Recurring complete RECURRING_COMPLETE

Recurring orders bill automatically according to schedule, which ends a fixed amount of time after original order placement. This message will allow sellers to automate any processes which should be keyed off completion of installment billing, such as issuing permanent credentials or account closure.

Please Note: The RECURRING_INSTALLMENT_SUCCESS message will also be sent prior to the RECURRING_COMPLETE message.

Recurring Complete is an item level message; it will be sent once for each recurring item completed and will only contain information about that item.

This trigger generates an INS when the contract for the subscription is over. If the contract period is 2 months with auto-renewal every 1 month, a recurring complete notification will be sent after the 2 months have passed.

Catalog Product Created CATALOGUE_PRODUCT_CREATED This message will be sent whenever a new product is created. By enabling this trigger you will be notified for product creation via your account, via API or by product list import.
Catalog Product Updated CATALOGUE_PRODUCT_UPDATED This message will be sent whenever a product is updated. By enabling this trigger you will be notified for product updates, according to the parameters which are enabled on the trigger.
Proposal Updated PROPOSAL_UPDATED This message will be sent when a proposal is updated.

 

Retrieve a promotion

Overview

Use the getPromotion method to extract information on a promotion you set up 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.

PromotionCode

Required (string)

 

System-generated identifier 2Checkout associated with promotion campaigns.

Response

Parameters Type/Description
Promotion Object 

 

Request

<?php

require ('PATH_TO_AUTH');

$promotionCode = 'PROMOTION_CODE'; // code of the promotion that you want to update

try {
    $Discount = $client->getPromotion($sessionID, $promotionCode);
}
catch (SoapFault $e) {
    echo "Discount: " . $e->getMessage();
    exit;
}

var_dump("Discount", $Discount);

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.

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