Skip to main content

Update a cross-sell campaign

Overview

Use the updateCrossSellCampaign method to update a cross-sell campaign for your 2Checkout account. 

Request parameters

Parameters Type Required Description

CampaignCode 

 String 

Required

The campaign code that can be used when placing orders. 

MasterProducts 

Array of strings 

Required

Array of product codes to apply to this campaign. 

DisplayType 

String 

Required

The display type of the campaign; Can be cart, review, finish.

DisplayInEmail 

Boolean 

Required

Determines if the campaign will be displayed in payment receipt emails.

Products 

Array of objects 

Required

Array of objects containing the product codes pointing to the promoted products when tied to each master product, the discount value, and the discount type (can only be percent).

ProductCode 

String 

Required

Product code of the product to be recommended to the shopper.

Discount 

Float 

Required

Value of the discount.

DiscountType 

String 

Required

Can only be 'PERCENT'.

Name 

String 

Required

Name of the campaign.

CampaignStatus

String 

Optional 

The status of the cross-sell campaign.

StartDate 

String 

Optional 

The date when the cross-sell campaign starts, formatted as YYYY-MM-DD.

EndDate 

String 

Optional 

The date when the cross-sell campaign ends, formatted as YYYY-MM-DD.

Response parameters

Parameters Type Required Description

CampaignCode 

 String 

Required

The campaign code that can be used when placing orders. 

MasterProducts 

Array of strings 

Required

Array of product codes to apply to this campaign. 

DisplayType 

String 

Required

The display type of the campaign; Can be cart, review, finish.

DisplayInEmail 

Boolean 

Required

Determines if the campaign will be displayed in payment receipt emails. Can be 'true' or 'false'.

Products 

Array of objects 

Required

Array of objects containing the product codes pointing to the promoted products when tied to each master product, the discount value, and the discount type (can only be percent).

ProductCode 

String 

Required

Product code of the product to be recommended to the shopper.

Discount 

Float 

Required

Value of the discount.

DiscountType 

String 

Required

Can only be 'PERCENT'.

Name 

String 

Required

Name of the campaign.

CampaignStatus

String 

Optional 

The status of the cross-sell campaign.

StartDate 

String 

Optional 

The date when the cross-sell campaign starts, formatted as YYYY-MM-DD.

EndDate 

String 

Optional 

The date when the cross-sell campaign ends, formatted as YYYY-MM-DD.

Request sample

<?php 

require ('PATH_TO_AUTH'); 


$csCampaign = new stdClass(); 
$csCampaign->CampaignCode = '2Xrl85eSkemBv3G3ea+9fg=='; 
$csCampaign->MasterProducts = ['C8851A5BC9']; 
$csCampaign->DisplayType = 'review'; 
$csCampaign->DisplayInEmail = true; 
$csCampaign->Name = 'testingRpc'; 
$csCampaign->StartDate = '2019-10-21'; 
$csCampaign->EndDate = '2021-10-21'; 
$csCampaign->CampaignStatus = 'ACTIVE'; 
$csCampaign->Products = []; 
$csCampaign->Products[0] = new stdClass(); 
$csCampaign->Products[0]->ProductCode = '512712FA53'; 
$csCampaign->Products[0]->Discount = 20; 
$csCampaign->Products[0]->DiscountType = 'PERCENT'; 

 
$jsonRpcRequest = new stdClass(); 
$jsonRpcRequest->jsonrpc = '2.0'; 
$jsonRpcRequest->method = 'updateCrossSellCampaign'; 
$jsonRpcRequest->params = array($sessionID, $csCampaign); 
$jsonRpcRequest->id = $i++; 


$csCampaignResponse = callRPC($jsonRpcRequest, $host, true)

Retrieve an order

Overview

Use the getOrder method to retrieve details on a specific order placed with dynamic product information, or catalog products, using the unique, system-generated reference.

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.

orderReference

Required (string)

 

Order reference number of an older order, which is already approved/paid.

Response

Parameters Type/Description

Order information

Object (orders with catalog products)

Order information Object (orders with dynamic product information)

Request 

<?php

require ('PATH_TO_AUTH');

$orderReference = 'YOUR_ORDER_REFERENCE';

try {
    $fullOrderDetails = $client->getOrder    ($sessionID, $orderReference);
}
catch (SoapFault $e) {
    echo "fullOrderDetails: " . $e->getMessage();
    exit;
}
var_dump("fullOrderDetails", $fullOrderDetails);
?>

 

Upgrade subscription

Overview

Use the setSubscriptionUpgrade method to upgrade a subscription.

Requirements

You can only upgrade subscriptions with automatic renewal enabled.

   The upgrade will not work if the subscription has a refund request that was not yet processed.

Parameters

Parameters Type/Description

sessionID

Required (string)

 

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

subscriptionReference

Required (string)

 

Unique, system-generated subscription identifier.

productCode

Required (string)

 

Unique identifier of the target product for the subscription upgrade process. You control the product code and can set it up in the Control Panel.

options

Optional (string)

 

Pricing options of the target product for the subscription upgrade process.

 

String - ';' separated list of 'OptionValue' returned by getProductUpgradeOptions function.

If the pricing options groups is "scale" (interval), the Options parameter should be sent like this: [option group unique code] + "=" + value

e.g. Users=7

customPrice

Optional (string)

 

The price you want to charge customers for the upgrade. The currency used by default is the same as in the previous payment customers made.

Response

Parameters Type/Description

Boolean

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

Request

<?php

require ('PATH_TO_AUTH');

$subscriptionReference = 'BE14FDCF37';
$ProductCode = 'my_subscription_123';
$Options = 'emailsupport;oneuser1';//case sensitive; include only price options codes (exclude spaces)
$customPrice = 1;

try {
    $upgradedSubscriptions = $client->setSubscriptionUpgrade($sessionID, $subscriptionReference, $ProductCode, $Options, $customPrice);
}
catch (SoapFault $e) {
    echo "upgradedSubscriptions: " . $e->getMessage();
    exit;
}
var_dump("upgradedSubscriptions", $upgradedSubscriptions);

Place test orders from the Merchant Control Panel

Overview

You can place five types of test orders:

  1. New acquisition
  2. Trial
  3. Automatic renewal/trial conversion
  4. Manual renewal
  5. Upgrade

To start the testing process, you first need to generate a test buy-link. Using test Buy Links you can replicate the new acquisitions and trial purchase scenarios. Automatic renewalstrial conversionsmanual renewals, and upgrades require that you placed an initial test order and that 2Checkout generated a subscription for the test purchase.

 

Recommended resources

How to generate a test Buy-Link

Create links in the Merchant Control Panel

  1. Go to Setup -> Generate links -> Checkout Links.
  2. Choose a purchase flow from the available list.
  3. Select one or more products.
  4. Optional: you can control a collection of advanced options, but none are required to place test orders.
  5. Click on Generate link.
  6. Click Place a test order. Alternatively, you can copy the generated link and paste it in your browser's address bar.

Manually add the DOTEST parameter to Buy-Links

You can add the DOTEST parameter manually to Buy Links and use the result to place test orders. For example,

Buy link: https://secure.2checkout.com/order/checkout.php?PRODS=4551041&QTY=1
Test buy link: https://secure.2checkout.com/order/checkout.php?PRODS=4551041&QTY=1&DOTEST=1

DOTEST=1

Optional

Use DOTEST=1 to place orders in a test environment. You need to enter the dummy credit card details for the specific scenario that you're testing.

DOTEST in buy-links only works if the you enabled the testing system for your account. Otherwise, it has no impact whatsoever.

New acquisition test orders

  1. Use the guidance above to generate the test buy-link.
  2. Open the test buy-link in your browser.
  3. Optional: You can change products, enter discount coupons, update pricing options, quantity, cross-sell, upsell, etc.
  4. Enter Billing Information. The details can be fictitious, but use a valid email address that you control:
    • To also get notifications from the 2Checkout system.
    • Be able to access myAccount.
  5. Use one of the dummy credit cards in the Test payment methods page to provide payment information details. Note: The result varies depending on the used card number and cardholder name.

Trial test orders

  1. Use the guidance above to generate the test buy-link.
  2. Choose the Trial link purchase flow.
  3. Open the test buy-link in your browser.
  4. Optional: You can change products, enter discount coupons, update pricing options, quantity, cross-sell, upsell, etc.
  5. Enter Billing Information. The details can be fictitious, but use a valid email address that you control:
    • To also get notifications from the 2Checkout system.
    • Be able to access myAccount.
  6. Use one of the dummy credit cards in the Test payment methods page to provide payment information details. Note: The result varies depending on the used card number and cardholder name.

Automatic renewal test orders

Renewal test orders are only available for subscriptions generated for existing test orders involving products with the subscription service enabled and set to an interval other than a one-time fee (non-recurring).

The 2Checkout system automatically renews test subscriptions before they expire. Renewal test orders require you to place an initial new purchase test order so that the 2Checkout system generates a test subscription.

  • The 2Checkout platform supports recurring billing for test orders paid with credit/debit cards. Depending on the renewal interval set for subscriptions, the 2Checkout system will charge customers in accordance with the following two scenarios:
    • The subscription renewal interval is smaller or equal to six (6) months. The 2Checkout system will attempt to charge customers (per their time zone) at a maximum of three (3) hours prior to the expiration of the current subscription.
    • Subscription renewal interval is larger than six (6) months. The first attempt to charge shoppers is made 27 hours prior to the expiration date. A subsequent attempt is made, seven (7) hours before the subscription is set to expire.

Trigger an automatic renewal test order

  1. Go to Subscription management or to Order search and search either for a test subscription or a test order. It's mandatory to use a non-lifetime test subscription.
  2. Click on View subscription to access the details page of the item you wish to trigger the auto-renewal process for.
  3. Click on Renew subscription. Select the Auto option and click on Renew subscriptionNote: The 2Checkout system will only renew subscriptions with a valid card attached. This means that the card number and expiration date (10 / 16) combination must support auto-renewal.
  4. After the 2Checkout system automatically renews the subscription, it will update the history area at the bottom of the page with the details on the renewal test order.

Subscription renewal test orders

Renewal test orders require you to place an initial new purchase test order so that the 2Checkout system generates a test subscription.

  1. Edit the product(s) for which you wish to place test orders.
  2. Make sure the renewal interval for the product under the Renewal tab, in the Subscription Settings area is set to a value other than a one-time fee (non-recurring).
  3. Place a test order for the product and enable auto-renewal in the shopping cart during the purchasing process.

Manual renewal test order

You need to place manual renewal test orders yourself. You or the 2Checkout system can place only test orders for test subscriptions generated. The DOTEST=1 URL parameter is used automatically for the ordering process.

  1. Navigate to Subscription management or to Order search and search either for a test subscription or a test order. It's mandatory to use a non-lifetime test subscription.
  2. Click on View subscription to access the details page of the item you wish to trigger the auto-renewal process for.
  3. Click on Renew subscription. Select the Manual option and click on Renew subscription. Alternatively, click on or copy & paste the Manual Payment test link into your browser's address bar
  4. You will land in the shopping cart where you can place a manual renewal test order. The system will include the DOTEST=1 URL parameter in the Buy Link.
  5. The system will update the Subscription history area with the details on the renewal test order.

Test renewal notifications

  1. Go to Subscription management or to Order search and search either for a test subscription or a test order. It's mandatory to use a non-lifetime test subscription.
  2. Click on View subscription to access the details page of the item you wish to trigger the auto-renewal process for.
  3. Click Send expiration email. Select one of the options available:
    • Auto (with or without card expiration instructions)
    • Manual
  4. 2Checkout sends emails to the email address under End-user details.
  5. If you click on the manual payment link included in the manual renewal email will you also land in the shopping cart and be able to place a manual renewal test order.

How CAPTCHA verification works

To increase the security of the 2Checkout shopping cart and protect you from hackers and fake accounts, a CAPTCHA verification is implemented in the shopping cart in order to correctly differentiate real users from fake accounts.

CAPTCHA identification is based on your login history:

  1. If you have logged in to your Control Panel account in the past 30 days, you will not be shown a CAPTCHA verification when placing test orders.
  2. If you have not logged in to your Control Panel account in the past 30 days, you will be shown a CAPTCHA verification when placing test orders.

Retrieve a product group

Response

ProductGroup

Array of objects

Request

<?php

$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 = "YOURCODE123"; //your account's merchant code available in the 'System settings' area of the cPanel: https://secure.avangate.com/cpanel/account_settings.php
$key          = "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;
}

$Code = '5C08A761E1';

try {
    $MyProductGroup = $client->getProductGroup($sessionID, $Code);
}

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

var_dump("My Product Group", $MyProductGroup);


?>

Test subscription options

Overview

The subscription details page enables you to test the renewal and notifications system for test subscriptions. The following options are available:

Send expiration email to the subscription's end-user:

  • Test recurring billing notification. You can also simulate dunning management messages. 
  • Test manual payment notification.

Renew subscription:

  • Test an automatic renewal and recurring charge.
  • Test a manual renewal.

Imported subscriptions

Import test subscription and data from your or a third-party system and test advanced renewal and upgrade scenarios in the 2Checkout platform.

Click here to learn how to import test subscriptions with or without dummy credit card information. Note that you can only attach the credit cards on this list to any imported test subscription. 

Use cases for imported test subscriptions without dummy card data:

  • Renewal using the hosted cart
  • Manual renewal using the API
  • Upgrade using the hosted cart

Use cases for imported test subscriptions with dummy card data:

  • Renewal using the hosted cart
  • Manual renewal using the API
  • Upgrade using the hosted cart
  • Simulate a recurring charge and renewal via your control panel
  • Trigger a recurring charge using the API
  • Upgrade the subscription using the API
  • Create tokens for the card-on-file and generate tokenized payments both using the hosted cart and the API

 

Upgrade a subscription

Overview

Use the setSubscriptionUpgrade method to upgrade a subscription.

Requirements

You can only upgrade subscriptions with automatic renewal enabled.

   The upgrade will not work if the subscription has a refund request that was not yet processed.

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.

productCode

Required (string)

 

Unique identifier of the target product for the subscription upgrade process. You control the product code and can set it up in the Control Panel.

options

Optional (string)

 

Pricing options of the target product for the subscription upgrade process.

 

String - ';' separated list of 'OptionValue' returned by getProductUpgradeOptions function.

If the pricing options groups is "scale" (interval), the Options parameter should be sent like this: [option group unique code] + "=" + value

e.g. Users=7

customPrice

Optional (string)

 

The price you want to charge customers for the upgrade. The currency used by default is the same as in the previous payment customers made.

Response

Parameters Type/Description

Boolean

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

Request

<?php

require ('PATH_TO_AUTH');

$subscriptionReference = 'YOUR_SUBSCRIPTION_REFERENCE';
$productCode = 'YOUR_PRODUCT_CODE';
$options = 'YOUR_PRICE_CODES'; //case sensitive; include only price options codes (exclude spaces)
$customPrice = 1;

$jsonRpcRequest = array (
'method' => 'setSubscriptionUpgrade',
'params' => array($sessionID, $subscriptionReference, $productCode, $options, $customPrice),
'id' => $i++,
'jsonrpc' => '2.0');

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

Create a cross-sell campaign

Overview

Use the createCrossSellCampaign method to create a cross-sell campaign for your 2Checkout account.

Request parameters

Parameters Type Required Description

MasterProducts 

Array of strings 

Required

Array of product codes to apply to this campaign. 

DisplayType 

String 

Required

The display type of the campaign; Can be cart, review, finish.

DisplayInEmail 

Boolean 

Required

Determines if the campaign will be displayed in payment receipt emails.

Products 

Array of objects 

Required

Array of objects containing the product codes pointing to the promoted products when tied to each master product, the discount value, and the discount type (can only be percent).

ProductCode 

String 

Required

Product code of the product to be recommended to the shopper.

Discount 

Float 

Required

Value of the discount.

DiscountType 

String 

Required

Can only be 'PERCENT'.

Name 

String 

Required

Name of the campaign.

StartDate 

String 

Optional 

The date when the cross-sell campaign starts, formatted as YYYY-MM-DD.

EndDate 

String 

Optional 

The date when the cross-sell campaign ends, formatted as YYYY-MM-DD.

Response parameters

Parameters Type Required Description

CampaignCode 

 String 

Required

The campaign code that can be used when placing orders. 

MasterProducts 

Array of strings 

Required

Array of product codes to apply to this campaign. 

DisplayType 

String 

Required

The display type of the campaign; Can be cart, review, finish.

DisplayInEmail 

Boolean 

Required

Determines if the campaign will be displayed in payment receipt emails. Can be 'true' or 'false'.

Products 

Array of objects 

Required

Array of objects containing the product codes pointing to the promoted products when tied to each master product, the discount value, and the discount type (can only be percent).

ProductCode 

String 

Required

Product code of the product to be recommended to the shopper.

Discount 

Float 

Required

Value of the discount.

DiscountType 

String 

Required

Can only be 'PERCENT'.

Name 

String 

Required

Name of the campaign.

CampaignStatus

String 

Optional 

The status of the cross-sell campaign.

StartDate 

String 

Optional 

The date when the cross-sell campaign starts, formatted as YYYY-MM-DD.

EndDate 

String 

Optional 

The date when the cross-sell campaign ends, formatted as YYYY-MM-DD.

Request sample

<?php 

require ('PATH_TO_AUTH'); 

$csCampaign = new stdClass(); 
$csCampaign->MasterProducts = ['C8851A5BC9']; 
$csCampaign->DisplayType = 'cart'; 
$csCampaign->DisplayInEmail = false; 
$csCampaign->Name = 'testing'; 
$csCampaign->StartDate = '2019-09-20'; 
$csCampaign->EndDate = '2020-10-21'; 
$csCampaign->Products = []; 
$csCampaign->Products[0] = new stdClass(); 
$csCampaign->Products[0]->ProductCode = '512712FA53'; 
$csCampaign->Products[0]->Discount = 15; 
$csCampaign->Products[0]->DiscountType = 'PERCENT'; 


$jsonRpcRequest = new stdClass(); 
$jsonRpcRequest->jsonrpc = '2.0'; 
$jsonRpcRequest->method = 'createCrossSellCampaign'; 
$jsonRpcRequest->params = array($sessionID, $csCampaign); 
$jsonRpcRequest->id = $i++; 

$csCampaignResponse = callRPC($jsonRpcRequest, $host, true); 

 

Retrieve upgrade price

Overview

Use the getProductUpgradeOptionsPrice method to retrieve information about the costs a customer incurs when upgrading a specific subscription. Retrieve information about the costs a customer incurs when upgrading a specific subscription.

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.

productCode

Required (string)

 

Unique identifier of the target product for the subscription upgrade process. You control the product code and can set it up in the Control Panel.

currency

Required (string)

 

ISO 4217 code.

options

Required (string)

 

Pricing options of the target product for the subscription upgrade process.

 

String - ';' separated list of 'OptionValue' returned by getProductUpgradeOptions function.

If the pricing options groups is "scale" (interval), the Options parameter should be sent like this: [option group unique code] + "=" + value

e.g. Users=7

Response

Parameters Type/Description

UpgradePrice

Object

    Details below.
  BillingPrice Int
    Net billing price available for  the upgrade process.
  BillingGrossPrice Int
    Gross billing price available for  the upgrade process.
  BillingCurrency String
    Billing currency available for the upgrade process.
  Quantity String
    Quantity available for the upgrade process.
  DisplayPrice Int
    Net display price available for the upgrade process.
  DisplayGrossPrice Int
    Gross display price available for the upgrade process.
  DisplayCurrency String
    Display currency available for the upgrade process.
  Discount Float
    Applied discounts
  DiscountedProratedPrice Float
    Prorated net price for the upgrade with applied discounts
  DiscountedProratedGrossPrice Float
    Prorated gross price for the upgrade with applied discounts
  DiscountedBillingPrice Float
    Net billing price available for  the upgrade process with applied discounts
  DiscountedBillingGrossPrice Float
    Gross billing price available for  the upgrade process with applied discounts
  DisplayDiscount Float
    Discount displayed for the upgrade process
  DiscountedDisplayPrice     Float
    Net display price available for the upgrade process with applied discounts
  DiscountedDisplayGrossPrice     Float
    Gross display price available for the upgrade process with applied discounts

The response returns details about the upgrade price for a single product. For multiple products, the user needs to calculate the value using the quantity x upgradePrice (the value from the returned response) parameters.

Request

<?php

require ('PATH_TO_AUTH');

$subscriptionReference = 'YOUR_SUBSCRIPTION_REFERENCE';
$productCode = 'my_subscription_123';
$currency = 'usd';
$options = 'emailsupport;oneuser1';

try {
    $upgradeOptions = $client->getProductUpgradeOptionsPrice($sessionID, $subscriptionReference, $productCode, $currency, $options);
}
catch (SoapFault $e) {
    echo "upgradeOptions: " . $e->getMessage();
    exit;
}
var_dump("upgradeOptions", $upgradeOptions);

 

Search historical payouts

Overview

Use the searchPayouts method to extract information on the historical payouts issued by 2Checkout for your account.

You can retrieve information on the payment for a specific invoice, or search based on numerous filters such as payment status, transfer date, or payout method.

Search filters

Parameters Type/Description
Reference

Optional/String

InvoicePrefix (PREFIX) + InvoiceNo (00000) will search for transfers containing an invoice with prefix + number.

The invoice reference is generated by 2Checkout and can be found in the Accounting area from your Control Panel.

Status

Optional/Array of strings

Possible payout statuses:

  • PAID  - 2Checkout transfers successfully paid.
  • PARTIALLY_PAID  - 2Checkout transfers that partially covered invoice amounts.
  • CANCELED  - 2Checkout canceled transfers.
Currency

Optional/String

3 letter ISO currency code.

StartDate

Optional/String

Start payment date. Format: Yyyy-mm-dd.

EndDate

Optional/String

End payment date. Format: Yyyy-mm-dd.

PaymentType

Optional/String

Possible payout methods:

  • WIRE
  • PAYPAL
  • CHECK
  • PAYONEER
  • WEBMONEY
OrderBy

Optional/Array of objects

Details below

                            Field

String

Variable used for ordering the returned data. Possible values:

  • TransferCompletionDate - payment remittance date.
                            Direction

String

Order direction. Possible values:

  • ASC - for ascending order.
  • DESC - for descending order.
Pagination

Optional/Object

Use this object for paginating the results.

Default behavior is to display 10 results per page.

                            Page

Integer

Number of pages used for displaying results.

                            Limit

Integer

Limit the number of results.

Request

<?php

require('PATH_TO_AUTH');

$SearchOptions = new stdClass();
//$SearchOptions->Reference = 'FBV8572'; // search for a specific invoice
$SearchOptions->Status = ['PAID', 'CANCELED'];
$SearchOptions->Currency = 'USD';
$SearchOptions->StartDate = '2018-05-01';
$SearchOptions->EndDate = '2018-06-01';
$SearchOptions->PaymentType = 'WIRE';
$SearchOptions->OrderBy = [];
$orderBy = new stdClass();
$orderBy->Field = 'TransferCompletionDate';
$orderBy->Direction = 'DESC';
$SearchOptions->OrderBy[] = $orderBy;
$SearchOptions->Pagination = new stdClass();
//$SearchOptions->Pagination->Page = 1;
//$SearchOptions->Pagination->Limit = 200;

try {
    $subscriptionInfo = $client->searchPayouts($sessionID, $SearchOptions);
}
catch (SoapFault $e) {
    echo "AccountPayouts: " . $e->getMessage();
    exit;
}
var_dump("Payouts", $subscriptionInfo);

Response

Historical payout object

Parameters Type/Description
Items  

Array  of objects

Details below

        PaymentInstance  

Object

Details below

  TransferCompletionDate String
    Payment date. Format: Yyyy-mm-dd.
  PaymentType String
   

Payout method used for the transfer. Possible values:

  • WIRE
  • PAYPAL
  • CHECK
  • PAYONEER
  • WEBMONEY
  Amount Float
    Amount transferred. Can be negative, for invoices deducted from your payment.
  Currency String
    Currency in which the amount was transferred. Three letters ISO currency code.
  Status String
   

Payment status. Possible values:

  • PAID  - 2Checkout transfers successfully paid.
  • NOT_PAID  - 2Checkout unpaid balance amounts.
  • PARTIALLY_PAID  - 2Checkout transfers that partially covered invoice amounts.
  • CANCELED  - 2Checkout canceled transfers.
  Invoices

Array of objects

An object is created for each invoice part of the payment.

                     Reference String
    System generated invoice reference. Formed by InvoicePrefix (PREFIX) + InvoiceNo (00000).
                     Amount Float
    Invoice amount.
                    Description String
    Comments submitted on the invoice.
                     Type String
   

Invoice type. Possible values:

  • Period net sales
  • Retain chargebacks
  • Release chargeback
  • Services
                      Code String
   

Code used for identifying the invoice type. Possible values:

  • PERIOD_NET_SALES
  • DISPUTES_BALANCE_HOLD
  • DISPUTES_BALANCE_RELEASE
  • AFFILIATE_BONUSES
  • AFFILIATE_BONUS_COMMISSION
  • CANCELED_PO
  • ROLLING_RESERVE_HOLD
  • ROLLING_RESERVE_RELEASE
  • CLOSED_CHARGEBACK_FEES
  • OPEN_CHARGEBACK_FEES
  • CUSTOM_FEE
  • CHARGEBACK_FUND
  • CHANNEL_MANAGER_SALES
  • MONTHLY_FEE
  • COMMITMENT_FEE
  • OVERDUE_PO_PAYMENTS
  • PENDING_PO_PAYMENTS
  • RRT_FEES
  • TRANSFER_FEE
  • UNILOC_DISCOUNT
                      Date String
    Date the invoice was generated.
                      PaidAmount Float
    Invoice amount paid on this transfer.
                      PaidDate String
    Transfer date.
                     PaidCurrency String
    Currency of the transfer.
  Summary

Object

A summary of all the invoices included in this transfer.

                      ServicesAmount Float
    Amount paid or retained for 2Checkout service invoices.
                     PurchaseOrdersAmount Float
    Amount paid for purchase orders.
                     ChargeBacksAmount Float
    Amount paid for chargebacks retained and released.
                      RollingReserveAmount Float
    Amount paid for rolling reserves.
                       PeriodNetSales Float
    Amount paid for period net sales.
                       VendorToVendor Float
    Amount paid for vendor 2 vendor invoices.
                       ChargeBackFund Float
    Amount paid for the chargeback fund.
  Pagination

Object

Details below

                       Page Integer
    Number of pages used for displaying the results.
                       Limit Integer
    Limitation of the result numbers.
                       Count Integer
    Total number of results.

 

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