Skip to main content

Renew a subscription

Overview

Renew a subscription in the 2Checkout system on-demand, controlling the number of days, price, and currency of the extension. Use the renewSubscription method to renew a subscription.

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.

subscriptionReference

Required (string)

 

Unique, system-generated subscription identifier.

 

2Checkout charges customers using the payment data attached to subscriptions. In the case of credit/debit cards, if customers update their payment information in myAccount or if you update these details on behalf of your subscribers, the 2Checkout system uses the latest card info provided to charge subscription renewals.

days

Required (int)

 

The number of days the 2Checkout system extends the lifetime of the subscription.

price

Required (double)

 

The price that 2Checkout charges the customer for the renewal. The type of price, Gross or Net, is decided by the product setting in the Merchant Control Panel.

currency

Required (string)

 

The currency associated to the renewal price - ISO 4217 code.

Response

Parameters Type/Description

Boolean

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

Request

<?php

require ('PATH_TO_AUTH');

$subscriptionReference = 'YOUR_SUBSCRIPTION_REFERENCE';
$days = 4;
$price = 50;
$currency = 'eur';

$jsonRpcRequest = array (
'method' => 'renewSubscription',
'params' => array($sessionID, $subscriptionReference, $days, $price, $currency),
'id' => $i++,
'jsonrpc' => '2.0');

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

Pricing option

Overview

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

Retrieve a price option group                  Retrieve assigned price option groups                         Retrieve price option groups

Pricing option group

Parameters Type/Description

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

 

 

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

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.

                                                   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.

 

                    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 usePERCENT 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.

 

Name

String

 

 

Pricing option child name.

 

Description

String

 

 

Pricing option child description.

 

Translations

Array of objects

 

 

Details below.

 

Retrieve a customer’s subscriptions

Overview

Use the getCustomerSubscriptions method to retrieve details about the subscriptions belonging to a specific customer.

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.

AvangateCustomerReference

Required (int)

 

System-generated customer reference. Required unless you prefer to use ExternalCustomerReference.

ExternalCustomerReference

Optional (string)

 

External customer reference that you control. Optional when you use AvangateCustomerReference. If you include it, it needs to belong to the same customer as the AvangateCustomerReference.

Response

Subscription

Array of objects

Request


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

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

Use Checks

Overview 

Place an order using catalog products, and collect the payment using Check.

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.

Order

Required (Object)

 

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

 

Workflow 

  1. Customer places the order using Check as payment option.
  2. After order is confirmed, customer receives the payment instructions via e-mail, including the address to which the check should be sent.
  3. Order is finalized as soon as the payment is confirmed into Avangate's bank account.

Response 

Parameters Type/Description

Order information

Object

Request

<?php

require ('PATH_TO_AUTH');

$Order = new stdClass();
$Order->RefNo = NULL;
$Order->Currency = 'usd';
$Order->Country = 'US';
$Order->Language = 'en';
$Order->CustomerIP = '91.220.121.21';
$Order->ExternalReference = NULL;
$Order->Source = NULL;
$Order->Affiliate = new stdClass();
$Order->Affiliate->AffiliateCode = 'Partner123'
$Order->Affiliate->AffiliateSource = 'MobilePlatform'
$Order->CustomerReference = NULL;
$Order->Items = array();
$Order->Items[0] = new stdClass();
$Order->Items[0]->Code = 'my_subscription_1';
$Order->Items[0]->Quantity = 1;
$Order->Items[0]->PriceOptions = NULL;
$Order->Items[0]->SKU = NULL;
$Order->Items[0]->Price = NULL;
$Order->Items[0]->CrossSell = NULL;
$Order->Items[0]->Trial = false;
$Order->Items[0]->AdditionalFields = NULL;
$Order->Items[0]->SubscriptionStartDate = NULL; //If empty or null, subscriptions become active when purchase is made.
$Order->BillingDetails = new stdClass();
$Order->BillingDetails->FirstName = 'John';
$Order->BillingDetails->LastName = 'Doe';
$Order->BillingDetails->CountryCode = 'us';
$Order->BillingDetails->State = 'California';
$Order->BillingDetails->City = 'LA';
$Order->BillingDetails->Address1 = 'Address example';
$Order->BillingDetails->Address2 = NULL;
$Order->BillingDetails->Zip = '90210';
$Order->BillingDetails->Email = 'customer@avangate.com';
$Order->BillingDetails->Phone = NULL;
$Order->BillingDetails->Company = 'ABC Company';
$Order->DeliveryDetails = NULL;


$Order->PaymentDetails = new stdClass ();
$Order->PaymentDetails->Type = 'CHECK';
$Order->PaymentDetails->Currency = 'USD';
$Order->PaymentDetails->PaymentMethod = new stdClass ();

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

$jsonRpcRequest = array (
'method' => 'placeOrder',
'params' => array($sessionID, $Order),
'id' => $i++,
'jsonrpc' => '2.0'
);

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

Extract invoices

Overview

Use the getInvoices method to extract shopper invoices from the 2Checkout system based on unique order references. The method returns the binary code for invoices in the PDF file format, Base64 encoded (Base64 is used to represent binary data in the ASCII string format).

getInvoices works for COMPLETE orders for which an invoice was already issued. For refunded orders, getInvoices provides two shopper invoices, one for the original order and the second for the refund, reflecting the repayment made.

In the case of cross-selling orders which contain products from different merchants, getInvoice enables you to re-send only the invoices for your own offerings.

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.

RefNo

Required (string)

 

Unique, system generated reference for orders.

Response

InvoicesData

Array of objects

 

 

Details below.

 

Sale

String

 

 

Base64 encoded PDF file containing an invoice for a Complete order.

 

Cancellation

String

 

 

Base64 encoded PDF file containing a cancellation invoice.

 

Refunds

Array of string

 

 

Base64 encoded PDF files containing invoices for Refunds.

Request


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

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

 

Customer

Overview

Use the object below to create, update and retrieve customers in 2Checkout.

Input parameters

Parameters Type/Description

ExternalCustomerReference

Optional (string)

 

Unique customer alphanumeric (string) identifiers you control. Aggregate subscriptions under the same Customer account by adding the CUSTOMERID (case sensitive) parameter to Buy links.

FirstName

Required (string)

 

Customer's first name. 

LastName

Required (string)

 

Customer's last name.

Company

Optional (string)

 

Company name.

FiscalCode

Optional (string)

 

Can be null for end users. For companies, it needs to be the VAT ID, which 2Checkout validates.

2Checkout throws an error if the VAT ID is invalid/incorrect. When present, you also need to provide the company name.

 

Can be null for end users.

Address1

Required (string)

 

Customer's address.

Address2

Optional (string)

 

Customer's address.

City

Required (string)

 

Customer's city.

State

Optional (string)

 

Customer's state. For example, "Alabama","Alaska","Arizona".

Zip

Required (string)

 

Zip code.

CountryCode

Required (string)

 

Customer's country code (ISO 3166 two-letter code).

Phone

Optional (string)

 

Customer's phone number.

Fax

Optional (string)

 

Customer's fax number.

Email

Required (string)

 

Customer's email.

Enabled

Optional (boolean)

 

true or false, depending on whether the customer account is active or inactive. An active customer account features at least one Active or Past due subscription. Possible customer statuses:

 

  • Active - Customer account status is Active even if Trial and Cancelled/Expired subscriptions exist for the customer, along as there's at least one Active subscription. Customers with a single subscription featuring the Past due status (expired but in the grace period) are considered Active.
  • Inactive - All subscriptions associated to this Customer account are cancelled, expired or both.
  • Trial - Customer account status is Trial if all Active subscriptions for this customer are trials, regardless of any Cancelled/Expired subscriptions.

Trial

Optional (boolean)

 

true or false, depending on whether the customer account features only trials or also paid subscriptions.

Language

Optional (string)

 

ISO 639-1 two-letter code. Example: “en.”

 

 

Use PayPal

Overview

Place an order using catalog products defined in your Control Panel, and collect the payment using PayPal.

Currency support

Check with 2Checkout support for a list of currencies available for PayPal. 

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.

To place an order with PayPal rather than PayPal Express, use PAYPAL as the type of the PaymentDetails object and send the shopper email and a return URL as part of the PaymentMethod object. See code sample. 

Workflow

  1. Create the order object. Use PAYPAL as the type of the PaymentDetails object and send the shopper email and a return URL as part of the PaymentMethod object. Place the order.
  2. Once you place the order, 2Checkout logs it into the system. At this point in time, the status of the order is PENDING. 2Checkout responds with the Order information object.
  3. Redirect shoppers to the RedirectURL from the Order information object you receive as response from 2Checkout.
  4. Once shoppers log into their PayPal account and complete the transaction, they're redirected to the ReturnURL you set in the order object. 2Checkout also authorizes the order and updates the status to AUTHRECEIVED. 
  5. If shoppers log in to their PayPal account and fail to complete the transaction or they cancel it, they're redirected to the CancelURL you set in the order object. 2Checkout updates the status to PENDING.

Response

Parameters Type/Description

Order information

Object

  Object containing order information.

 

<?php
declare(strict_types=1);

class Configuration
{
    public const MERCHANT_CODE = '';
    public const MERCHANT_KEY = '';
    public const URL = 'http://api.2checkout.com/soap/6.0';
    public const ACTION = 'placeOrder';
    public const ADDITIONAL_OPTIONS = null;
    //array or JSON
    public const PAYLOAD = <<<JSON
{
  "Country": "us",
  "Currency": "USD",
  "CustomerIP": "91.220.121.21",
  "ExternalReference": "SOAP_API_AVANGTE",
  "Language": "en",
  "Source": "testAPI.com",
  "BillingDetails": {
    "Address1": "Test Address",
    "City": "LA",
    "State": "California",
    "CountryCode": "US",
    "Email": "testcustomer@2Checkout.com",
    "FirstName": "Customer",
    "LastName": "2Checkout",
    "Zip": "12345"
  },
  "Items": [
    {
      "Code": "A90B3D8FDE",
      "Quantity": 1
    }
  ],
  "PaymentDetails": {
    "Currency": "USD",
    "CustomerIP": "91.220.121.21",
    "PaymentMethod": {
      "RecurringEnabled": false,
      "ReturnURL": "http://secure.avangate.local/test/index.php",
      "CancelURL": "http://secure.avangate.local/test/create_order.php"
    },
    "Type": "PAYPAL"
  }
}
JSON;
}

class Client
{
    public function call(
        string $url = Configuration::URL,
        $payload = Configuration::PAYLOAD,
        string $action = Configuration::ACTION
    ): ?object {
        if (is_array($payload)) {
            $payload = json_encode($payload);
        }
        if (!empty($payload)) {
            // SoapClient works with objects(StdClass)
            $payload = json_decode($payload);
        }
        $soapClient = $this->getClient($url);
        $sessionId = $this->getSession($soapClient);
        $args = array_filter([$sessionId, $payload]);

        return $soapClient->$action(...$args);
    }

    public function getClient(string $url): SoapClient
    {
        return new SoapClient(
            $url.'?wsdl',
            [
                'location' => $url,
                'cache_wsdl' => WSDL_CACHE_NONE,
            ]
        );
    }

    public function getSession(SoapClient $client)
    {
        $date = gmdate('Y-m-d H:i:s');
        $merchantCode = Configuration::MERCHANT_CODE;
        $key = Configuration::MERCHANT_KEY;
        $string = strlen($merchantCode).$merchantCode.strlen($date).$date;
        $hash = hash_hmac('md5', $string, $key);
        $client->__setCookie('XDEBUG_SESSION', 'PHPSTORM');

        return $client->login($merchantCode, $date, $hash);
    }
}

try {
    $client = new Client();
    var_dump($client->call());
} catch (Exception $ex) {
    var_dump($ex);
}

Place an order

Overview

Use the placeOrder method to place an order.

Parameters

Parameters Type/Description
sessionID Required (String)
  Session identifier, which is the output of the Login method. An exception is thrown if the values are incorrect.

Response

Parameters Type/Description
Order Object

Request

<?php

require ('PATH_TO_AUTH');  // Authentication example: https://knowledgecenter.avangate.com/Integration/Channel_Manager_API/JSON-RPC/02Authentication
require ('PATH_TO_SET_PARTNER'); // setPartner example: https://knowledgecenter.avangate.com/Integration/Channel_Manager_API/JSON-RPC/06Reference/Partner/00Set_partner
require ('PATH_TO_ADD_PRODUCT'); // addProduct example: https://knowledgecenter.avangate.com/Integration/Channel_Manager_API/JSON-RPC/06Reference/08Place_an_order/00Add_product_to_cart

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

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

 

Enable recurring billing

Overview

Use the enableRecurringBilling method to switch on the automatic renewal system for a subscription that's manually renewable. 

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.

subscriptionReference

Required (string)

 

Unique, system-generated subscription identifier.

Response

Parameters Type/Description

Boolean

true or false depending on whether the changes were successful or not.

Request

<?php

require ('PATH_TO_AUTH');

$subscriptionReference = 'YOUR_SUBSCRIPTION_REFERENCE';

$jsonRpcRequest = array (
'method' => 'enableRecurringBilling',
'params' => array($sessionID, $subscriptionReference),
'id' => $i++,
'jsonrpc' => '2.0');

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

OrderInformation object structure

Member

Type/Description

RefNo

String

 

Order reference number.

OrderNo

String

 

The consecutive order number associated with orders available in the Order search.

ExternalRefNo

String

 

The order reference code (max. 100 chars) provided by the seller. Empty string if missing.

ShopperRefNo

String

 

External shopper identifier.

Status

String

 

The status of the order: AUTHRECEIVED, PENDING, TEST

(COMPLETE, CANCELED, REVERSED, REFUND statuses are only returned for the getOrder method).

ApproveStatus

String

 

The status of the order approval as set either automatically by the Avangate system or manually by a member of our anti-fraud department. This status can vary for new purchases or for orders requiring customers to make manual payments.

Possible values:

  • WAITING: The order has yet to be approved.
  • OK: The order has been approved.
  • INVALIDDATA: The data supplied by the shopper is invalid. The order was not approved.
  • FRAUD: The order is fraudulent.

Language

String

 

Language used in the cart during the purchase process.

OrderDate

String

 

The timestamp (in the API time zone defined in Control Panel) used when the order was placed. Format: Y-m-d H:i:s (2014-05-22 00:12:12).

FinishDate

String

 

The timestamp (in the API time zone defined in Control Panel) when the order reached the Complete status. NULL if the order is not finalized. Format: Y-m-d H:i:s (2014-05-22 00:12:12).

Source

String

 

The link source for the sales. The SRC parameter used to track every sale point generator.

AutoRenewalChecked

Boolean

 

True or false, depending on whether the subscription auto-renewal checkbox was checked during the purchase process.

HasShipping

Boolean

 

True or false, depending on whether the order required shipping.

BillingDetails

Object

 

Details below.

 

Address

String

 

 

Shopper billing address.

 

City

String

 

 

Shopper city from the billing address.

 

Country

String

 

 

Shopper country from the billing address.

 

Email

String

 

 

Shopper billing email address.

 

FirstName

String

 

 

Shopper billing name.

 

LastName

String

 

 

Shopper billing surname.

 

PostalCode

String

 

 

Postal code from the billing address.

 

State

String

 

 

Shopper billing state. E.g.: "Alabama".

 

Company

String

 

 

Company name. Can be NULL for end users. When present, FiscalCode must also be provided.

 

FiscalCode

String

 

 

Can be null for end users. For companies, it needs to be the VAT ID, which is validated by Avangate. An error will be thrown if the VAT ID is invalid/incorrect when calling setPaymentDetails. When present, Company name must also be provided.

DeliveryDetails

Object

 

Details below.

 

Address

String

 

 

Shopper delivery address.

 

City

String

 

 

Shopper delivery city.

 

Country

String

 

 

Shopper delivery country.

 

Email

String

 

 

Shopper email address.

 

FirstName

String

 

 

Shopper delivery first name.

 

LastName

String

 

 

Shopper delivery last name.

 

PostalCode

String

 

 

Shopper delivery postal code.

 

State

String

 

 

Shopper delivery state.

 

Company

String

 

 

Shopper delivery company. Can be NULL for end users.

PaymentInformation

Object

 

Details below.

 

Type

String

 

 

The payment method:

  • CC (credit/debit card)
  • TEST (for test orders)
  • PAYPAL
  • WIRE
  • OTHER (payment methods not listed above)

 

Currency

String

 

 

Payment currency ISO code – ISO 4217.

 

PaymentMethod

Object

 

 

Details below.

 

 

FirstDigits

String

 

 

 

First four credit card digits.

 

 

LastDigits

String

 

 

 

Last four credit card digits.

 

 

CardType

String

 

 

 

Card type:

  • VISA
  • VISAELECTRON
  • MASTERCARD
  • MAESTRO
  • AMEX

Origin

String

 

Order origin channel:

  • Web
  • API
  • Mobile 

Currency

String

 

Order currency.

TotalGeneral

Double

 

Total order value (the costs incurred by the shopper).

TotalWithoutTaxes

Double

 

Total order value without VAT or sales tax.

Taxes

Double

 

VAT or sales tax.

Shipping

Double

 

Shipping costs. NULL if not applicable.

AvangateCommission

Double

 

Avangate order commission.

AffiliateCommission

Double

 

Avangate affiliate commission. NULL if not applicable.

Discount

Double

 

Order discount value. NULL if not applicable.

Products

Array of objects

 

Details below.

 

Id

Int

 

 

Unique, system-generated product ID from the Avangate platform.

 

Code

String

 

 

The code you can attach to products when configuring, editing or importing them in the Avangate platform.

 

Name

String

 

 

Product name.

 

SKU

String

 

 

Product SKU.

 

ExtraInfo

String

 

 

Additional information text entered when generating buy links or via the INFO[productid]= parameter.

 

Quantity

Int

 

 

Purchase number of products.

 

PromotionName

String

 

 

Promotion name.

 

UnitPrice

Double

 

 

Price per product unit.

 

UnitTaxes

Double

 

 

Taxes per product unit.

 

UnitDiscount

Double

 

 

Discount per product unit.

 

UnitAffiliateCommision

Double

 

 

Affiliate commission per product unit.

 

Options

Array of objects

 

 

Array of product pricing options with the structure detailed below.

 

 

OptionText

String

 

 

 

The name of the pricing option selected during the purchase process.

 

 

OptionValue

String

 

 

 

Unique option value code.

 

 

OptionalValue

String

 

 

 

Unique option value code.

 

 

Operator

String

 

 

 

ADD or SUBTRACT, depending on whether the option adds or subtracts a specific amount to or from the product price.

 

 

Usage

String

 

 

 

 

 

 

Price

String

 

 

 

The amount added or subtracted by the pricing options.

 

 

GroupName

String

 

 

 

Product options group name.

 

AdditionalFields

Array of objects

 

 

Array of AdditionalFields information objects with the structure detailed below.

 

 

FieldText

String

 

 

 

Field text visible to shoppers in the cart.

 

 

FieldValue

String

 

 

 

The alpha-numeric characters, underscores and dashes set as the field identifier.

 

Subscriptions

Array of objects

 

 

Array of subscriptions objects with the structure detailed below.

 

 

SubscriptionReference

String

 

 

 

Unique, system-generated subscription identifier.

 

 

PurchaseDate

String

 

 

 

Purchase date.

 

 

ExpirationDate

String

 

 

 

Renewal/expiration date, not considering grace period settings.

 

 

Lifetime

Boolean

 

 

 

Subscription duration.

 

 

Trial

Boolean

 

 

 

TRUE or FALSE depending on whether the subscription is a trial.

 

 

Disabled

Boolean

 

 

 

TRUE or FALSE depending on whether the subscription is disabled.

 

 

RecurringEnabled

Boolean

 

 

 

TRUE or FALSE depending on whether the subscription renewal system is enabled.

AdditionalFields

Array of objects

 

Array of AdditionalFields information objects with the structure detailed below.

 

FieldText

String

 

 

Field text visible to shoppers in the cart.

 

FieldValue

String

 

 

The alpha-numeric characters, underscores and dashes set as the field identifier.

PartnerCode

String

 

Partner code defined in the Control Panel. NULL for eStore orders.

PartnerMargin

Double

 

Partner margin offered for the order. NULL for eStore orders.

PartnerMarginPercent

Double

 

Partner margin percentage from the net value of the products ordered, minus the value of any discounts. NULL for eStore orders.

ExtraMargin

Double

 

Extra margin offered. NULL for eStore orders.

ExtraMarginPercent

Double

 

Extra partner margin percentage from the net value of the products ordered, minus the partner margin and the value of any discounts. NULL for eStore orders.

ExtraDiscount

Double

 

Extra discount offered. NULL for eStore orders.

ExtraDiscountPercent

Double

 

Partner margin percentage from the net value of the products ordered, minus the value of any coupon discounts. NULL for eStore orders.

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