Skip to main content

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.

 

 

Search methods pagination

Overview

Starting with 2Checkout API 5.0, search methods are including the option of pagination. Pagination has been developed for decreasing the request loading time, while allowing you to better handle the returning responses.

How it works?

Pagination works on all the search methods existing on 2Checkout API 5.0. The default pagination behavior is to display page 1 with 10 results. The maximum number of items displayed on a single page is 200.

Parameters

To use pagination, include the Pagination object inside the search method call, using the parameters below:

Parameters Type/Description
Pagination Object
  Details below.
  Page Int
    Set the number of pages that should be returned.
  Limit Int
    Set a limit for the number of results that should be returned.

Response

The response of search methods that are including pagination will contain a new object, with the following parameters:

Parameters Type/Description
Pagination Object
  Details below
  Page Int
    Set the number of pages that should be returned.
  Limit Int
    Set a limit for the number of results that should be returned.
  Count Int
    Number of total results returned

Sample request

The below PHP sample includes a search method for subscriptions.

<?php

require('PATH_TO_AUTH');

$SubscriptionSearch = new stdClass();
$SubscriptionSearch->CustomerEmail  = 'email@avangate.com';
$SubscriptionSearch->DeliveredCode = null;
$SubscriptionSearch->AvangateCustomerReference = null;
$SubscriptionSearch->ExternalCustomerReference = null;
$SubscriptionSearch->Aggregate = false;
$SubscriptionSearch->SubscriptionEnabled = null; //true false null
$SubscriptionSearch->RecurringEnabled = null; // true - autorenewal, false - manual renewal, null = both(default)
$SubscriptionSearch->ProductCodes = null; //array('Product_Code1', 'Product_Code2');
$SubscriptionSearch->CountryCodes = null;//array ('au')
$SubscriptionSearch->PurchasedAfter = null;
$SubscriptionSearch->PurchasedBefore = null;
$SubscriptionSearch->ExpireAfter = null;
$SubscriptionSearch->ExpireBefore = null;
$SubscriptionSearch->LifetimeSubscription = null;
$SubscriptionSearch->Type = 'regular'; //'trial', 'regular', 'regularfromtrial'
$SubscriptionSearch->TestSubscription = null; // true, false, null = both(default)
$SubscriptionSearch->Pagination = new stdClass();
$SubscriptionSearch->Pagination->Page = 1; // set the number of pages for the response
$SubscriptionSearch->Pagination->Limit = 200; // set the limit for the values from the response

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

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


Boleto/Pix

Overview

Boleto/Pix is a payment method tailored for international e-merchants, designed to make it easy for them to receive money from Brazilian customers. The Boleto/Pix credit transfer service enables customers in Brazil to make online purchases via 2Checkout and pay offline at any Brazilian post office, bank branch, or through Internet banking. Boleto/Pix has grown to a market share of approximately 25% in Brazil.

Recommended resources

Availability

Available for merchants on 2Sell, 2Subscribe, 2Monetize accounts and to all shoppers in Brazil. Boleto/Pix is supported in the ConvertPlus ordering engine.

Requirements

Shoppers need to provide their CPF (Fiscal Number) in order to pay through Boleto/Pix.

Shopper flow

  1. When placing an order, shoppers in Brazil can select Boleto/Pix as a payment option.
  2. Shoppers will have to provide their CPF (Fiscal Number), which is unique to Brazil, on the next page, and will receive an email confirmation.
  3. In order to complete the order,  shoppers will need to generate the boleto (banking ticket), by clicking Generate Boleto.
  4. Customers need to print the payment slip (Boleto) which contains a bar-coded invoice and take it to one of the convenient Boleto locations. Boleto can easily be paid via Internet banking, at ATMs, at any branch of associated banks or at one of more than 13.000 Brazilian lottery agencies. Shoppers can finalize the transaction using cash or any other accepted payment method.

Select Boleto payment

Select the Boleto Bank

 

boleto3.jpg

boleto4.jpgSelect Pix Payment

Payment confirmation

Once the order is paid, the payment should be processed by 2Checkout within three hours. An email containing the product/licensing information will be sent to the email address used by the shopper during the checkout process.

Next renewal price

Overview

Retrieve the costs of the next subscription renewal.

Attributes

Parameters Type/Description

NetPrice

Double

 

Price without taxes

NetCurrency

String

 

Currency for the price without taxes. The currency ISO code used for the payment - ISO 4217.

FinalPrice

Double

 

Price with taxes

FinalCurrency

String

 

Currency used for prices with taxes. The currency ISO code used for the payment - ISO 4217.

 

 

Payment confirmation

Overview

2Checkout automatically sends out the payment confirmation email to provide shoppers with a confirmation of having successfully placed the order.

As of July 13th, 2016, you can use a redesigned template complete with fresh content. The new template has replaced the previous payment confirmation email, but any customization you have in place, either in terms of styling or content, continues to be available.

Availability

All 2Checkout accounts.

What is the purpose of this email?

2Checkout sends the payment confirmation email for all successfully placed orders for which it has started processing transactions.

Email content

The email includes one or several of the following:

  1. Purchase details with information on ordered products, quantities, unit prices, taxes, and total amount.
  2. Indication of next steps to be expected (the shoppers are informed they will be sent a payment receipt email once the payment is authorized and delivery information - if applicable).
  3. Technical and payment support contact details.

Sample

Payment Confirmation Sample

Is this the only email my shoppers receive after placing an order?

2Checkout sends the payment confirmation email for all successfully placed orders.

Preview and test email

Navigate to the Email template manager section to:

  • Preview and test current templates for emails sent to your shoppers
  • Customize the header and the footer sections by creating custom templates you can assign to your emails

Access the payment confirmation email under the Order section.

Why don't I see the new template for this email?

The redesigned template for the payment confirmation email has automatically replaced default templates.

If your preview of payment confirmation email does not show the new template, you are most probably using a customized version that includes content and/or styling your company requested at a certain point in time.

You can compare the above sample to your current template and send us an email if you decide the new one suits your business needs better. We will work with you on the switch.

Online conversion basics

If you're not growing, you are dying. Learn how to grow your online revenue through conversion rate optimization and split-testing your website.

You'll learn:

  • How split-testing is different than before and after testing
  • How to forecast revenue (or averted losses) from a test
  • How to build a business case for your optimization program

See real-world case studies with surprising results, showing that even proven best practices need to be validated through testing.

Join Our Webinar

 

Follow-up auto email

Overview

If you are leveraging 2Checkout lead management tools (set your campaigns here), our system automatically sends out the Follow-Up Auto email as part of the overall strategy to increase subscriber retention and the conversion rate of recurring charges. This notification makes it easy for subscribers to still renew their subscription in the case of scheduled recurring charges fail.

As of August 31, 2016, you can use a redesigned template complete with fresh content (sample below). The new template has replaced the previous Follow-Up Auto carts email, but any customization you have in place, either in terms of styling or content, continues to be available.

Availability

The lead management set of tools is available for Standard and Enterprise accounts. If you are running on our Growth offer and would like to receive access, please send us an email and we will discuss next steps.

What is the purpose of this email?

2Checkout performs dunning management for unfinished payments (declined) for auto-recurring charge attempts. Messages include links redirecting to a shopping cart where shoppers can manually purchase subscription renewals, but also links to their myAccount. The email covers failed transactions involving credit/debit cards, PayPal, direct debit, and recurring charges for subscriptions acquired through iDeal.

Email content

The email includes:

  1. Link to the shopping cart for the manual subscription renewal.
  2. Link to shopper myAccount.
  3. Order, product, and subscription details.

Preview and test the email sample

Navigate to the Email template manager section to:

  • Preview and test current templates for emails sent to your shoppers
  • Customize the header and the footer sections by creating custom templates you can assign to your emails

Access the Follow-Up Auto email under the Follow-Up section.

Why don't I see the new template for this email?

The redesigned template for the Follow-Up Auto email has automatically replaced default templates.

If your preview of Follow-Up Auto email does not show the new template, you are most probably using a customized version that includes content and/or styling your company requested at a certain point in time.

You can compare the above sample to your current template and send us an email if you decide the new one suits your business needs better. We will work with you on the switch.

Add products

Overview

Use addPromotionProducts to add products to an existing promotion.

Parameters

Parameter Type/Description

sessionID

Required (string)

 

Output of the Login method.

promotionCode

Required (string)

 

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

promotionProducts

Required (object)

 

Code

Required (string)

 

 

System generated product code.

 

pricingConfigurationCode

Optional (string)

 

 

System generated pricing configuration code.

 

pricingOptionCodes

Optional (array of strings)

 

 

Pricing option codes that you control.

Response

Parameter Type/Description
PromotionProducts Object

Request

<?php

require ('PATH_TO_AUTH');

// Define a product to add to the promotion
$newProduct1 = new stdClass;
$newProduct1->Code = '';
$newProduct1->PricingConfigurationCode = '';
$newProduct1->PricingOptionCodes = ['',''];

// Define another product to add to the promotion
$newProduct2 = new stdClass;
$newProduct2->Code = '';
$newProduct2->PricingOptionCodes = [''];

$productPromotion = [$newProduct1, $newProduct2];

try {
    $updatedPromotion = $client->addPromotionProducts($promotionCode, $productPromotion);
}

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

var_dump("UpdatedPromotion", $updatedPromotion);

Add usage

Overview

Use the addSubscriptionUsage method in SOAP API 6.0 to add multiple usages at the same time.

Request Parameters

Parameters Type Required Description
merchantCode String Required The system-generated merchant ID.
sessionID String Required Unique 2Checkout session ID code.
SubscriptionReference String Required Unique 2Checkout subscription reference code.
hash String Required The MD5 hmac key for the request.
OptionCode String Required Unique 2Checkout option code.
UsageStart Datetime Required Date when the usage starts. Format "YYYY-MM-DD". The timezone used is the one on the server.
UsageEnd Datetime Required Date when the usage ends. Format "YYYY-MM-DD". The timezone used is the one on the server.
Units Number Required Number of usage units consumed by user.
Description String Optional It can be used to store a short merchant comment of the usage being uploaded. This can be anything, from the source of usage (mobile, web, etc.), to why changes occurred, etc. Example: Subscription usage for September.

Request Sample

<?php
require ('PATH_TO_AUTH'); // authentication call
$SubscriptionReference = "B7D8E72224";

try {
    $subscriptionUsageRequest = new stdClass();
    $subscriptionUsageRequest->OptionCode = "scale";
    $subscriptionUsageRequest->UsageStart = "2025-03-02 10:00:10";
    $subscriptionUsageRequest->UsageEnd = "2025-04-01 10:00:10";
    $subscriptionUsageRequest->Units = 404;
    $response = $client->addSubscriptionUsage(
        $sessionID,
        $SubscriptionReference,
        [$subscriptionUsageRequest]
    );
    var_dump($response);
} catch (SoapFault $ex) {
    $faultname = (isset($ex->faultname)) ? " $faultname" : '';
    echo "[$ex->faultcode]$faultname: $ex->faultstring" . PHP_EOL;
}
 exit;

Response 

The successful addSubscriptionUsage call via SOAP APIv6 returns the Usage object.

array(1) {
      [0] =>
      class stdClass#3 (9) {
        public $usageReference =>
        string(12) "120011112191"
        public $subscriptionReference =>
        string(10) "67F3AD6A32"
        public $optionCode =>
        string(6) "USG_MN"
        public $usageStart =>
        string(19) "2020-07-06 12:00:00"
        public $usageEnd =>
        string(19) "2020-07-07 12:00:00"
        public $units =>
        int(30)
        public $description =>
        string(0) ""
        public $renewalOrderReference =>
        string(0) ""
      }
    }

Error handling

Error message description Error code Error message
LICENCECODE is not a valid licence code for the merchant INPUT_ERROR Usage was not added as the license code provided is invalid.
OPTIONCODE is invalid for the Merchant and Licence or is not a usage-based option code INPUT_ERROR Usage was not added as the option code provided is invalid.
Provided usage entries overlap within themselves or with existing usage entries INPUT_ERROR Usage was not added as the usage interval provided overlaps with an existing usage interval for the same LICENCECODE and OPTIONCODE combination.

 

Provided date formats are unsupported

INPUT_ERROR Usage start format unsupported. Please use YYYY-MM-DD HH:MM:SS.
Usage end format unsupported. Please use YYYY-MM-DD HH:MM:SS.

 

 

One or more mandatory parameters are missing or do not have the required format

INPUT_ERROR Usage was not added as one or more of the mandatory parameters are missing.
Usage was not added as one or more of the parameters do not match the required format.
Units not allowed.
Provided usages' start date is prior to the subscription start date or end date is after the subscription expiration date. INPUT_ERROR Usage interval out of bounds.
Unexpected error happens INTERNAL_ERROR <unexpected_error>

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