Skip to main content

Place orders with catalog physical products

Overview

Use the placeOrder method to create an order using physical/tangible products defined in your Control Panel and collect the payment using credit card based payment methods.

Parameters

Parameters Type/Description

sessionID

Required (string)

 

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

Order

Required (Object)

 

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

Requirements

Add the product code of a tangible/physical product defined in your 2Checkout Control Panel. 

When placing orders for physical products, you can provide the shipping method that applies to the purchase in the API call, as part of the DeliveryInformation object.

Response

Parameters Type/Description

Order information

Object

  Object containing order information.

Request

<?php

require ('PATH_TO_AUTH');

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

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

$Order->BillingDetails = new stdClass();
$Order->BillingDetails->FirstName = 'First';
$Order->BillingDetails->LastName = 'Last';
$Order->BillingDetails->CountryCode = 'us';
$Order->BillingDetails->State = 'California';
$Order->BillingDetails->City = 'LA';
$Order->BillingDetails->Address1 = 'Address example';
$Order->BillingDetails->Address2 = NULL;
$Order->BillingDetails->Zip = '90210';
$Order->BillingDetails->Email = 'email@address.com';
$Order->BillingDetails->Phone = NULL;
$Order->BillingDetails->Company = NULL;
$Order->DeliveryDetails = NULL;

$Order->PaymentDetails = new stdClass ();
$Order->PaymentDetails->Type = 'CC';
$Order->PaymentDetails->Currency = 'usd';
$Order->PaymentDetails->PaymentMethod = new stdClass ();
$Order->PaymentDetails->CustomerIP = '10.10.10.10';
$Order->PaymentDetails->PaymentMethod->RecurringEnabled = true;
$Order->PaymentDetails->PaymentMethod->CardNumber = "4111111111111111";
$Order->PaymentDetails->PaymentMethod->CardType = 'visa';
$Order->PaymentDetails->PaymentMethod->ExpirationYear = '2019';
$Order->PaymentDetails->PaymentMethod->ExpirationMonth = '12';
$Order->PaymentDetails->PaymentMethod->CCID = '123';
$Order->PaymentDetails->PaymentMethod->HolderName = 'John';
$Order->PaymentDetails->PaymentMethod->CardNumberTime = 83.21; // can be null - high value in seconds is a red flag for fraud attempts.
$Order->PaymentDetails->PaymentMethod->HolderNameTime = 13.35; // can be null - high value in seconds is a red flag for fraud attempts.
$Order->PaymentDetails->PaymentMethod->Vendor3DSReturnURL = "http://www.success.ro";
$Order->PaymentDetails->PaymentMethod->Vendor3DSCancelURL = "http://www.error.ro"; 


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

var_dump("newOrder", $Order);

PriceOptionsGroupItemOptions Object structure

Parameters

Parameters Type/Description
Name String
  The name of the option inside the Pricing options group.
Value String
  The code of the option inside the Pricing options group.
Default Boolean
  True or false.
Description String
  The description of the option inside the Pricing options group.
MinValue Int
  The lowest value of a scale interval. Can be NULL.
MaxValue Int
  The highest value of a scale interval. Can be NULL.

Import subscriptions and credit card data

Overview

Migrate your subscription and customer credit card data from your or a third-party system and store it securely in the 2Checkout vault.

Availability

2Checkout Enterprise Edition accounts.

Contact 2Checkout Support directly to inquire about subscription and card migration costs.

Requirements

  1. PCI compliance. All entities involved in the process of migrating sensitive card information need to be PCI compliant. 2Checkout enjoys a Level 1 PCI DSS certification. Before moving forward with any data migration you need to contact 2Checkout Support directly for compliance.
  2. Data format. Read below for details of the PGP-encrypted CSV file structure.
  3. Valid import data. Filter data to migrate only active subscriptions and customers into the 2Checkout platform.
  4. Pre-migration checklist. Match all requirements on the pre-migration checklist.

Filter import data

To minimize the risk and rate of refunds/chargebacks, filter the import data, and communicate your customers to only migrate those who are aware that 2Checkout will process future recurring charges or manual payments.

Pre-migration checklist

eStore

  • Configure the products for which you’re importing subscriptions using the 2Checkout Merchant Control Panel. Match the 2Checkout Product ID of configured items with the product ID of subscriptions you’re importing via the CSV file, or the import process will fail. Also, make sure the renewal settings are correctly configured for each product.
  • Build a valid CSV file using the structure guidance described below, and include all mandatory fields.

Partner channel subscriptions

  • On top of the requirements above, also configure partner details in the 2Checkout Control Panel and use their unique partner ID when importing new subscriptions.
  • Merchants can see partner information at the subscription level so that they can identify this information for imported subscriptions as well.

Data format and structure

To import:

  • Package the data as CSV (comma-separated values) file.
  • Include the mandatory items described below on the header line and populate values where information is also required.
When importing subscriptions, you should keep in mind that the processing capacity of the browser supports  about  2500  lines in the csv file, and anything more than this threshold might result in  failure. Thus, we recommend  that you import batches lower than 2500 lines.

Field name

Type

Required

Can be empty?

Description

LicenseUniqueId

string (max length 250 chars)

Yes

Yes

Your unique identifier for the subscription. You can use the LicenseUniqueId to map identifiers in your own system with subscription IDs in 2Checkout. 

LicenceCode

string

No

Yes

System-generated 2Checkout unique subscription reference. 
Can be empty only if you supplied the LicenseUniqueId.

When first importing subscriptions into the 2Checkout system, LicenceCode is not required.

AvangateIdProduct

numeric

Yes

No

Must match the product ID of an item configured in the 2Checkout platform.

PurchaseDate

datetime

Yes

No

Subscription purchase date. Format: yyyy-mm-dd hh:mm:ss. Default time zone is GMT +2.

ExpirationDate

datetime

Yes

No

Subscription expiration date. Format: yyyy-mm-dd hh:mm:ss. Default time zone is GMT +2. 

ProductName

String (max length 155 chars)

Yes

No

The product name.

Quantity

numeric

Yes

No

2Checkout renews subscriptions using this number of units.  

FirstName

String (max length 40 characters)

Yes

No

End-user first name.

LastName

String (max length 40 characters)

Yes

No

End-user last name.

Email

String (max length 80 characters)

Yes

No

End-user email. 2Checkout uses it to send out email notifications.

IdPartner

string

No

No

The unique ID of the partner. This field is required and cannot be empty when importing Partner channel subscriptions.

Language

string

Yes

Yes

ISO 639-1 two-letter code. 2Checkout sends out notifications in the language you assign to the subscription. Supported languages available are the ones activated for your account. When not provided, the default value is: en.

ProductVersion

String (max length 50 characters)

Yes

Yes

Subscription product version.

ProductExtra

String (max length 100 characters)

Yes

Yes

Product additional information. See sales links for details.

Company

String (max length 50 characters)

Yes

Yes

Business customer company name.

Phone

String (max length 40 characters)

Yes

Yes

End-user phone.

Fax

String (max length 40 characters)

Yes

Yes

End-user fax.

Address1

String (max length 100 characters)

Yes

No

End-user address.

Address2

String (max length 100 characters)

Yes

Yes

End-user address (additional).

Zip

String (max length 20 characters)

Yes

No

End-user zip code.  Required when the provided CountryCode is "US".

City

String (max length 30 characters)

Yes

No

End-user city.

State

String (max length 30 characters)

Yes

No

End-user state. Required when the provided CountryCode is “US”

CountryCode

string (max length 2 characters)

Yes

No

Two-letter customer ISO country code.

ProductOptions

string (max length 255 characters)

Yes

Yes

Product options codes separated by "//". When specified, the product options codes must match pricing options of existing pricing configurations.

ActivationCode

String (max length 255 characters)

Yes

Yes

The delivered activation code for the product. Activation codes have to be unique.

ExternalCustomerId

String (max length 255 characters)

No

No

The identifier for same customer using one or more subscriptions.  Cannot be empty if you include the header in the file.

RenewalPriceListCode

string

Yes

No

Use this parameter to attach a specific price list to an imported subscription.

The 2Checkout system uses the price list to calculate the costs for the renewal process of the subscription.

You need to assign the price list to the partner defined using IdPartner and also assign the product set using AvangateIdProduct to the price list using the RenewalPriceListCode specified.

2Checkout validates the fact that IdPartner, RenewalPriceListCode and 2CheckoutIdProduct are linked.

If you do not attach a price list to a subscription, 2Checkout uses the first pricing list assigned to the partner that also contains the product with which the subscription is associated.

CardNumber numeric No No

Format: Please do not use spaces, dashes, etc. For example, enter 4111111111111111 for this credit card number: 4111 1111 1111 1111.

Add the CardNumber field to the CSV file when importing credit / debit card data along with subscriptions. Placement of the CardNumber field in the CSV file does not impact the importing process. When no credit card numbers are provided, the 2Checkout system still imports the subscription, but without payment data. Only 2Checkout can import CSVs containing card data.

Cannot be empty if you include the CardNumber header in the file.

CardExpirationDate numeric (max length 4 chars) No No

Format: MMYY. For example, enter 0414 for April 2014.

Add the CardExpirationDate field to the CSV file when importing credit / debit card data along with subscriptions. Placement of the CardExpirationDate field in the CSV file does not impact the importing process. When no credit card numbers are provided, the 2Checkout system still imports the subscription, but without payment data. Only 2Checkout can import CSVs containing card data.

Cannot be empty if you include the CardExpirationDate header in the file.

Value

numeric

No

No

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

When you provide it you must also set ValueCurrency.

2Checkout uses this information to calculate the subscription value and total customer value.

2Checkout converts values into your account’s default settlement currency using the exchange rate at the time of the import, unless ValueCurrency is the same as the default settlement currency.

FiscalCode string No Yes Business registration number (VAT ID/ ABN/ IRD/ GST)
Test numeric No Yes Available only for eStore subscriptions. Use 1 to import a test subscription. Exclude the parameter or set the value to 0 to import regular subscriptions. Test subscriptions enable you to try out flows like manual and auto-renewal, and upgrade. Check out the documentation for additional details.

ValueCurrency

String (max length 3 chars)

No

No

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

AdditionalInfo

String (max length 255 chars)

No

No

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

NextRenewalPrice

numeric

No

No

The future costs that subscribers would incur when renewing subscriptions. Accompany it with NextRenewalPriceCurrency and CustomPriceBillingCyclesLeft.

NextRenewalPriceCurrency

String (max length 3 chars)

No

No

The currency associated with the subscription next renewal price value. Mandatory when you provide NextRenewalPrice.

CustomPriceBillingCyclesLeft

numeric

No

No

The number of billing cycles for which 2Checkout uses a custom renewal price you set up. Mandatory when you also provide NextRenewalPrice.

SubscriptionStartDate

datetime

No

No

Subscription start date. Format: yyyy-mm-dd hh:mm:ss. Default time zone is GMT + 2.

IdAffiliate

numeric

No

Yes

Unique affiliate identifier from the 2Checkout platform. Use the ID to commission a specific 2Checkout Network affiliate for subscription renewal charges. Possible values:

  • 0 – Removes the affiliate attached to a subscription. This causes 2Checkout to stop commissioning the affiliate for renewal charges.
  • 12345 – Assigns the subscription to the affiliates having the ID 12345.

When this column is missing or its corresponding values are empty, 2Checkout does not change the affiliates attached to the subscriptions.

LastPurchasePrice

numeric

No

Yes

Last purchase price (The amount paid by customer on last order placed for an existing subscription).
Note: When provided, it must be accompanied by LastPurchasePriceCurrency

LastPurchasePriceCurrency

string

No

Yes

Last purchase price currency.
Note: Mandatory when LastPurchasePrice is provided.

LastRenewalPurchaseDate string No Yes Last purchase date.

For custom imports, contact 2Checkout. 

Card data validation

The 2Checkout system handles syntax validation of card type, number, and expiration date. 2Checkout does not pre-authorize the cards during the import process. You cannot import credit/debit card info for non-recurring (lifetime) subscriptions.

Workflow

  1. Contact 2Checkout Support with a request to start the migration process and follow through the compliance assessment process.
  2. Either create or have the third-party you’re working with build the subscription data CSV file.
  3. Upload the file to a designated SFTP account provided by 2Checkout.

PGP encryption

You must encrypt all transfer of sensitive payment data, including when working with 2Checkout to import card information. Use the following PGP public key:

-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: Avangate Security
 
mQENBFIvGacBCAC5VjxgDm17PEbs3tk5AvLafZQi2WemOW4Q4TjiqpvBFXREx2Pu
eF9xdCFUS1iemZHQEmHi1U3KHD3kXnVrR1f893Fjgi2yC7E/K9xec0jkHQRsHVCb
Qe9qtPtyQ1dVL6ORYW75CI+XW25LP8ozoSVT3oP31ZDbVQ9DpwvDUCaeajJGZo4w
a368G6HtkHuZTeb3bj14fJ5nxTfP12gV4P3fWCF1cOkFsYH/p4CYL+F0AQXHc0v5
B92opfhdbqtcr9d831utpZ9XR6tgsgTlPUNj6vxJmouEk6g691KEw019c53PyYp9
IVBM79kCisKENutSzzQWCcX6i2ECho1ojgB1ABEBAAG0Q0F2YW5nYXRlIFNlY3Vy
ZSBDYXJkIFRyYW5zZmVyIEVuY3J5cHRpb24gS2V5IDxpbmZvc2VjQGF2YW5nYXRl
LmNvbT6JARUDBRBXkMPaFGdJ8P2WfLMBAruICACsfqqGPM60tDHvIvpLJsEoqI6k
0M9Du8T5Q827c20AG7NPBVej7chPWjWYKvRDeTXms3aoUfMBJzsRsRXFGYvvwQaw
kP+RNh1QeEmKI4sY5zeGk9rTr1v22HtQej3ZDFTi7mjVCWitRLMKMDEqePwznQi/
BvVFnexLu2mbf4KiInOQk0Zvfb1fOu/qloPkr34XBrLWR7yV8JUozE3rwz0PLsB6
pMonaggYJbvwDrjaxVepByei0pLjNlgVEnuDmAkuFdZx1oPwBqLOoqPX5D9CVTjR
6YLxGbpRy1Re3i0vErXbqx5hsbzKHCm+ZdQjQEzW36MFozJULH3tMxtEVZWwuQEN
BFIvGacBCAC118s+ZEZSaLAn3jFGbqIBio7PmIrDF23gVj+FR9X4wVOtq9DVSGd8
IlOcxFbrhBRzRKKgG2tAmCFzXbx4nyf3h2ALb1zO6Iw5n6q2IfQ+NZqeO/lPDlOt
SXnubqxwwuIGHABK0XYjvzd8Jv5pxcl03hLoIRt6sFi66a0cRvpKl315t7nbFmpw
J87lzQU3laIIEqwzi2jNKe7zw1vAJrn7YxEVVaNsAxTI6ZBEYx4TtFPXLV0i6ZF+
oAQTrF3qyagR3ZRZMdB1EKBHsvmlPwr7BUML2+LVm96+G7yw5T9LIHrblEjN9mXZ
5ckcWd7Bu117DyRp48mpDab2we3fLbt/ABEBAAE=
=ZYWv
-----END PGP PUBLIC KEY BLOCK-----

Retrieve an order field

Overview

Use the getAdditionalOrderField method to extract information about a specific additional field 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. Avangate throws an exception if the values are incorrect.  The sessionID expires in 10 minutes.

fieldCode

Required (string)

 

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

Request

<?php
 
require ('PATH_TO_AUTH');

$fieldCode = 'YOUR_FIELD_CODE';
 
$jsonRpcRequest = array (
'jsonrpc' => '2.0',
'id' => $i++,
'method' => 'getAdditionalOrderField',
'params' => array($sessionID, $fieldCode)
);
var_dump (callRPC((Object)$jsonRpcRequest, $host));
 ?>

Response

Parameters Type/Description

AdditionalField

Array of objects

Customize account statements for shopper charges

Customize and personalize the account statement for shopper charges with your company's information or product details. The personalized info will appear on all statements issued for credit and debit card transactions.

Availability

Please contact 2Checkout directly if you wish to start using this feature.

Requirements

The maximum number of characters is 22 for the custom text and the 2Checkout reference included on account statements.

How can I customize the account statement?

1. Contact 2Checkout to make sure your account is eligible for this functionality and to enable the feature.

2. Navigate to Account Settings and then click Edit system settings and scroll down to the bottom of the page.

3. Insert your custom text in the field available in the Account Statement area.

image 2.PNG

4. Click Save.

Default use

By default, the custom field value is empty and the URL of your homepage set under Account information is used. For example, if your homepage is https://www.MyHomePage.com, the 2Checkout system will use MyHomePage.com to personalize account statements until you supply a custom text.

How does it work?

1. Once enabled, your homepage information will be used by default along with a 2Checkout reference to personalize account statements for your shoppers that used card transaction to acquire your products.

2. After you introduce custom text, the reference supplied is used instead of your homepage. For example, if by default, the system uses 2checkout |MyHomePage.com, and you insert Company as your custom text, account statements will be personalized using 2checkout | Company (max total number of characters is 22).

Benefits

This feature is designed to help shoppers better identify charges made using their credit cards, reducing the risk of refund/chargeback.

Remove translations

Overview

Use the deletePromotionTranslations method to remove all localized texts from an existing promotion.

Parameters

Parameter Type/Description

sessionID

Required (string)

 

Output of the Login method.

promotionCode

Required (string)

 

The code corresponding to the promotion that you want to add translations to.

Response

Parameters Type/Description

Status

Boolean

  True or false.

Request

<?php

require ('PATH_TO_AUTH');

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

try {
    $updatedPromotion = $client->deletePromotionTranslations($promotionCode);
}

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

var_dump("UpdatedPromotion", $updatedPromotion);

 

Remove promotion sources

Overview

Use the deletePromotionSources method via JSON-RPC API 4.0 to define new sources for an existing promotion.

Parameters

Parameter Type/Description

sessionID

Required (string)

 

Output of the Login method.

promotionCode

Required (string)

 

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

promotionSources

Required (string array)

 

Array of strings defining the promotion sources to be removed.

Response

Parameter Type/Description

status

Boolean

 

True or false

Request

<?php

function callRPC($Request, $host, $Debug = true) {
    $curl = curl_init($host);
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, 0);
    curl_setopt($curl, CURLOPT_VERBOSE, true);
    curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, 0);
    curl_setopt($curl, CURLOPT_SSLVERSION, 0);
    curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
    curl_setopt($curl, CURLOPT_HTTPHEADER, array('Content-Type: application/json', 'Accept: application/json'));
    $RequestString = json_encode($Request);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $RequestString);
    if ($Debug) {
        $RequestString;
    }
    $ResponseString = curl_exec($curl);
    if ($Debug) {
        $ResponseString;
    }
    if (!empty($ResponseString)) {
        var_dump($ResponseString);
        $Response = json_decode($ResponseString);
        if (isset($Response->result)) {
            return $Response->result;
        }
        if (!is_null($Response->error)) {
            var_dump($Request->method, $Response->error);
        }
    } else {
        return null;
    }
}

$host = 'https://api.avangate.com/rpc/3.1/';

$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

$string = strlen($merchantCode) . $merchantCode . strlen(gmdate('Y-m-d H:i:s')) . gmdate('Y-m-d H:i:s');
$hash = hash_hmac('md5', $string, $key);

$i = 1;

$jsonRpcRequest = new stdClass();
$jsonRpcRequest->jsonrpc = '2.0';
$jsonRpcRequest->method = 'login';
$jsonRpcRequest->params = array($merchantCode, gmdate('Y-m-d H:i:s'), $hash);
$jsonRpcRequest->id = $i++;

$sessionID = callRPC($jsonRpcRequest, $host);

// Promotion code corresponding to the promotion you want to remove sources from
$promotionCode = '';

// Sources array with the source values 
$sources = ['source1', 'source2'];

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

How to efficiently scale your affiliate program

Is your company at the point where How to Efficiently Scale Your Affiliate Program sales from your affiliate program are flat? Are you simply not satisfied with the growth rate? Or are you just starting the affiliate program and are wondering how to scale?

If you can identify with one of the above, watch our webinar and hear Cristian Miculi, 2Checkout's Senior Manager of Affiliate Services speak about how to efficiently scale your program and build it in such a manner so it'll be easy for you to add new opportunities on top of that.

Watch this webinar and you will find out:

  • When to expand your program
  • What to look at when choosing an in-house platform / 3rd party network to grow
  • What are recommended ways to grow depending on your affiliate revenue
  • How others did this successfully
Join Our Webinar

 

Add product

Overview

Use the addProduct method to create subscription plans/products for your 2Checkout account. 

Parameters

Parameters Type/Description

sessionID

Required (string)

 

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

Product

Required (object)

 

Use this object to configure your subscription plans/products.

 

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

Mandatory parameters

 

ProductName
ProductCode
PricingConfigurations

Response

bool(true)

Sample request

<?php
 
require ('PATH_TO_AUTH'); // authentication call
 
$Product = new stdClass();
$Product->AvangateId = null;
$Product->ProductCode = 'API_Imported_Product_1';
$Product->ProductType = 'REGULAR';
$Product->ProductName = 'API_Subscription Imported New';
$Product->ProductVersion = '1.0';
 
$Product->GiftOption = false;
$Product->ShortDescription = 'Placeat cumque necessitatibus est minus praesentium ut non quibusdam. Molestias provident tempore eligendi mollitia quia.';
$Product->LongDescription = 'Corrupti inventore vitae nesciunt ab. Nemo cum non maiores. Non repudiandae est iste voluptatibus.';
$Product->SystemRequirements = null;
$Product->ProductCategory = null;
$Product->Platforms = array();
$Product->Platforms[0] = new stdClass();
$Product->Platforms[0]->PlatformName = null;
$Product->Platforms[0]->Category = null;
$Product->Platforms[1] = new stdClass();
$Product->Platforms[1]->PlatformName = null;
$Product->Platforms[1]->Category = null;
$Product->ProductImages = array();
$Product->ProductImages[0] = new stdClass();
$Product->ProductImages[0]->URL = null;
$Product->ProductImages[0]->Default = false;
$Product->ProductImages[1] = new stdClass();
$Product->ProductImages[1]->URL = null;
$Product->ProductImages[1]->Default = true;
$Product->TrialUrl = null;
$Product->TrialDescription = null;
$Product->Enabled = True;
 
//Product additional fields
 
/* $Product->AdditionalFields = array();
$Product->AdditionalFields[0] = new stdClass();
$Product->AdditionalFields[0]->Label = 'i44wak1dzp';
$Product->AdditionalFields[0]->Code = 'ITYAK0OEWJ';
$Product->AdditionalFields[0]->Enabled = false;
$Product->AdditionalFields[0]->Required = false;
$Product->AdditionalFields[0]->URLParameter = 'id1ktigl6d';
$Product->AdditionalFields[1] = new stdClass();
$Product->AdditionalFields[1]->Label = 'aig699lmo1';
$Product->AdditionalFields[1]->Code = 'V28TP07PQN';
$Product->AdditionalFields[1]->Enabled = false;
$Product->AdditionalFields[1]->Required = true;
$Product->AdditionalFields[1]->URLParameter = '8to9p6y54j'; */
 
//Product localization
 
/* $Product->Translations = array();
$Product->Translations[0] = new stdClass();
$Product->Translations[0]->Name = 'zsg7wtg4e5';
$Product->Translations[0]->Description = 'Voluptate iure ut quam omnis impedit. Deserunt facere id dolores doloribus quis. Minima nostrum ut possimus incidunt vel est sint. Odit tempora omnis iste nesciunt commodi accusantium placeat.';
$Product->Translations[0]->Language = 'pt';
$Product->Translations[0]->LongDescription = 'Pariatur molestiae sit dignissimos modi. Aut modi libero numquam repudiandae. Doloribus explicabo delectus fugiat amet. Excepturi quo consequatur sint adipisci.';
$Product->Translations[0]->SystemRequirements = 'c16tvyg88c';
$Product->Translations[0]->TrialUrl = 'UNCAUGHT TYPE: anyURI';
$Product->Translations[0]->TrialDescription = 'Voluptas rem sit ut voluptas molestias quidem ut. Maiores facilis tempora voluptates. Consequuntur illum recusandae hic magni iste.';
$Product->Translations[1] = new stdClass();
$Product->Translations[1]->Name = 'cv2sx15aby';
$Product->Translations[1]->Description = 'Ut distinctio asperiores et a placeat voluptatem et. Et eveniet temporibus aut vel. Nemo occaecati praesentium dolor fugiat rerum assumenda expedita.';
$Product->Translations[1]->Language = 'fr';
$Product->Translations[1]->LongDescription = 'Et ut nostrum molestiae voluptates soluta. Molestiae cum in ut qui. Voluptatem voluptates vero odit quia corporis. In impedit eligendi sed expedita nihil temporibus nobis.';
$Product->Translations[1]->SystemRequirements = 'cfv2amk25j';
$Product->Translations[1]->TrialUrl = 'UNCAUGHT TYPE: anyURI';
$Product->Translations[1]->TrialDescription = 'Voluptatem ut possimus consequatur iste. Recusandae id quia sed quibusdam aut debitis. Cupiditate harum architecto quod quia.'; */
 
 
$Product->PricingConfigurations = array();
$Product->PricingConfigurations[0] = new stdClass();
$Product->PricingConfigurations[0]->Default = false;
$Product->PricingConfigurations[0]->Code = null;
$Product->PricingConfigurations[0]->Name = 'API Pricing Configuration Test';
$Product->PricingConfigurations[0]->BillingCountries = array();
$Product->PricingConfigurations[0]->PricingSchema = 'DYNAMIC';
$Product->PricingConfigurations[0]->PriceType = 'NET';
$Product->PricingConfigurations[0]->DefaultCurrency = 'USD';
$Product->PricingConfigurations[0]->Prices = new stdClass();
$Product->PricingConfigurations[0]->Prices->Regular = array();
$Product->PricingConfigurations[0]->Prices->Regular[0] = new stdClass();
$Product->PricingConfigurations[0]->Prices->Regular[0]->Amount = 100;
$Product->PricingConfigurations[0]->Prices->Regular[0]->Currency = 'USD';
$Product->PricingConfigurations[0]->Prices->Regular[0]->MinQuantity = 1;
$Product->PricingConfigurations[0]->Prices->Regular[0]->MaxQuantity = 10;
$Product->PricingConfigurations[0]->Prices->Regular[0]->OptionCodes = array();
$Product->PricingConfigurations[0]->Prices->Regular[1] = new stdClass();
$Product->PricingConfigurations[0]->Prices->Regular[1]->Amount = 200;
$Product->PricingConfigurations[0]->Prices->Regular[1]->Currency = 'USD';
$Product->PricingConfigurations[0]->Prices->Regular[1]->MinQuantity = 11;
$Product->PricingConfigurations[0]->Prices->Regular[1]->MaxQuantity = 100;
$Product->PricingConfigurations[0]->Prices->Regular[1]->OptionCodes = array();
$Product->PricingConfigurations[0]->Prices->Renewal = array();
$Product->PricingConfigurations[0]->Prices->Renewal[0] = new stdClass();
$Product->PricingConfigurations[0]->Prices->Renewal[0]->Amount = 50;
$Product->PricingConfigurations[0]->Prices->Renewal[0]->Currency = 'USD';
$Product->PricingConfigurations[0]->Prices->Renewal[0]->MinQuantity = 1;
$Product->PricingConfigurations[0]->Prices->Renewal[0]->MaxQuantity = 10;
$Product->PricingConfigurations[0]->Prices->Renewal[0]->OptionCodes = array();
$Product->PricingConfigurations[0]->Prices->Renewal[1] = new stdClass();
$Product->PricingConfigurations[0]->Prices->Renewal[1]->Amount = 60;
$Product->PricingConfigurations[0]->Prices->Renewal[1]->Currency = 'USD';
$Product->PricingConfigurations[0]->Prices->Renewal[1]->MinQuantity = 11;
$Product->PricingConfigurations[0]->Prices->Renewal[1]->MaxQuantity = 100;
$Product->PricingConfigurations[0]->Prices->Renewal[1]->OptionCodes = array();
$Product->PricingConfigurations[0]->PriceOptions = array();
 
/* $Product->BundleProducts = array();
$Product->BundleProducts[0] = new stdClass();
$Product->BundleProducts[0]->ProductCode = '540Q45PQBN';
$Product->BundleProducts[0]->ProductId = 48439;
$Product->BundleProducts[1] = new stdClass();
$Product->BundleProducts[1]->ProductCode = 'PA3JDB5SZ2';
$Product->BundleProducts[1]->ProductId = 46439;
 */
$Product->Fulfillment = 'NO_DELIVERY';
$Product->Prices = array();
 
$Product->GeneratesSubscription = True;
$Product->SubscriptionInformation = new stdClass();
$Product->SubscriptionInformation->DeprecatedProducts = array();
$Product->SubscriptionInformation->BundleRenewalManagement = null;
$Product->SubscriptionInformation->BillingCycle = 1;
$Product->SubscriptionInformation->BillingCycleUnits = 'M';
$Product->SubscriptionInformation->IsOneTimeFee = false;
 
$Product->SubscriptionInformation->ContractPeriod = new stdClass();
$Product->SubscriptionInformation->ContractPeriod->Period = -1;
$Product->SubscriptionInformation->ContractPeriod->PeriodUnits = 'days';
$Product->SubscriptionInformation->ContractPeriod->IsUnlimited = TRUE;
$Product->SubscriptionInformation->ContractPeriod->Action = 'RESTART';
$Product->SubscriptionInformation->ContractPeriod->EmailsDuringContract = 'altenwerth.elise@gmail.com';
 
//$Product->SubscriptionInformation->UsageBilling = 77;
 
$Product->SubscriptionInformation->GracePeriod = new stdClass();
$Product->SubscriptionInformation->GracePeriod->Type = 'GLOBAL';
$Product->SubscriptionInformation->GracePeriod->Period = 14;
$Product->SubscriptionInformation->GracePeriod->PeriodUnits = 'D';
$Product->SubscriptionInformation->GracePeriod->IsUnlimited = false;
 
$Product->SubscriptionInformation->RenewalEmails = new stdClass();
$Product->SubscriptionInformation->RenewalEmails->Type = 'CUSTOM';
$Product->SubscriptionInformation->RenewalEmails->Settings = new stdClass();
$Product->SubscriptionInformation->RenewalEmails->Settings->ManualRenewal = new stdClass();
$Product->SubscriptionInformation->RenewalEmails->Settings->ManualRenewal->Before30Days = true;
$Product->SubscriptionInformation->RenewalEmails->Settings->ManualRenewal->Before15Days = true;
$Product->SubscriptionInformation->RenewalEmails->Settings->ManualRenewal->Before7Days = true;
$Product->SubscriptionInformation->RenewalEmails->Settings->ManualRenewal->Before1Day = false;
$Product->SubscriptionInformation->RenewalEmails->Settings->ManualRenewal->OnExpirationDate = true;
$Product->SubscriptionInformation->RenewalEmails->Settings->ManualRenewal->After5Days = false;
$Product->SubscriptionInformation->RenewalEmails->Settings->ManualRenewal->After15Days = false;
$Product->SubscriptionInformation->RenewalEmails->Settings->AutomaticRenewal = new stdClass();
$Product->SubscriptionInformation->RenewalEmails->Settings->AutomaticRenewal->Before30Days = true;
$Product->SubscriptionInformation->RenewalEmails->Settings->AutomaticRenewal->Before15Days = false;
$Product->SubscriptionInformation->RenewalEmails->Settings->AutomaticRenewal->Before7Days = false;
$Product->SubscriptionInformation->RenewalEmails->Settings->AutomaticRenewal->Before1Day = false;
$Product->SubscriptionInformation->RenewalEmails->Settings->AutomaticRenewal->OnExpirationDate = true;
$Product->SubscriptionInformation->RenewalEmails->Settings->AutomaticRenewal->After5Days = false;
$Product->SubscriptionInformation->RenewalEmails->Settings->AutomaticRenewal->After15Days = true;
 
$Product->FulfillmentInformation = new stdClass();
$Product->FulfillmentInformation->IsStartAfterFulfillment = false;
$Product->FulfillmentInformation->IsElectronicCode = false;
$Product->FulfillmentInformation->IsDownloadLink = false;
$Product->FulfillmentInformation->IsBackupMedia = false;
$Product->FulfillmentInformation->IsDownloadInsuranceService = false;
$Product->FulfillmentInformation->IsInstantDeliveryThankYouPage = false;
$Product->FulfillmentInformation->IsDisplayInPartnersCPanel = false;
 
 

$jsonRpcRequest = array (
'jsonrpc' => '2.0',
'id' => $i++,
'method' => 'addProduct',
'params' => array($sessionID, $Product)
);
 
$addedProduct = callRPC($jsonRpcRequest, $host);
var_dump ($addedProduct);

Configure order fulfillment/delivery

Overview

Enable customers to start using your services immediately after they finalize the purchase process and use electronic content delivery to distribute binary keys, activation codes, product files, etc. to your shoppers as soon as 2Checkout receives payment confirmation. Increase Average Order Value (AOV) by offering as backup media (CDs/DVDs/USBs) and Download Insurance to shoppers.

Supported business models

If your business relies on electronic software distribution (ESD), Software as a Service (SaaS), Information Services, Service Contracts, and even on physical delivery, you can easily leverage the scalability of 2Checkout's platform built to support the software and SaaS markets.

Availability

All 2Checkout accounts. Contact 2Checkout directly to:

  • Set up Backup Media.
  • Access extra storage space for your product files. 
  • Inquire about physical delivery. 

Configure product delivery options

Define product delivery options along with general information, pricing schemes, renewal details and all additional info needed when configuring a product.

  1. Go to Setup -> Products.
  2. Click Add product.
  3. Enter the item's general information and click Add product when you're done.
  4. Enter the pricing, upgrade and renewal details on the next page.
  5. Three Product fulfillment categories are available:
    • Fulfillment made through 2Checkout delivery - You can opt to have 2Checkout deal with all aspects related to the delivery of your products, and serve binary keys, activation codes, Backup Media, product files and Download Insurance Service (DIS) to customers. Here you can also choose to manually confirm the delivery of the order. If you enable the Requires delivery confirmation option, 2Checkout puts the order processing on hold until you confirm delivery .
    • Fulfillment made by you - You are responsible with providing your customers with the necessary resources to start using purchased products. It's critical that you also send confirmation of order fulfillment to 2Checkout to finalize orders.
    • Fulfillment made immediately after payment confirmation - Use this if don't distribute products / keys to customers, but instead offer access to online services or subscriptions-based applications, to name a couple of examples.

Fulfillment made through 2Checkout delivery

2Checkout handles the delivery of your products, but you control the content served to customers as well as the distribution method, and can even add extra services to increase the value of your offerings.

Selecting Fulfillment made through 2Checkout delivery brings up the Content & methods box, enabling you to configure the delivery process of a product. The Fulfillment area tailors itself dynamically to the options you select under Product fulfillment type and Content & methods. Options available:

  • Delivery content
  • Delivery methods
  • Extra delivery services

Delivery content

When 2Checkout handles the delivery of products on your behalf, it's mandatory that you check at least one of the boxes for the two Delivery content options:

Electronic code / key / binary file 

Makes it mandatory to also select a list of codes from the drop down menu under the Activation codes settings area that is brought up. If none exists, you need to create a new code list and associate it with the product.

Product file download links

2Checkout can deliver your digital product files to shoppers immediately after they successfully placed an order.

In the product Fulfillment page, set the files you want to deliver from the Assign product files list under the Product file area. You need to upload and set up product files, if you haven't done so already. Click here to learn how to manage product files.

Assign multiple product files in case your delivery requires separate installation files for one product in the download page. For example, if your product has support for multiple operating systems: Windows, MAC OSX, etc., your shoppers can receive and download the product files for all supported versions. You can add multiple product files at once by checking all the files you want to assign from the list. The list contains all the product files uploaded by you that have a clean status, including the ones currently assign to your product. Keep in mind that when assigning a product file you have to check the extra delivery services involved: download link, Backup Media, download insurance service (DIS), and partner (channel manager).

Shoppers are able to download the product files from:

  • Thank you page - If you have checked the delivery method of Instant delivery (in the Thank you page). This delivery option is available for payment methods with instant payment confirmation like credit cards, PayPal, etc.

Note that HTML tags are not supported in the ConvertPlus and InLine Checkout flows when using additional fulfillment information in 'Thank you' page .  Plain text can be used instead.

  • myAccount - Your shoppers can download the product files by logging into their 2Checkout customer account. The product files are available on the product history page, after clicking on the "Download product" button.
  • Download page - The electronic delivery e-mail sent to your customers contains a "Download your product" button. By accessing it, customers are redirected to the download page where they can download all the product files belonging to the product ordered.

You can select both delivery options (product files / electronic code), in accordance with the distribution model of the product you're setting up. At least one of these options needs to be enabled for your offering to benefit from 2Checkout delivery. It's entirely up to you to offer the electronic code/key/binary file to your customers, a link to download the product file, or both.

Requirements

You can only assign clean files to your products. 2Checkout scans the files uploaded for malware, and only files in clean status can be delivered to shoppers. 

Delivery methods

By Email & in 2Checkout myAccount 

Default - cannot be disabled. Ensures that customers who acquire your products receive at least the electronic code / key / binary file or a link to download the product file, if not both, via email and in their myAccount, from 2Checkout. Consider customizing the email message sent to your customers using the Additional delivery information - by email field

Instant delivery (in the Thank you page) 

Have 2Checkout instantly deliver product files and keys in the Thank you page displayed once a purchase is finalized. 2Checkout displays the Thank you page to customers if the payment method they use supports instant confirmation (credit cards, debit cards, PayPal, etc.) and automatically approved by the system/anti-fraud team, otherwise the instant electronic delivery can be delayed or even canceled altogether. You cannot use Instant delivery together with the Requires delivery confirmation feature.

The delivery content, also available in Email and in 2Checkout myAccount, is included in the Thank you page that you customize.

Instant delivery works for authorized and approved purchases. If the transaction fails or if the 2Checkout system flags an order as potentially fraudulent, 2Checkout does not display the instant delivery content in the "Thank You Page". In such scenarios, the delivery takes place over email once the order is authorized and approved.

Regardless if you checked the Instant delivery option or not, you can personalize the Additional delivery information - "Thank you" page with details according to your preferences in the field which is found at the bottom of the page.

Extra delivery services

Both Backup media and DIS (Download insurance service) are optional services that you can charge extra for, providing you with an easy tool to increase Average Order Value (AOV) while also offering a richer set of shopping cart options to customers.

Backup Media

When you select 2Checkout delivery you enable 2Checkout to create and ship backup media from the files you provide, as well as hosting the product files and making them available for download. The Backup media option brings up the Backup media area, and it's mandatory that you choose an existing File/Compilation, or create a new media backup product:

  • Static (by providing an ISO)
  • Dynamic (by using the files uploaded directly to 2Checkout servers)

DIS (Download insurance service)

By enabling the DIS (Download insurance service), customers get the option to pay to extend the life span of the product file download link for a total of two (2) years, but also to download the item an unlimited number of times. Make sure to associate a downloadable file associated with the product in the Product file area.

Orders and payments are confirmed via email when this option is selected with 2Checkout also delivering product keys / codes and download links through email. Order deliveries are confirmed automatically causing 2Checkout to execute the money transfer from the customer.

Fulfillment made by you

Distribute binary keys, activation codes, and product files, as well as additional files yourself by selecting Fulfillment made by you. You're required to confirm  fulfillment of all orders before 2Checkout can move their status to Finished.

You can confirm delivery in two ways:

  1. Go to Orders & customers and Fulfillment confirmations to access a list of all incomplete orders that need fulfillment confirmation. Select he check box on the left hand side of an order you want to finalize and click Confirm fulfillment.
  2. Use Instant Delivery Notification (IDN). IDN helps you automate the order finalization process. Use scripts and rely on Instant Delivery Notification to facilitate automatic delivery confirmations from your system directly to 2Checkout servers..

2Checkout puts orders on hold until you confirm fulfillment, and finalizes them only after receiving confirmation from you or your system.Fulfillment made by you offers the possibility to have 2Checkout handle the distribution of backup media of products to customers on your behalf. Having set up the backup media for a product, select it in the File / Compilation drop down menu. 

The Additional information - "Thank you" page functionality enables you to serve a custom message to your customers along with the "thank you" for their purchase.

Please note that the responsibility of providing customers with electronic deliveries for your offerings rests solely with you, and not with 2Checkout. For products which you configured with Fulfillment made by you, order fulfillment confirmation is mandatory as 2Checkout keeps track of the product distribution process for all orders, with the system setting order status to Finished only after the fulfillment was made and confirmed manually or through IDN by you.

2Checkout confirms order and payments via email when you select this option but does not deliver product keys / codes and download links. Once you confirm order fulfillment, 2Checkout executes the money transfer from the customer.

Fulfillment made immediately after payment confirmation

Designed with SaaS in mind, this feature enables you to sell services, without delivering binary keys, activation codes, Backup Media, product file, or DIS to customers. Please note that you can still have 2Checkout offer Backup Media on your behalf.

Use Fulfillment made immediately after payment confirmation if your business model does not rely on electronic content delivery, and instead involves selling subscriptions or access to online services, etc.

Fulfillment made immediately after payment confirmation comes with the option to have 2Checkout handle the distribution of backup media to customers on your behalf. Having set up the backup media for a product, select it in the File / Compilation drop down menu, and 2Checkout will handle the rest.

The Additional information - "Thank you" field allows you to customize the message for your shoppers as you wish.

For products which you configured with Fulfillment made immediately after payment confirmation, 2Checkout confirms orders automatically, with their status updated to Finished after payment goes through. 2Checkout does not keep track of deliveries when you use this option, and you need to provide customers with access/subscriptions to your service/platform or additional delivery options.

2Checkout confirms order and payments via email but does not deliver product keys / codes and download links through email. Order fulfillment is confirmed automatically causing 2Checkout to execute the money transfer from the customer.

Enable delivery confirmation

If you want to manually approve or reject orders after the 2Checkout performs the risk assessment, you can do so after you enable the vendor delivery confirmation feature.

Availability

Before you can use this feature, get in contact with your Customer Success Manager and ask for the activation of this option on your 2Checkout account.

Requirements

Follow these steps to enable it.

  1. Log in to the 2Checkout Control Panel
  2. Go to the Account Settings page
  3. Click Manage user access
  4. Go to the View roles tab and click Edit on the role that you want to enable the delivery confirmation feature for.
  5. Under the Orders & Reports roles section, check the Enable delivery confirmation approval checkbox and click Save role at the bottom of the page.

How do I confirm orders?

When a shopper places an order, you now have the option to either manually confirm or reject the order from the order's status page in the Control Panel. If you don't confirm or reject the order for 14 days, 2Checkout automatically reverses it.

We also notify you about the order requiring confirmation in the Control Panel dashboard on the Last orders tab. Shoppers see their order marked with a Pending status in myAccount until you confirm the delivery.

2Checkout also notifies them that the order is waiting for your approval through a message in the Order lookup section.

How to activate delivery confirmation IPN

You can configure 2Checkout to send an IPN when you confirm the delivery of an order by following the steps below.

  1. Log in to the 2Checkout Control Panel.
  2. Go to the Account Settings page.
  3. Click Edit sytem settings.
  4. Go to the IPN settings tab.
  5. Check the the order was approved for delivery option under Notification settings. 
  6. Click Save.

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