Skip to main content

Extract invoices

Overview

Use the getInvoices method to extract shopper invoices from the Avangate 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. Avangate throws an exception if the values are incorrect.  The sessionID expires in 10 minutes.

RefNo

Required (string)

 

Unique, system generated reference for orders.

Request

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.


<?php
 
 
function callRPC($Request, $hostUrl, $Debug = true) {
    $curl = curl_init($hostUrl);
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, 0);
    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)) {
        $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.0/';
 
$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; // counter for api calls
// call login
$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);
 
var_dump($sessionID);
$Reference = '43997639';

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

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

 

SimpleProduct Object Structure

Parameters

Parameter Type/Descriptio
ProductId Int
  Unique Avangate Product ID.
ProductCode String
  Unique Product Code.
ProductName String
  Product Name
ProductType String
  Possible values: REGULAR or BUNDLE
ProductVersion String
  Product version. Can be NULL.
ProductImage String
  URLs to the product image uploaded into the Avangate platform. Can be NULL.
Price Double
  Product price calculated using the configuration of pricing options from the pricing list.
Currency String
  The ISO code of the currency set for the partner - ISO 4217.
PriceType String
  Possible values NET or GROSS.

 

Retrieve wire transfer details

Overview

Retrieve the wire payment details that partners need to use to pay for partner invoices.

Requirements

Next, use setProforma to identify a specific partner invoice.

Parameters

Parameter Type/Description
sessionID Required (String)
  Session identifier string, output of the Login method. An exception is thrown if the values are incorrect.
refNo Required (String)
  Order reference number of an order that was marked with WIRE as payment method.

Response

Parameters Type/Description

WirePaymentDetails

Object

 

Details below

 

Amount

Double

 

 

The total costs incurred by the partner for a partner invoice invoice.

 

Currency

String

 

 

Order currency ISO code - ISO 4217.

 

PaymentReference

String

 

 

Transaction identifier.

 

RoutingNumber

String

 

 

Identification number assigned to financial institutions.

 

BankAccounts

Array of objects

 

 

Array of BankAccountDetails objects with the structure detailed below. Can be NULL.

 

 

Beneficiary

String

 

 

 

Payment beneficiary name. Can be NULL.

 

 

BankName

String

 

 

 

Beneficiary bank name. Can be NULL.

 

 

BankCountry

String

 

 

 

Beneficiary bank country. Can be NULL.

 

 

BankCity

String

 

 

 

Beneficiary bank city. Can be NULL.

 

 

BankAddress

String

 

 

 

Beneficiary bank address. Can be NULL.

 

 

BankAccount

String

 

 

 

Beneficiary bank account number. Can be NULL.

 

 

BankAccountIban

String

 

 

 

Beneficiary IBAN. Can be NULL.

 

 

BankAccountSwiftCode

String

 

 

 

Beneficiary SWIFT code. Can be NULL.

 

 

Currency

String

 

 

 

Bank account currency ISO code – ISO 4217. Can be NULL.

Request

<?php

require('PATH_TO_AUTH'); // Authentication example: https://knowledgecenter.avangate.com/Integration/Channel_Manager_API/SOAP/02Authentication
require('PATH_TO_setPartner'); // setPartner example: https://knowledgecenter.avangate.com/Integration/Channel_Manager_API/SOAP/06Reference/Partner/00Set_partner

$proformaNumber = 'YOUR_PROFORMA_NUMBER';

try {
    $Proforma= $client->setProforma ($sessionID, $proformaNumber);
} catch (SoapFault $e) {
    echo "ProformaOutput: " . $e->getMessage();
    exit;
}
var_dump ("ProformaOutput", $Proforma);


$paymentDetails = new stdClass();
$paymentDetails->Type = 'WIRE';
$paymentDetails->Curency = 'YOUR_CURRENCY';
$paymentDetails->CustomerIP = 'CUSTOMER_IP';

try {
    $PaymentDetailsSet= $client->setPaymentDetails($sessionID, $paymentDetails);
} catch (SoapFault $e) {
    Echo "Payment: " . $e->getMessage();
    exit;
}
var_dump ("Payment", $PaymentDetailsSet);

try {
    $ProformaPay= $client->payProforma($sessionID);
} catch (SoapFault $e) {
    Echo "ProformaPaid: " . $e->getMessage();
    exit;
}
var_dump ("ProformaPaid ", $ProformaPay);

$refNo = 'YOUR_ORDER_REFNO'

try {
    $client->getWirePaymentDetails ($sessionID, $refNo);
} catch (SoapFault $e) {
    echo "Error: " . $e->getMessage();
}

 

Errors

Error Description

INVALID_PARTNER

No partner is set.

PAYMENT_PROFORMA

You have to set a partner invoice first.

PAYMENT_NOT_SUPPORTED

The current partner invoice is not set as payable through wire.

 

Place an order with PayPal

Request

<?php

//The following script let's you place an new order with Credit/Debit cards as the payment method

$host   = "https://api.avangate.com";
$client = new SoapClient($host . "/soap/4.0/?wsdl", array(
    'location' => $host . "/soap/4.0/",
    "stream_context" => stream_context_create(array(
        'ssl' => array(
            'verify_peer' => false,
            'verify_peer_name' => false
        )
    ))
));
function hmac($key, $data)
{
    $b = 64; // byte length for md5
    if (strlen($key) > $b) {
        $key = pack("H*", md5($key));
    }
    
    $key    = str_pad($key, $b, chr(0x00));
    $ipad   = str_pad('', $b, chr(0x36));
    $opad   = str_pad('', $b, chr(0x5c));
    $k_ipad = $key ^ $ipad;
    $k_opad = $key ^ $opad;
    return md5($k_opad . pack("H*", md5($k_ipad . $data)));
}
$merchantCode = "YOUR_MERCHANT_CODE";// your account's merchant code available in the 'System settings' area of the cPanel: https://secure.avangate.com/cpanel/account_settings.php
$key = "YOUR_SECRET_KEY";// your account's secret key available in the 'System settings' area of the cPanel: https://secure.avangate.com/cpanel/account_settings.php
$now          = gmdate('Y-m-d H:i:s'); //date_default_timezone_set('UTC')
$string = strlen($merchantCode) . $merchantCode . strlen($now) . $now;
$hash   = hmac($key, $string);
try {
    $sessionID = $client->login($merchantCode, $now, $hash);
}
catch (SoapFault $e) {
    echo "Authentication: " . $e->getMessage();
    exit;
}
$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->BillingDetails = new stdClass();
$Order->BillingDetails->FirstName = 'FirstName';
$Order->BillingDetails->LastName = 'LastName';
$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@email.com';
$Order->BillingDetails->Phone = NULL;
$Order->BillingDetails->Company = NULL;
$Order->DeliveryDetails = NULL;
$Order->PaymentDetails = new stdClass ();
$Order->PaymentDetails->Type = 'PAYPAL';
$Order->PaymentDetails->Currency = 'usd';
$Order->PaymentDetails->PaymentMethod = new stdClass ();
$Order->PaymentDetails->CustomerIP = '10.10.10.10';
$Order->PaymentDetails->PaymentMethod->RecurringEnabled = true;
$Order->PaymentDetails->PaymentMethod->Email = 'email@avangate.com';
$Order->PaymentDetails->PaymentMethod->ReturnURL = 'http://YourReturnURL.com';
$Order->Promotions = NULL;
$Order->AdditionalFields = NULL;
$Order->LocalTime = NULL;
$Order->GiftDetails = NULL;
try {
    $newOrder = $client->placeOrder($sessionID, $Order);
}
catch (SoapFault $e) {
    echo "newOrder: " . $e->getMessage();
    exit;
}
var_dump("newOrder", $newOrder);

$url = $newOrder->PaymentDetails->PaymentMethod->RedirectURL;

header ("Location: $url");

W-8 and W-9 fiscal forms

In order to be compliant with the fiscal regulations in the United States, our merchants need to have the W-8/W-9 forms agreed and digitally signed.

What is the W-8 form?

The W-8 form is an Internal Revenue Service (IRS) form that is used to exempt non-US residents from submitting U.S. tax return reporting. Merchants that are registered outside the United States, but that run financial operations in US dollars are required to fill in and sign this form. These merchants (businesses or individuals) are not subjected to standard taxation practices as their investment income is not taxed.

The W-8 form is submitted by merchants only to financial companies that request it (payment processors like 2Checkout) and not directly to the IRS. Merchants that fail to submit the W-8 form can incur a 30% tax withholding and additional penalties.

Who does the W-8 form apply to?

The form applies to non-US residents, namely to foreign entities (foreign individuals or corporations) and exempt foreigners who are neither U.S. citizens nor reside in the US.

There are a variety of W-8 forms and if you are not entirely sure which one applies to you, visit the IRS website for more information.

What is the W-9 form?

The W-9 form is an Internal Revenue Service (IRS) form, also known as a Request for Taxpayer Identification Number (TIN) and Certification form, that is used solely to confirm a person’s taxpayer identification number (TIN).

Any corporation that is required to submit a 1099 form with the IRS must obtain and confirm your correct TIN to report any taxable earnings that may require you to submit a federal tax return.

The TIN holder is responsible for paying all the required taxes based on earnings reported in the provided W-9 form unless the taxpayer is subject to backup withholding. If this is the case, the W-9 form will have to include all the related details.

Who does the W-9 form apply to?

Individuals (merchants) who have US citizenship or reside in the US or entities (corporations and companies) registered in the US are required to fill in and sign this form.

Signing the W-8/W-9 forms on the 2Checkout platform

All merchants signed under Avangate Inc. or 2Checkout Inc. are required to fill in and digitally sign the W-8/W-9 forms and submit them to 2Checkout. Follow the steps below to sign the fiscal forms.

  1. After the onboarding process is completed and your account is approved by the Underwriting team, you (merchant) need to fill in the fiscal compliance form that applies to you (either W-8 or W-9). If your account has not been approved yet by the Underwriting team, you will notice that your account is in RESTRICTED mode until you finalize the submission of the required fiscal forms.
This form can be filled in only by the master account that belongs to the account holder.

2. To sign the W-8/W-9 forms, log in to your master account in the cPanel and click on the Complete now link.

W9_2.png

3. Before submitting the W-9 form, make sure that all the personal and company information you provided is correct. If you notice that some of the information is not correct, contact supportplus@2checkout.com to help you make the necessary changes. Note that any detail changes in the Control Panel (Access the user settings, Account information, Edit account information) will automatically invalidate the forms.

4. Select the I certify that I have the capacity to sign for entity identified above checkbox and then click on the Accept and submit button.

w9_5_fin.png

5. After submitting the form, a message will be displayed on top of the page informing you that form was successfully submitted, as shown in the image below.

w9_4_fin.png

6. To access your W-8/W-9 forms and to verify you have submitted them, navigate to Settings → Account information → Edit account information → IRS Forms section.

W9_6_fin.png

7. After submitting the fiscal compliance form, you will become fiscal compliant and your account will be displayed as ACTIVE.

FAQs

  • How long will my account be Restricted with reason code 406 Fiscal Sign?

Your account will be in Restricted mode until you’ve accepted, signed and submitted the fiscal forms.

  • How many notifications to sign the forms will I receive?

You will receive a notification once a week.

  • What happens when the forms expire?

Your account will be put in Restricted mode with reason code 406 Fiscal Sign and the notification process will restart.

If you need additional information about this law you can read more details on the IRS website.

A three-stage approach to recapturing lost revenue

Did you know that online shoppers left more than $4 trillion worth of merchandise in their shopping carts last year? 2Checkout will show you how to recapture revenue from your website that would otherwise be lost as leakage.

This three-stage approach outlines the core components of improving conversion rates: attracting qualified traffic, engaging existing traffic, and providing a more personalized experience after shoppers add items to their cart - and attempt to leave without purchasing.

Watch this 20-minute recorded presentation to learn about:

  • Some of the most common reasons for cart abandonment
  • Unique strategies for appealing to consumers at each stage in the process
  • Smart ways to use analytics data to improve conversion
  • Creative customization tricks to win back buyers
  • How to increase revenue in only 3 weeks
Join Our Webinar

 

Use iDEAL

Overview

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

Requirements

One shoppers from Netherlands can purchase using iDEAL. The billing country and the order country code has to be NL.

Supported currencies

  • EUR

Workflow

  1. Use the getIdealIssuerBanks method for retrieving information on the Avangate list of banks that support iDEAL payments. More details about this method here.
  2. Shoppers select iDEAL as payment option in the interface you provide them, and select their bank from the list.
  3. Create the order object. Use IDEAL as the type of the PaymentDetails object, and include ReturnURL and CancelURL. The BankCode parameter should be added based on the bank selected by the customer, from the array obtained after calling method getIdealIssuerBanks.
  4. Use the placeOrder method to send the data to Avangate.
  5. Once you place the order, Avangate logs it into the system. At this point in time, the status of the order is PENDING.
  6. Avangate returns an Order object as the output of the placeOrder method. 
  7. Use the PaymentMethod object to create a redirect URL for the shoppers, concatenating the values of the Href and avng8apitoken parameters. Here's an example of the redirect URL:
    https://api.avangate.com/4.0/scripts/ideal/authorize/?avng8apitoken=f56373d92ed6b153
    
  8. Customers are directed to the iDEAL payment page, where they have to confirm their payment details before finishing the ordering process.
  9. Shoppers are redirected to the RedirectURL from the Order information object. In case the payment fails, shoppers are redirected to the CancelURL. 

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.

To place an order with iDEAL, use IDEAL as the type of the PaymentDetails object and provide the following parameters as part of the PaymentMethod object:

  • ReturnURL - URL to which customers are redirected after a successful payment.
  • CancelURL - URL to which customers are redirected after a failed payment attempt.
  • BankCode - information retrieved based on the bank selected by the customer, from the array obtained after calling getIdealIssuerBanks method.

See code sample for more details. 

    Response

    Order information

    Object

      Object containing order information.

    Request

    <?php
    
    require ('PATH_TO_AUTH');
    
    $Order = new stdClass();
    $Order->RefNo = NULL;
    $Order->Currency = 'EUR';
    $Order->Country = 'NL';
    $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 = 'Test Cosmin API';
    $Order->BillingDetails->LastName = 'Cosmin API';
    $Order->BillingDetails->CountryCode = 'NL';
    $Order->BillingDetails->State = 'California';
    $Order->BillingDetails->City = 'LA';
    $Order->BillingDetails->Address1 = 'Address example';
    $Order->BillingDetails->Address2 = NULL;
    $Order->BillingDetails->Zip = '90210';
    $Order->BillingDetails->Email = 'cosmin.deftu@avangate.com';
    $Order->BillingDetails->Phone = NULL;
    $Order->BillingDetails->Company = NULL;
    $Order->DeliveryDetails = NULL;
    
    $Order->PaymentDetails = new stdClass ();
    $Order->PaymentDetails->Type = 'IDEAL';
    $Order->PaymentDetails->Currency = 'EUR';
    $Order->PaymentDetails->PaymentMethod = new stdClass ();
    $Order->PaymentDetails->CustomerIP = '91.220.121.21';
    $Order->PaymentDetails->PaymentMethod->ReturnURL = 'http://yourreturnurl.com';
    $Order->PaymentDetails->PaymentMethod->CancelURL= 'http://yourcancelurl.com';
    $Order->PaymentDetails->PaymentMethod->BankCode='RABONL2U+RAB'; // value retrieved based on the bank selected by the customer, from the array obtained after calling method getIdealIssuerBanks.
    
    $Order->Promotions = NULL;
    $Order->AdditionalFields = NULL;
    $Order->LocalTime = NULL;
    $Order->GiftDetails = NULL;
    
    $jsonRpcRequest = array (
    'method' => 'placeOrder',
    'params' => array($sessionID, $Order),
    'id' => $i++,
    'jsonrpc' => '2.0'
    );
    
    $output = callRPC($jsonRpcRequest, $host);
    
    $idealredirect = $output->PaymentDetails->PaymentMethod->Authorize->Href."/?avng8apitoken=".$output->PaymentDetails->PaymentMethod->Authorize->Params->avng8apitoken;
    
    header('Location:' . $idealredirect);
    
    

    Order object structure

    Parameters

    Parameters Type/Description
    RefNo String
      The unique, system-generated identifier of a partner order.
    Status String
      Order status. Possible values: CANCELED, REFUND, TEST, REJECTED, COMPLETE, SUSPECT, AWAITING_PAYMENT, PENDING_APPROVAL, DELIVERY_NEEDS_INFO.
    OrderLockReason StringArray
     

    The reason why the order is blocked in a certain status.

     

    For AWAITING_PAYMENT order status, the OrderLockReason can be: UNPAID_PROFORMA, NOT_ENOUGH_CREDIT

     

    For order status DELIVERY_NEEDS_INFO, the OrderLockReason can be:

    • REQUIRED_END_USER_INFORMATION,
    • REQUIRED_RESELLER_INFORMATION,
    • REQUIRED_VENDOR_DELIVERY_CONFIRMATION

    Can be NULL.

    ProformaNumber String
     

    The unique number of the partner invoice associated with this order. Can be NULL.

    TotalAmount double
      The total value of the order, including tax, but excluding partner margins and discounts.
    Currency String
      The order currency ISO code.
    TotalSubbscriptionsNumber Int
      The total number of subscriptions generated for the products included in the order. Can be NULL, if subscriptions have yet to be generated for an order.

     

    Coupons

    Overview

    Use this section to handle coupons that are part of your promotions.

    You can add, update or remove coupons that are configured on your promotional campaigns.

     

     

    Product

    Use the Product object to create, update and retrieve subscription plans/products for your account. Use 2Checkout's API and control the following product attributes:

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

    Parameters

    Use the parameters below to add new products into your 2Checkout catalog.

    Parameters Type/Description

    Product

     

    Object / Required

    Product details.

    ProductCode

    String / Required

     

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

    ProductType

    String / Optional

     

    REGULAR or BUNDLE

    Defaults to REGULAR.

    ProductName

    String / Required

     

    The name of the product

    ProductVersion

    String / Optional

     

    The product version number

    PurchaseMultipleUnits Boolean / Optional
     

    Possible values:

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

     

    The default value is TRUE.

    ShippingClass

    Object / Optional

     

    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

    GiftOption

    Boolean / Optional

     

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

    ShortDescription

    String / Optional

     

    The product's short description

    LongDescription

    String / Optional

     

    The product's long description

    SystemRequirements

    String / Optional

     

    System requirements

    ProductCategory

    String / Optional

     

    Product category

    Platforms

    Array of Platform objects / Optional

     

    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 / Optional

     

    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) / Optional

     

    The URL from where shoppers can download trial software.

    TrialDescription

    String / Optional

     

    Descriptive text entered for trials.

    Enabled

    Boolean / Optional

     

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

    AdditionalFields

    Array of AdditionalFieldAssigned objects / Optional

     

    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 / Optional

     

    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 / Optional

     

    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 / Optional

     

     

    Details below.

     

    ProductId

    String

     

     

    Unique, system-generated product ID.

     

    ProductCode

    String

     

     

    Editable product code that you control.

    Fulfillment

    String / Required

     

    BY_AVANGATE

    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 / Required

     

    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 / Required

     

    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 / Optional

     

    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 period 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 / Optional

     

    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.

      ReturnMethod Object
        Information on the customer redirect method after a successful purchase.
                Type String
       

    Possible values:

    • DIRECT_RETURN
    • HEADER_REDIRECT
    • HTML_LINK
                URL String
        Website to which customers are redirected after a successful purchase. Example: "http://mySuccessURL.com"

     

    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.

     

    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