Skip to main content

Retrieve session content

Overview

Use the getContents method to get info on all the products added to cart by the shopper in the current session. Products can be either defined in the catalog, or created with dynamic information.    

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.

Response

Parameters Type/Description
SessionContents Object (for orders with catalog products)
SessionContents Object (for orders with dynamic products)

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->AffiliateId = NULL;
$Order->CustomerReference = NULL;
$Order->Items = array();
$Order->Items[0] = new stdClass();
$Order->Items[0]->Code = 'my_subscription_1'; // you can also send products with dynamic information
$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]->Promotion = 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 = 'TEST';
$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->HolderName = 'John';
$Order->PaymentDetails->PaymentMethod->CCID = '123';
$Order->Promotions = NULL;
$Order->AdditionalFields = NULL;
$Order->LocalTime = NULL;
$Order->GiftDetails = NULL;

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

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

 

 

Subscription upgrade

Overview

Retrieve information about the upgrade options for a specific subscription.

Trigger upgrade for your existing subscriptions, or set external references to a subscription by using the API methods displayed below.

 

Place a renewal order

Overview

Renew a subscription and collect recurring revenue using the 2Checkout Subscription Reference. You can renew subscriptions for both catalog and dynamic products. The only requirement is to provide a valid subscription reference.

Requirements

To place a renewal order, you need to provide a valid subscription reference number.

Payment methods

You can place renewal orders using the following payment methods:

  • Credit cards
  • PayPal
  • WeChat Pay
  • iDEAL
  • Purchase Order
  • Wire

Use the PaymentDetails object to change the payment method used in the ordering process.

Parameters

Edit section
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. 

SubscriptionReference

Required (String)

2Checkout generated subscription reference number. E.q. A8C5671BFE.

Response

Edit section 
Parameters Type/Description
Order information Object

Request

<?php

require ('PATH_TO_AUTH');

$Order = new stdClass();
$Order->Currency = 'USD';
$Order->Language = "EN";
$Order->Country = 'US';
$Order->CustomerIP = '91.220.121.21';
$Order->Source = "sourceAPI.net";
$Order->LocalTime = date('Y-m-d H:i:s');
$Order->Items = array();

/**/
$Order->Items[0]->RenewalInformation = new stdClass();
$Order->Items[0]->RenewalInformation->SubscriptionReference = 'A8C5671BFE'; //subscription used in the renewal process
$Order->Items[0]->Price = new stdClass();
$Order->Items[0]->Price->Type = 'CUSTOM';
$Order->Items[0]->Price->Amount = '10';
$Order->Items[0]->PriceOptions = array('uniqscale1=4');//

$Order->MachineId = "MachineID";

$Order->BillingDetails = new stdClass();
$Order->BillingDetails->Address1 = 'Bil1ing address';
$Order->BillingDetails->Address2 = 'Billing address 2';
$Order->BillingDetails->City = 'Billing City';
$Order->BillingDetails->State = 'Billing State';
$Order->BillingDetails->CountryCode = 'US';
$Order->BillingDetails->Phone = 1231232123;
$Order->BillingDetails->Email = 'customer_details@test.com';
$Order->BillingDetails->FirstName = 'First';
$Order->BillingDetails->LastName = 'Customer';
$Order->BillingDetails->Company = 'Billing Company';
$Order->BillingDetails->Zip = '55104';

$Order->DeliveryDetails = new stdClass();
$Order->DeliveryDetails->Address1 = 'Bil1ing address';
$Order->DeliveryDetails->Address2 = 'Billing address 2';
$Order->DeliveryDetails->City = 'Billing City';
$Order->DeliveryDetails->State = 'Billing State';
$Order->DeliveryDetails->CountryCode = 'US';
$Order->DeliveryDetails->Phone = '12345';
$Order->DeliveryDetails->Email = 'customer_details@test.com';
$Order->DeliveryDetails->FirstName = 'First';
$Order->DeliveryDetails->LastName = 'Customer';
$Order->DeliveryDetails->Zip = "55104";

$Order->PaymentDetails = new stdClass();
$Order->PaymentDetails->Type = "CC";
$Order->PaymentDetails->Currency = $currency;

$Order->PaymentDetails->PaymentMethod = new stdClass();
/**/
$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 Doe";
$Order->PaymentDetails->PaymentMethod->RecurringEnabled = TRUE;
$Order->PaymentDetails->PaymentMethod->HolderNameTime = 1;
$Order->PaymentDetails->PaymentMethod->CardNumberTime = 1;
/**/


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

var_dump("newOrder", $Order);
Edit section
 

Trial expiration notification

Use the variables in the list below to customize the Trial expiration notification shopper email according to your needs. Check the 'Mandatory' column to see the variables that are required in your customized version of the e-mail.

Variable name Description Test value Mandatory
AVANGATE_LOGO Avangate logo URL https://secure.avangate.com/images/e...endor_logo.png Yes
BUSINESS_COMPANY BUSINESS_COMPANY Avangate Yes
BUSINESS_SUPEMAIL BUSINESS_SUPEMAIL support@avangate.com No
COMMERCIALNAME COMMERCIALNAME [Software Company Name] No
EMAIL EMAIL [example@customer-email.com] No
ENCRYPTED_MERCHANT_CODE ENCRYPTED_MERCHANT_CODE 0 No
EXPIRATIONDATE EXPIRATIONDATE [2011-01-30] Yes
EXTERNAL_CUSTOMER_REFERENCE External customer reference Alphanumeric string No
FIRSTNAME FIRSTNAME [John No
FULL_PRICE FULL_PRICE [19.99] Yes
LASTNAME LASTNAME Doe] No
LICENSE_PERIOD LICENSE_PERIOD 6 No
MYACCOUNT_URL MYACCOUNT_URL https://secure.avangate.com/myaccoun...m&k=xxxxxxxxxx Yes
PAYMENT_METHOD PAYMENT_METHOD 1 No
PRODUCT_NAME PRODUCT_NAME [Software Product Name] Yes
REFNO REFNO [9xxxxx] No
SELLERWEBSITE SELLERWEBSITE http://www.software-company-website.com No
START_DATE START_DATE [2011-01-01] No
TECHEMAIL TECHEMAIL support@software-company-website.com No
TECHPHONE TECHPHONE [888-xxx-xxxx] No
TRIAL_PERIOD Trial period 8 No

API Migration Guide

Overview

Use this guide to prepare and migrate your 2Checkout API implementation from version 1.0 to 3.0. This document features deprecations, updates and enhancements, providing guidance on how to upgrade your implementation to the latest version of the 2Checkout API. 

API 1.0 discontinuation

2Checkout plans to discontinue API 1.0 as of the end of February 2017. The end-of-support date implies ceasing all development of bug fixes and patches for API 1.0. 

API 3.0 availability

Version 3.0 of the 2Checkout API is available as of June 2016, following an extensive public testing phase started in November 2015. 2Checkout recommends that you migrate to the latest version of the API (v3.0) to enjoy support for your implementation.

API 3.0 updates and benefits

  1. Full REST support for existing platform functionalities in addition to SOAP and JSON-RPC.
  2. Simplify interactions with single-entry point (one endpoint, one client, single-authentication).
  3. Centralized all previous functionality under 3.0 (plus new capabilities).
  4. Unified WSDL for Order, Subscription, and Product scenarios.

Serializations 1.0 vs. 3.0

Single API URL per serialization format

WSDL 1.0 vs. 3.0

When you migrate from API 1.0 to 3.0, stop using https://secure.2checkout.com/api/merchant/?wsdl in favor of https://api.2checkout.com/soap/3.0/?wsdl.

Methods 1.0 vs. 3.0

API 1.0

Status

API 3.0 equivalent

addLicense

Updated. Use:

addSubscription

addProduct

Deprecated

N/A. The placeOrder scenario now requires a single method.

clearProducts

Deprecated

N/A. The placeOrder scenario now requires a single method.

deleteProduct

Deprecated

N/A. The placeOrder scenario now requires a single method.

disableLicense

Updated. Use:

cancelSubscription

disableLicenseRecurring

Updated. Use:

disableRecurringBilling

enableLicense

Updated. Use:

enableSubscription

enableLicenseRecurring

Updated. Use:

enableRecurringBilling

extendLicense

Updated. Use:

extendSubscription

getAvailableCountries

Updated. Use:

getAvailableCountries

getAvailableCurrencies

Updated. Use:

getAvailableCurrencies

getAvailableLanguages

Updated. Use:

getAvailableLanguages

getContents

Updated. Use:

getContents

getInvoice

Updated. Use:

getInvoices

getLicense

Updated. Use:

getSubscription

getLicensePaymentDetails

Updated. Use:

getPaymentInformation

getLicenseProductUpgradeOptions

Updated. Use:

getProductUpgradeOptions

getNextRenewalPrice

Updated. Use:

getNextRenewalPrice

getOrder

Updated. Use:

getOrder

getOrderStatus

Updated. Use:

getOrder

getPrice

Updated. Use:

getPrice

getProductByCode

Updated. Use:

getProductByCode

getProductById

Updated. Use:

getProductByCode

getProductUpgradeOptionsPrice

Updated. Use:

getProductUpgradeOptionsPrice

getRenewalPrice

Updated. Use:

getRenewalDetails

getSingleSignOn

Updated. Use:

getSingleSignOn

getTimezone

Updated. Use:

getTimezone

isValidOrderReference

Updated. Use:

isValidOrderReference

login

Updated. Use:

login

placeOrder

Updated. Use:

placeOrder

renewLicense

Updated. Use:

renewSubscription

searchLicense

Updated. Use:

getSubscriptions

searchProducts

Updated. Use:

searchProducts

setBillingDetails

Deprecated.

N/A. The placeOrder scenario now requires a single method.

setClientIP

Deprecated.

N/A. The placeOrder scenario now requires a single method.

setCountry

Deprecated.

N/A. The placeOrder scenario now requires a single method.

setCurrency

Deprecated.

N/A. The placeOrder scenario now requires a single method.

setCustomer

Deprecated.

N/A. The placeOrder scenario now requires a single method.

setCustomRenewalPrice

Updated. Use:

setCustomRenewalPrice

setDeliveryDetails

Deprecated.

N/A. The placeOrder scenario now requires a single method.

setExternalRef

Deprecated.

N/A. The placeOrder scenario now requires a single method.

setLanguage

Deprecated.

N/A. The placeOrder scenario now requires a single method.

setLicenseEmailSubscription

Updated. Use:

setRenewalNotificationStatus

setLicenseUpgrade

Updated. Use:

setSubscriptionUpgrade

setPaymentDetails

Deprecated.

N/A. The placeOrder scenario now requires a single method.

setSource

Deprecated.

N/A. The placeOrder scenario now requires a single method.

setStaticPrice

Deprecated.

N/A. The placeOrder scenario now requires a single method.

updateLicense

Updated. Use:

updateSubscription

updateLicenseCustomer

Updated. Use:

updateSubscriptionEndUser

New use cases API 3.0 

SOAP

JSON-RPC

REST

Product

 

Enable/Disable products

 

Pricing

 

Save prices

 

Product group

 

Promotion

 

Order field

 

Cross-sell

 

Shipping class

 

Order object

 

1-click purchase



Orders with installments

 

Order session content object

 

Subscription import

 

Subscription

 

Next renewal price

 

Convert a trial

  

Subscription history

  

Customer

 

Copy payment info

 

Single Sign On (SSO)

Product

 

Enable/Disable products



Pricing

 

Save prices

 

Product group

 

Promotion



Order field

 

Cross-sell

Shipping class



Order object

 

1-click purchase



Orders with installments

 

Order session content object

 

Subscription import

 

Subscription

 

Next renewal price

 

Convert a trial

  

Subscription history

 

Customer

 

Copy payment info

 

Single Sign On (SSO)

 

Direct Debit UK

Overview

Direct Debit is a payment method in which the bank processes payments by accessing funds from an account when the holder instructs it to do so. It authorizes the organization you want to pay to collect the money from your account, but only after you've been notified of the amounts and dates of collection.

Once you have agreed on the payment details, the money is deducted automatically. If the organization you are paying wants to change an amount or date of collection, they have to notify you before the changes take place.

Currency

Direct Debit UK supports only GBP.

Mandates and E-mandates

Shoppers authorize 2Checkout to collect payments and instruct their banks to pay those collections with mandates.

  • 2Checkout uses e-mandates and does not require shoppers to fill in and submit paperwork.
  • Mandates expire within 36 months after the last initiated collection.
  • 2Checkout stores mandates at least for 14 months after the last collection of funds.

Workflow

To set up payments by Direct Debit UK, the shopper must complete a Direct Debit instruction to you. The instruction makes it clear that shopper allows you to debit their account. The interface for completing the Direct Debit instruction is controlled by 2Checkout. After the shopper fills in the form, 2Checkout sends the data to the payment processor and to the shopper's bank, via BACS.

Direct Debit UK orders take 21 calendar days to be confirmed. During this interval, shoppers can cancel their order regardless of the reason and receive a refund.

The Direct Debit UK rules allow the instructions to be completed by using an online application form.

Purchase flow

  1. Shoppers fill in the billing information, select United Kingdom as the billing country and choose Direct Debit UK as the payment option. Before they can continue, there are two mandatory questions that they need to answer to confirm the ownership of the bank account.
  2. Shoppers fill in the Direct Debit UK payment details.
  3. They confirm the payment details. Important: If the details are incorrect, they can edit them.
  4. The order is finalized. Important: Shoppers can print the order details if needed.
  5. 2Checkout sends the Advance Notice Letter to the shoppers informing them about the payment details.
  6. The payment is processed and the money is deducted from the shoppers' account.

Emails

2Checkout sends the Advance Notice Letter email to shoppers upon placing the order.

Order statuses

Once the shoppers place an order, 2Checkout shows it as In progress / Processing. Following the fulfillment, the order status changes to COMPLETE. If the shopper's bank rejects the payment, the order shows up as Canceled.

Refunds

2Checkout only offers support for full refunds for orders paid for via Direct Debit UK. Partial refunds are not supported.

Shoppers can ask for a "no-questions-asked" refund right during the eight weeks (56 days) following the debiting of a shopper's account. This period is extended to 13 months for unauthorized Direct Debit collections.

Additional order fields

Overview

Use this object to create / update information on additional order/product fields. 

Parameters

AdditionalField Object
Label String
  Field text.
Code String
  Field identifier. Alpha-numeric chars, underscores and dashes.
Type String
 

Field type:

  • LISTBOX
  • CHECKBOX
  • TEXT
  • HIDDEN
ApplyTo Sting
 
  • ORDER
  • PRODUCT
Values Array of values
  Custom values you control.
ValidationRule String
  The validation rule restricting the type of information shoppers can enter in the additional field during the purchase process.
Translations Array of objects
  Details below.
               Label String
  Field text translated in the language of the Translations object.
              Values Object
  Custom values you control translated in the language of the Translations object.
             Language String
  ISO language code. (ISO 639-1 two-letter code).

 

 

Subscription billing alignment via myAccount

Overview

2Checkout myAccount offers billing charges alignment (or co-termination) capabilities to customers owning two or more active subscriptions for different products acquired from you, with unsynchronized expiration/renewal dates. The co-termination process enables the proration of subscriptions, setting a single renewal date for multiple items.

2Checkout renews subscriptions sharing the same co-termination date as part of a single order. As a direct result, following the renewal process, 2Checkout issues a single invoice to customers.

Aligning subscriptions is a customer-side feature. 2Checkout does not align subscription billing cycles automatically.

Requirements

  1. Subscriptions must be associated with different products purchased from the same company.
  2. Subscriptions must be associated with different products purchased by the same customer (defined through Avangate Customer Reference (ID) and/or AV_CUSTOMERID External Customer ID). This means that you need to aggregate subscriptions under the same customer.
  3. Subscriptions status must be Active or Past due (in the grace period), but not expired or disabled.
  4. Recurring billing (auto-renewal system) needs to be enabled for subscriptions.
  5. 2Checkout aligns subscription expiration/renewal dates chronologically. Shoppers can align the next recurring billing date of a subscription that’s renewing on March 10 with one that’s renewing on March 11, but not the other way around.
  6. Subscriptions need to share the same billing cycle.
  7. Co-termination is available only for subscriptions associated to products for which customers used a credit/debit card for the initial purchase. Supported cards: VISA, MasterCard, AMEX and Discovery.
  8. Transactions for the initial orders which generated the subscriptions must share the same currency.
  9. Subscriptions for which billing involves both a base, recurring cost and a dynamic expense component (usage) incurred for metered resources consumed cannot be aligned with other subscriptions.
  10. This feature does not work for imported subscriptions.

Billing alignment flow

Customers can align subscription billing charges via myAccount. Let's assume that Customer A has acquired Subscription 1 on May 31 and Subscription 2 on June 1. Both are monthly subscriptions set to renew automatically.

  1. Customer A logins into https://secure.2checkout.com/myaccount.
  2. Selects the My Products tab https://secure.2checkout.com/myaccount/my_products/?.
  3. Clicks the Align invoice date link for Subscription 1.
  1. 2Checkout displays a list of eligible subscriptions (items that match the requirements listed above), and Customer A selects Subscription 2.
  2. 2Checkout provides details of the alignment. The process involves extending Subscription 1 to align it with Subscription 2, whose upcoming billing is the same as the co-termination date of the two items. To enable the extension, Customer A needs to pay the costs of the extra interval added to the lifetime of Subscription 1.
  3. When clicking the Continue button, 2Checkout redirects Customer A  to a shopping cart where he/she can make the payment.

Aligning billing charges for multiple subscriptions

In case customers need to align additional items beyond the first two subscriptions, all they need to do is follow the steps enumerated above, but they can do so only one subscription at a time. Provided that all requirements are met and the 2Checkout system identifies eligible items, additional subscriptions can be aligned with those already sharing the same co-termination date. 

IPN and LCN

2Checkout sends out Instant Payment Notifications for transaction that aligns subscription charge dates. Following the alignment process, 2Checkout provides IPNs for transactions made when renewing multiple subscriptions.

2Checkout sends standalone License Change Notifications for each standalone subscription when updates occur, even for aligned items.

Co-termination costs

While shoppers won't be charged extra for configuring common expiry dates (co-termination dates) for their ongoing subscriptions, they will need to pay the costs of prolonging the lifetime of the aligned subscription.

The alignment charge is the prorated price that customers need to pay to cover the costs of the interval of time that the subscription is prolonged in order to align its billing cycle to that of the target subscription that provides the co-termination date.

The initial price displayed to shoppers in myAccount represents the cost estimate of the transaction and does not include taxes. The final prorated price, including taxes, is displayed in the shopping cart, as customers advance through the stages of the co-termination process.

Renewal notifications

2Checkout sends out standalone renewal notifications for each subscription, regardless of the fact that their billing cycles are aligned or not.

Follow-ups

2Checkout sends follow-up messages for all subscriptions with the same co-termination date, provided that their billing cycles were aligned.

Grace period

Per-subscription or global Grace period settings are not impacted by this feature, even for subscription whose billing charges were aligned.

FAQ

1. Can trial subscriptions be aligned?

This feature does not apply to trial subscriptions.

2. What happens if a subscription previously aligned with another/others is upgraded?

The billing charge alignment will no longer work, and each subscription will be renewed as a standalone item by the 2Checkout system.

3. What happens a subscription that I previously aligned with another/others is renewed with a new product version?

The billing charge alignment continues to work as before.

B2B commerce and subscriptions

As enterprise and mid-market software firms alike develop new SaaS product offerings to complement (or in many cases succeed) their incumbent on-premise solutions, they need to rewrite their business, engagement, sales, and monetization models. In this webinar, join guest speaker, Forrester Research VP, and Principal Analyst Peter Sheldon, as he probes the challenges of setting up and operating a profitable SaaS software business and the role that B2B eCommerce will play in automating the B2B sales cycle and improving subscription-based revenue.

Commerce expert Raj Badarinath, 2Checkout's VP of Product Marketing and Growth Services, covers the tools and best practices for companies to improve sales effectiveness and how navigating the Digital Commerce Lifecycle and the need to Always Be Converting at every step of the lifecycle will increase conversion, reduce revenue leakage and turn it into revenue uplift.

Watch this webinar and learn:

  • Why business model agility is key to a successful B2B online sales channel
  • How self-service tools are removing friction from the buying process
  • Why the use of consumption-based monetization models are becoming increasingly popular
  • The key capabilities that software firms need when selling B2B online in order to increase customer lifetime value and operational efficiency
Join Our Webinar

 

Subscription import

Overview

Add/import subscriptions in the 2Checkout system. Include card data with your subscription import only if you contacted 2Checkout to enable this functionality for your account. Otherwise, the import process results in a failure. Contact 2Checkout or your account manager directly for more details.

Parameters

Parameters Type/Description

ExternalSubscriptionReference

Required (string)

 

Unique identifier for your subscription. Mandatory when importing subscription data.

StartDate

Required (string)

 

Subscription start date(YYYY-MM-DD) - StartDate is mandatory when importing subscription data. If you changed the time zone for the 2Checkout API by editing system settings under Account settings, then the StartDate you provide must be in accordance with your custom configuration.

ExpirationDate

Required (string)

 

Subscription expiration date(YYYY-MM-DD) - ExpirationDate is mandatory when importing subscription data. If you changed the time zone for the 2Checkout API by editing system settings under Account settings, then the ExpirationDate you provide must be in accordance with your custom configuration.

Product

Required (object)

 

The product for which 2Checkout generated the subscription. Details below.

 

ProductCode

String

 

 

Unique product identifier that you control.

 

ProductId

Int

 

 

Unique, system-generated product identifier.

 

ProductName

String

 

 

Product name.

 

ProductQuantity

Int

 

 

Ordered number of units.

 

ProductVersion

String

 

 

Product version.

 

PriceOptionCodes

Array

 

 

The product options codes the customer selected when acquiring the subscription. Pricing options codes are case sensitive.

EndUser

Required (object)

 

The end user of the subscription. Details below.

 

Person

Object

    Details below. 

 

 

FirstName

String

 

 

 

End user's first name

 

 

LastName

String

 

 

 

End user's last name

 

 

CountryCode

String

 

 

 

End user country code [ISO3166-1 Alpha 2].

 

 

State

String

 

 

 

End user state.

 

 

City

String

 

 

 

End user city.

 

 

Address1

String

 

 

 

End user first address line.

 

 

Address2

String

 

 

 

End user second address line.

 

 

Zip

String

 

 

 

End user zip code.

 

 

Email

String

 

 

 

End user email address.

 

 

Phone

String

 

 

 

End user phone number.

 

 

Company

String

 

 

 

Company name.

 

Fax

String

 

 

End user fax.

 

Language

String

 

 

Language [ISO639-2] the 2Checkout system uses for communications.

DeliveryInfo

Optional (object)

 

The object contains information about the delivery/fulfillment made to the customer.

 

Description

String

 

 

Delivery description.

 

Codes

Array of objects

    Details below. 

 

 

Code

String

 

 

 

Delivered activation key/code.

 

 

Description

String

 

 

 

Code description for dynamic lists from your key generator. 

 

 

ExtraInfo

Object

 

 

 

Info set by your key generator for dynamic lists only.

 

 

 

CodeExtraInfo

Object

 

 

 

Type

String

 

 

 

Label

String

 

 

 

Value

String

 

 

File

Array of objects

      Details below. 

 

 

 

Content

String

 

 

 

 

Content of the file (base64 encoded).

 

 

 

ContentLength

Int

 

 

 

 

File size.

 

 

 

Filename

String

 

 

 

 

The name of the delivered file.

 

 

 

FileType

String

 

 

 

 

The type of the delivered file.

PartnerCode

Optional (string)

 

  • Empty: for ecommerce orders
  • Partner Code (mandatory)

ExternalCustomerReference

Optional (string)

 

Customer identifier you control.

SubscriptionValue

Optional (double)

 

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

When you send this parameter you must accompany it by ValueCurrency.

SubscriptionValueCurrency

Optional (string)

 

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

AdditionalInfo

Optional (string)

 

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

NextRenewalPrice

Optional (double)

 

The future costs that subscribers would incur when their subscriptions are renewed. When provided, you must accompany it by NextRenewalPriceCurrency and CustomPriceBillingCyclesLeft.

NextRenewalPriceCurrency

Optional (string)

 

Mandatory when you send CustomPriceBillingCyclesLeft. The currency associated with the subscription next renewal price value.

CustomPriceBillingCyclesLeft

Optional (string)

 

Mandatory when you send NextRenewalPrice. 2Checkout applies the next renewal price to the number of billing cycles you define.

Test Optional (integer)
  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.

CardPayment

Optional (object)

 

Include payment (credit/debit card) information that 2Checkout uses for recurring billing to renew imported subscriptions. Importing subscriptions with payment data is available only to eligible 2Checkout accounts. Contact 2Checkout directly for additional details.

LastPurchasePrice Numeric
 

The last subscription costs incurred by the customer. Required only if LastPurchasePriceCurrency exists.

LastPurchasePriceCurrency String
  The currency used on the last subscription price.
LastRenewalPurchaseDate String
  Format is YYYY-MM-DD.

Card payment

Add credit/debit card details when importing subscriptions. 2Checkout uses payment information in the recurring billing process. 

For imports of test subscriptions, use the credit card information from this article.

Parameters Type/Description

CardPayment

Object

CardNumber

Required (string)

 

The credit/debit card number.

CardType

Required (string)

 

VISA, VISAELECTRON, MASTERCARD, MAESTRO, AMEX, DISCOVER, DANKORT, CARTEBLEUE, JCB.

ExpirationYear

Required (string)

 

The year in which the card expires.

ExpirationMonth

Required (string)

 

The month in which the card expires.

HolderName

Required (string)

 

Card holder name.

CCID

Required (string)

 

Credit Card Identification - an extra ID printed on the card, usually a 3-4 digit number, the CVC2/CVV2.

HolderNameTime

Required (int)

 

The interval of time in seconds in which shoppers enter their name in the HolderName field. An abnormally short interval is usually a red flag for fraud attempts.

AutoRenewal

Optional (bool)

 

True or false, depending on whether the customer or you enabled or disabled subscription auto-renewals.

CardNumberTime

Optional (int)

 

The interval of time in seconds in which shopper enter their card number in the CardNumber field. An abnormally short interval is usually a red flag for fraud attempts.

Can be NULL, but not a negative number.

 

 

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