Skip to main content

Quick payment reports

Overview

Quick payments allow you to provide extra money to your top affiliates either though a one-time payment or via recurrent payments.

Availability

All 2Checkout accounts. 

Generate quick payments reports

You can find the Quick payments tab in the Accounting -> Direct payments menu.

  1. Use the Quick payments search section to configure the filters used in generating the report. You can filter the results by target affiliate, website or the payment date.
  2. Once you have finished configuring your filters, click Search. The report is displayed below and it contains 10 results/page. You can extend the displayed results number to 20 results/page
  3. To export the entire report as a CSV file you can use the Export as CSV button.

The report shows you the payment date, the target affiliate, the amount you paid to your affiliate, 2Checkout's commission and the payment status (Succeeded orFailed).

Subscription Management

Overview

Manage the lifecycle of your subscriptions and control different processes such as delaying the start of a subscription, canceling a subscription, searching a subscription from the Subscriptions page in your Merchant Control Panel.

Availability 

The Subscriptions section is available to all 2Checkout accounts. For more details about subscriptions, read here.

 

Cross-sell

Overview

Use this object to retrieve information about the cross-sell campaigns you configured for your account. 

Parameters

Parameter Type/Description

MasterProducts

Array

 

Array of product codes for the items you set to trigger the cross-sell campaign.

DisplayType

String

 

  • cart – Shopping cart
  • review – Review page
  • finish – Thank you page

DisplayInEmail

Boolean

 

True or false depending on whether you set the cross-sell campaign to display in payment receipt emails or not.

Products

Array of objects

 

Details below

 

ProductCode

String

 

 

Product code for the item you set as recommended for the cross-sell campaign.

 

Discount

String

 

 

Value of the discount. This is a percentage.

 

DiscountType

String

    PERCENT – you can only set discounts as a percentage from the product price.
  Type String

 

 

Example: Own

  AutoAdded Boolean
  DiscountedPrice Array of objects
    Details below.
                            Currency String
                            Price Float
  BasePrice Array of objects
                            Currency String
                            Price Float

CampaignCode

String

 

Unique, system-generated cross-sell campaign code.

Name

String

 

Campaign name.

StartDate

String

 

YYYY-MM-DD. The start date you set for the cross-sell campaign.

EndDate

String

 

YYYY-MM-DD. The end date you set for the cross-sell campaign.

CampaignStatus String
  The status of the cross-sell campaign.
CampaignOwnerType String
  Campaign owner type: Can be either MERCH or AFF.

Convert a trial

Overview

Use the convertTrial method to convert a trial to a paid subscription. In the eventuality of a conversion failure, you can use convertTrial again for the same trial subscription only after you let 24 hours pass since the initial attempt. The 2Checkout system attempts to automatically convert trials before they expire to full subscriptions, unless you made an attempt that failed less than 24 hours before the scheduled expiration deadline.

In case the trial conversion fails due to a transaction issue, the 2Checkout system sends unfinished payment follow-up emails to customers, provided that you set up lead management for your account.

Parameters

Parameters Type/Description

SubscriptionReference

Required (string)

 

Unique, system-generated subscription identifier of the trial that you convert to a paid subscription. The unique identifier from the 2Checkout system:

  • Must belong to an active trial subscription with the recurring billing system (auto-renewal) enabled.
  • The initial order placed to access the trial subscription must be finalized (status Finished).

Note: This method does not work for cancelled and/or expired trial subscriptions.

 

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

ExtendSubscriptionFromPaymentDate

Optional (boolean)

 

true = Set the moment of the conversion as the start date of the full subscription. 

Example: A 7 day trial purchased on October 29 for a monthly subscription converted on October 30 with $ExtendSubscriptionFromPaymentDate = true; features the following Billing cycle expiration: Nov 30, 2013 and 2Checkout scraps the initial trial expiration date November 5.

 

false = Set initial trial expiration deadline as the fhe full subscription start date. 

Example: A 10 day trial purchased on October 29 for a monthly subscription converted on October 30 with $ExtendSubscriptionFromPaymentDate = false; features the following Billing cycle expiration: December 9, with the first month period of the subscription added to the trial lifetime stretching until November 8.

 

Can be NULL. If not sent, the default value is false.

Response

Parameters Type/Description

Boolean

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

Request


<?php

require ('PATH_TO_AUTH'); 
 
$SubscriptionReference = 'BF44555C6C';

$ExtendSubscriptionFromPaymentDate = true; //false can also be used if you want the subscription start date to be the moment when the trial was set to initially expire.

try {
    $convertedTrial = $client->convertTrial($sessionID, $SubscriptionReference, $ExtendSubscriptionFromPaymentDate);
}
catch (SoapFault $e) {
    echo "convertedTrial: " . $e->getMessage();
    exit;
}
var_dump("convertedTrial", $convertedTrial);

Search leads

Overview

Use the searchLeads method to retrieve leads created in the 2Checkout system.

Request Parameters

Parameters Required Type/Description
Page Required String. The page in the result set.
Limit Required Number. The number of items to be retrieved on each page.

Request Example

<?php

require ('PATH_TO_AUTH');

$LeadSearchInput = new stdClass();

$LeadSearchInput->Type = "New";
$LeadSearchInput->Language = "BG";
$LeadSearchInput->Country = "RO";
$LeadSearchInput->Page = 1;
$LeadSearchInput->Limit = 200;

try {
    $leadData = $client->searchLeads($sessionID, $LeadSearchInput);
} catch (SoapFault $e) {
    echo "searchLeads: " . $e->getMessage();
    exit;
}

var_dump("searchLeads", $leadData);

Response Example

class stdClass#4 (2) {
  public $Items =>
  class stdClass#5 (1) {
    public $0 =>
    class stdClass#6 (14) {
      public $LeadCode =>
      string(10) "60E6C4B574"
      public $GeneratedFrom =>
      string(3) "API"
      public $CartId =>
      string(11) "CartIdValue"
      public $Currency =>
      string(3) "EUR"
      public $Language =>
      string(2) "BG"
      public $ExternalReference =>
      string(18) "REST_API_3CHECKOUT"
      public $MachineId =>
      string(6) "123asd"
      public $LocalTime =>
      string(19) "2019-11-05 16:48:28"
      public $Items =>
      class stdClass#7 (1) {
        public $0 =>
        class stdClass#8 (15) {
          public $Code =>
          string(10) "04C26C50F8"
          public $Quantity =>
          string(1) "2"
          public $SKU =>
          NULL
          public $Name =>
          string(5) "softy"
          public $Description =>
          NULL
          public $IsDynamic =>
          bool(false)
          public $Tangible =>
          bool(false)
          public $PurchaseType =>
          string(7) "PRODUCT"
          public $PriceOptions =>
          NULL
          }
          public $RecurringOptions =>
          class stdClass#9 (5) {
            public $CycleLength =>
            NULL
            public $CycleUnit =>
            NULL
            public $CycleAmount =>
            NULL
            public $ContractLength =>
            NULL
            public $ContractUnit =>
            NULL
          }
          public $RenewalInformation =>
          class stdClass#10 (1) {
            public $SubscriptionReference =>
            NULL
          }
          public $MarketingCampaigns =>
          class stdClass#11 (3) {
            public $Type =>
            string(2) "23"
            public $ParentCode =>
            string(1) "m"
            public $CampaignCode =>
            string(2) "23"
          }
          public $Price =>
          class stdClass#12 (2) {
            public $Amount =>
            string(2) "20"
            public $Type =>
            string(6) "CUSTOM"
          }
          public $AdditionalFields =>
          NULL
          public $SubscriptionStartDate =>
          string(19) "2019-11-05 16:48:28"
        }
      }
      public $BillingDetails =>
      class stdClass#13 (12) {
        public $FirstName =>
        string(8) "Customer"
        public $LastName =>
        string(9) "2Checkout"
        public $Phone =>
        NULL
        public $Company =>
        NULL
        public $FiscalCode =>
        string(8) "32423423"
        public $Email =>
        string(22) "customer@2checkout.com"
        public $Address1 =>
        string(12) "Test Address"
        public $Address2 =>
        NULL
        public $City =>
        string(2) "LA"
        public $Zip =>
        string(5) "12345"
        public $CountryCode =>
        string(2) "RO"
        public $State =>
        string(2) "CA"
      }
      public $DeliveryDetails =>
      class stdClass#14 (12) {
        public $FirstName =>
        string(8) "Customer"
        public $LastName =>
        string(9) "2Checkout"
        public $Phone =>
        NULL
        public $Company =>
        NULL
        public $FiscalCode =>
        string(8) "32423423"
        public $Email =>
        string(22) "customer@2checkout.com"
        public $Address1 =>
        string(12) "Test Address"
        public $Address2 =>
        NULL
        public $City =>
        string(2) "LA"
        public $Zip =>
        string(5) "12345"
        public $CountryCode =>
        string(2) "RO"
        public $State =>
        string(2) "CA"
      }
      public $DeliveryInformation =>
      class stdClass#15 (1) {
        public $ShippingMethod =>
        class stdClass#16 (1) {
          public $Code =>
          string(5) "sdfsd"
        }
      }
      public $PaymentDetails =>
      class stdClass#17 (4) {
        public $Type =>
        string(2) "CC"
        public $Currency =>
        string(3) "EUR"
        public $PaymentMethod =>
        class stdClass#18 (2) {
          public $RecurringEnabled =>
          bool(false)
          public $CardPayment =>
          class stdClass#19 (1) {
            public $InstallmentsNumber =>
            string(2) "23"
          }
        }
        public $CustomerIP =>
        string(7) "1.2.3.4"
      }
      public $Promotions =>
      array(1) {
        [0] =>
        string(0) ""
      }
    }
  }
  public $Pagination =>
  class stdClass#20 (3) {
    public $Page =>
    int(1)
    public $Limit =>
    int(200)
    public $Count =>
    int(1)
  }
}

Customer

Overview

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

Retrieve a customer

Customer object

Parameters Type/Description

AvangateCustomerReference

Int

 

System-generated 2Checkout customer reference.

 

null when you create a new customer. The 2Checkout system generates default customer numerical (integer) IDs (AV_CUSTOMERID) automatically for all orders containing products that feature subscriptions.

 

 

Aggregate subscriptions under the same Customer account by adding the AV_CUSTOMERID (case sensitive) parameter to Buy links.

ExternalCustomerReference

String

 

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

FirstName

String

 

Customer's first name. 

LastName

String

 

Customer's last name.

Company

String

 

Company name.

FiscalCode

String

 

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

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

 

Can be null for end users.

Address1

String

 

Customer's address.

Address2

String

 

Customer's address.

City

String

 

Customer's city.

State

String

 

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

Zip

String

 

Zip code.

CountryCode

String

 

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

Phone

String

 

Customer's phone number.

Fax

String

 

Customer's fax number.

Email

String

 

Customer's email.

Enabled

Boolean

 

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

 

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

Trial

Boolean

 

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

Language

String

 

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

Trustly

Overview

With Trustly, you can accept payments, issue payouts, and access valuable user insight data. Easy activation and multi-currency functionality give you the power to expand your business across borders with access to customers in Europe, Australia, Canada, and the US.

Availability

Trustly is available for shoppers in the following countries:

  • Austria
  • Croatia
  • Cyprus
  • Czech Republic
  • Denmark
  • Estonia
  • Finland
  • Germany
  • Latvia
  • Lithuania
  • Malta
  • Netherlands
  • Norway
  • Spain
  • Sweden
  • United Kingdom

Requirements

Make sure the billing country code is set to AT, CY, CZ, DE, DK, EE, ES, FI, GB, HR, LT, LV, MT, NL, SE.

Supported currencies

  • CZK
  • DKK
  • EUR
  • GBP
  • NOK
  • SEK

Workflow

  1. Shoppers select Trustly as a payment option in the interface you provide to them.
  2. Create the order object. Use TRUSTLY as the type of the PaymentDetails object, and include ReturnURL.
  3. Use the placeOrder method to send the data to 2Checkout.
  4. Once you place the order, 2Checkout logs it into the system. At this point in time, the status of the order is PENDING.
  5. 2Checkout returns an order object as the output of the placeOrder method. 
  6. 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/6.0/scripts...bc7fd72d008428
  7. After being redirected to Trustly, shoppers need to complete the steps of Trustly payment flow.
  8. After customers enter their payment data to Trustly, Trustly notifies 2Checkout if the payment is approved, and the status of the order becomes COMPLETE.
  9. Shoppers are redirected to the RedirectURL from the order information object. In case the payment fails, shoppers are redirected to the CancelURL

Refund an order

Overview

Refund a sale made in 2Checkout via the issueRefund API method. Depending on your business needs, you can refund only one sale item, the entire order amount, or a partial amount from the total order.

Requirements

The payment for the refundable order needs to be collected.

You cannot issue a refund for an amount higher than the total order amount.

Parameters

Parameters Type/Description
RefNo

String / Required

The order reference number of the sale for which the refund is issued. Example: '721924012'.

Amount

Double / Required

Refundable amount. Required as a supplementary check for partial refunds. Example: '26.00'.

Comment

String / Optional

Comments are displayed to customers in the refund confirmation they receive. Example: 'Let us know if you are satisfied with the refund process'. 

Reason

String / Required

In case you have custom refund reasons defined on your account, send one of the reasons. If not, send one of the platform defined reasons. Read more about 2Checkout refund reasons.

Example: 'Unwanted auto-renewal'.

Items

Array / Required only for partial refunds

In case you issue a partial refund, send the array with the information below.

  ProductCode 

String / Required

Send the product code belonging to the products to be refunded. The product code is available at product level, in the Information tab.

  Quantity

Integer / Required

Quantity to be refunded. Send only positive values.

  Amount

Double / Required

Total amount of the refunded line item, not the unit amount.

 

 

 

Tax exemption for US shoppers

Overview

In the US, sales tax is required for transactions in most states, and it is imposed on the end-consumers who receive the delivery of the order (digital or physical). Some organizations and individuals are exempt from paying this sales tax, for various reasons. Tax Exemption Certificates (TEC) are the proof by which a business, institution or individual attests that it is a tax-exempt entity, or that it is purchasing an item with the intent to use it in a way that has been deemed exempt from having sales tax applied.

Availability

  • US Sales Tax Exemption is available upon request to merchants using the reseller business model (MOR). Contact Merchant Support (supportplus@2checkout.com) to enable it on your account.
  • New orders with US sales tax exemption are available when using ConvertPlus/Inline cart shopping carts or via the API integration.
  • Support for automatic renewal orders with US sales tax exemption is available, as long as the initial/previous order was flagged as tax-exempt (on any integration type).

Tax-exempt orders

To receive orders with US sales tax deducted from the total value, a 2Checkout tax-exempt ID needs to be filled in during the ordering process. The tax-exempt ID is generated by the 2Checkout support team upon receiving tax-exemption proof from a business/institutional shopper. 

2Checkout tax-exempt ID

To request a 2Checkout tax-exempt ID, shoppers must send an email to refund@2checkout.com along with the Tax Exemption Certificate (TEC). 2Checkout tax-exempt ID is applicable only for B2B orders (placed by a US-registered entity).

Common reasons for sales tax-exemption are related to the fact that the shoppers are purchasing with the intent to resell or that they are purchasing for an entity that fits in one of these categories:

  • Federal, local or tribal government institutions.
  • Educational, religious or charitable entities.
  • Foreign diplomatic organizations.

If the Tax Exemption Certificate requires the shopper to fill in a seller name, the following company information must be included:

  • Avangate Inc dba 2Checkout, 1170 Great Oaks Way no. 210, 30022 Alpharetta, Georgia
  • Verifone Payments BV dba 2Checkout, Singel 250, Amsterdam 1016AB, Netherlands

New orders

When placing a new order, the shopper must fill in the 2Checkout tax-exempt ID to deduct taxes from the order value before placing it.

  1. During the checkout, the Business order flow needs to be selected.
  2. United Stated of America needs to be selected as a billing/delivery country. Company name and state need to match what is referenced on the Tax Exemption Certificate.
  3. The shopper needs to check the The company is tax exempt option.
  4. The 2Checkout tax-exempt ID needs to be filled in the dedicated field.
  5. If validation is successful, the tax amount will be displayed as zero. Validation checks for a match between the 2Checkout tax-exempt ID, company name, state and validity period of the provided tax exemption certificate.
  6. The shopper can proceed with the order flow.

Picture 1686653670, Picture

Automatic renewal orders

If the initial order triggering the purchase of a recurring subscription is made using a valid 2CO tax exempt ID, all subsequent automatic renewals will inherit the tax exemption status (as long as the Tax Exemption Certificate is still within validity period).

Alternatively, 2Checkout can refund the sales tax to the customer's payment account after the transaction is complete. The refund can be requested by the shopper by emailing a copy of their Tax Exemption Certificate together with the order details to refund@2checkout.com.

Once the initial order is flagged as tax-exempt in the 2Checkout system, all renewals linked to that order will also be tax-exempt if the certificate the shopper has provided is still valid when the renewal order is created.

Convert a trial

Overview

Use the convertTrial method to convert a trial to a paid subscription. In the eventuality of a conversion failure, you can use convertTrial again for the same trial subscription only after you let 24 hours pass since the initial attempt. The Avangate system attempts to automatically convert trials before they expire to full subscriptions, unless you made an attempt that failed less than 24 hours before the scheduled expiration deadline.

In case the trial conversion fails due to a transaction issue, the Avangate system sends unfinished payment follow-up emails to customers, provided that you set up lead management for your account.

Parameters

Parameters

Type/Description

sessionID

Required (string)

 

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

SubscriptionReference

Required (string)

 

Unique, system-generated subscription identifier of the trial that you convert to a paid subscription. The unique identifier from the Avangate system:

  • Must belong to an active trial subscription with the recurring billing system (auto-renewal) enabled.
  • The initial order placed to access the trial subscription must be finalized (status Finished).

Note: This method does not work for cancelled and/or expired trial subscriptions.

 

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

ExtendSubscriptionFromPaymentDate

Optional (boolean)

 

true = Set the moment of the conversion as the start date of the full subscription. 

Example: A 7 day trial purchased on October 29 for a monthly subscription converted on October 30 with $ExtendSubscriptionFromPaymentDate = true; features the following Billing cycle expiration: Nov 30, 2013 and Avangate scraps the initial trial expiration date November 5.

 

false = Set initial trial expiration deadline as the fhe full subscription start date. 

Example: A 10 day trial purchased on October 29 for a monthly subscription converted on October 30 with $ExtendSubscriptionFromPaymentDate = false; features the following Billing cycle expiration: December 9, with the first month period of the subscription added to the trial lifetime stretching until November 8.

 

Can be NULL. If not sent, the default value is false.

Response

Boolean

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

Request


<?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);
$SubscriptionReference = 'BF44555C6C';
$ExtendSubscriptionFromPaymentDate = true; //false can also be used if you want the subscription start date to be the moment when the trial was set to initially expire.

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

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

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