Skip to main content

Retrieve active promotions in cart

Overview

Use this method to list all promotions applied to products added to cart.

Requirements

Parameters

Parameter Type/Description
sessionID Required (String)
  Session identifier, output of the Login method. An exception is thrown if the values are incorrect.

Response

Parameter Type/Description

Promotion

Array of objects

 

Details below

 

Name

String

 

 

Promotion name

 

Description

String

 

 

Promotion description

 

StartDate

String

 

 

Promotion start date. NULL for promotions that start immediately after they're created.

 

EndDate

String

 

 

Ending date. The date when you set the promotion to end. Is NULL for promotions that you want active indefinitely.

 

MaximumOrdersNumber

Int

 

 

When the maximum number of orders is reached the promotion stops. NULL if you want the promotion to apply to an unlimited number of orders.

 

MaximumQuantity

Int

 

 

Discount only applies to a specific number of products, smaller than the maximum defined quantity. NULL if you want the promotion to apply to an unlimited number units. Any extra quantity added to the cart will be sold at full price.

 

InstantDiscount

Boolean

 

 

Selecting the instant discount option auto-applies the discount for ALL the selected products for all shoppers, without the need to enter the discount coupon.

 

Coupon

String

 

 

Promotion coupon/voucher.

 

DiscountLabel

String

 

 

Set discounts as percentage from the product price or as a fixed amount in the chosen currency.

Request

<?php

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

try {
    $Promotions= $client->getPromotions ($sessionID);
} catch (SoapFault $e) {
    Echo "AllDiscounts: " . $e->getMessage();
    exit;
}
var_dump ("AllDiscounts", $Promotions);

Errors

Error Description

EMPTY_CART

The shopping cart is empty

NO_PROMOTIONS

There are no promotions applied to current shopping cart

 

Add additional fields

Overview

Use the addAdditionalField method to create new additional fields for your account.

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.

AdditionalField

Object

 

Additional field object.

Response

bool(true)

Request

<?php

require ('PATH_TO_AUTH');

$AdditionalField                             = new stdClass();
$AdditionalField->Label                      = 'Do you agree with the new newsletter policy 2015?';
$AdditionalField->Type                       = 'LISTBOX';
$AdditionalField->Code                       = 'NewsletterPolicy1234576';
$AdditionalField->ApplyTo                    = 'ORDER';
$AdditionalField->Values                     = array();
$AdditionalField->Values[0]                  = 'YES';
$AdditionalField->Values[1]                  = 'NO';
$AdditionalField->ValidationRule             = null;
$AdditionalField->Translations               = array();
$AdditionalField->Translations[0]            = new stdClass();
$AdditionalField->Translations[0]->Label     = "Êtes-vous d'accord avec la politique de la newsletter?";
$AdditionalField->Translations[0]->Values    = array();
$AdditionalField->Translations[0]->Values[0] = 'Oui';
$AdditionalField->Translations[0]->Values[1] = 'Non';
$AdditionalField->Translations[0]->Language  = 'fr';
$AdditionalField->Translations[1]            = new stdClass();
$AdditionalField->Translations[1]->Label     = 'Haben Sie mit dem Newsletter Politik zu?';
$AdditionalField->Translations[1]->Values    = array();
$AdditionalField->Translations[1]->Values[0] = 'Ja';
$AdditionalField->Translations[1]->Values[1] = 'Nein';
$AdditionalField->Translations[1]->Language  = 'de';

$jsonRpcRequest = array(
    'jsonrpc' => '2.0',
    'id' => $i++,
    'method' => 'addAdditionalField',
    'params' => array(
        $sessionID,
        $AdditionalField
    )
);
var_dump(callRPC((Object) $jsonRpcRequest, $host));

?>

 

Use Credit cards

Overview

Use the placeOrder method to create an order using products defined in your Control Panel and collect the payment using credit card based payment methods.

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.
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
Order information Object
  Object containing order information.

Request

<?php

require ('PATH_TO_AUTH');

$Order = new stdClass();
$Order->Currency = 'usd';
$Order->Country = 'US';
$Order->Language = 'en';
$Order->CustomerIP = '91.220.121.21';
$Order->ExternalReference = NULL;
$Order->Source = NULL;
$Order->Affiliate = new stdClass();
$Order->Affiliate->AffiliateCode = 'Partner123'
$Order->Affiliate->AffiliateSource = 'MobilePlatform'
$Order->CustomerReference = NULL;

$Order->Items = array();
$Order->Items[0] = new stdClass();
$Order->Items[0]->Code = 'my_subscription_1';
$Order->Items[0]->Quantity = 1;
$Order->Items[0]->PriceOptions = NULL;
$Order->Items[0]->SKU = NULL;
$Order->Items[0]->Price = NULL;
$Order->Items[0]->CrossSell = NULL;
$Order->Items[0]->Trial = false;
$Order->Items[0]->AdditionalFields = NULL;
$Order->Items[0]->SubscriptionStartDate = NULL; //If empty or null, subscriptions become active when purchase is made.

$Order->BillingDetails = new stdClass();
$Order->BillingDetails->FirstName = 'First';
$Order->BillingDetails->LastName = 'Last';
$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 = 'email@address.com';
$Order->BillingDetails->Phone = NULL;
$Order->BillingDetails->Company = NULL;
$Order->DeliveryDetails = NULL;

$Order->PaymentDetails = new stdClass ();
$Order->PaymentDetails->Type = 'CC';
$Order->PaymentDetails->Currency = 'usd';
$Order->PaymentDetails->PaymentMethod = new stdClass ();
$Order->PaymentDetails->CustomerIP = '10.10.10.10';
$Order->PaymentDetails->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->CCID = '123';
$Order->PaymentDetails->PaymentMethod->HolderName = 'John';
$Order->PaymentDetails->PaymentMethod->CardNumberTime = 83.21; // can be null - high value in seconds is a red flag for fraud attempts.
$Order->PaymentDetails->PaymentMethod->HolderNameTime = 13.35; // can be null - high value in seconds is a red flag for fraud attempts.
$Order->PaymentDetails->PaymentMethod->Vendor3DSReturnURL = "http://www.success.ro";
$Order->PaymentDetails->PaymentMethod->Vendor3DSCancelURL = "http://www.error.ro"; 


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

var_dump("newOrder", $Order);

Enable recurring billing

Overview

Use the enableRecurringBilling method to switch on the automatic renewal system for a subscription that's manually renewable. 

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.

Response

Parameters Type/Description

Boolean

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

Request

<?php

require ('PATH_TO_AUTH');

$subscriptionReference = 'YOUR_SUBSCRIPTION_REFERENCE';

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

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

Set up redirect URLs for ConvertPlus ordering flow

Overview

Redirect your customers together with the sale parameters to a page or script after a successful sale on the ConvertPlus cart. You can specify the redirect URL at the account, product, and buy-link level.

Specifying an approved URL at the account level will direct all buyers to the same URL after a successful ConvertPlus checkout.

 

Recommended resources

Requirements

Available only for merchants that have ConvertPlus cart enabled on their account. Contact us for ConvertPlus activation.

Applicable only to online payment methods (ex: Credit cards and PayPal).

To learn how to set a redirect URL on 2Checkout default ordering flows, read this article.

Return methods

2Checkout provides three methods in which the buyer and sale parameters can be returned to your approved URL.

You may send the buyer to our order processed page which displays a Click Here to Finalize your Order button to redirect the buyer, you may bypass the order processed page using a header redirect or you can immediately display your approved URL to the buyer while they remain on our server. You can set your return method and Approved URL at different levels of granularity:

  • Set the return method and Approved URL at order level (apply to individual sales) from the Generate Links area, after enabling the Enable return after sale checkbox.
  • Set the return method and Approved URL at product level (apply to all successful sales of this product) from the Fulfillment area of the product page, after enabling the Enable return after sale checkbox.
  • Set the return method and Approved URL at account level (apply to all successful orders, irrespective of the product ordered) from your 2Checkout Merchant Control Panel by navigating to Dashboard → Integrations → Webhooks & API → Redirect URL, and select the Enable return after sale checkbox.

Links IN thank you page

The shopper is sent to the Thank You Page, which will display a link that will act as a redirect to the Approved URL.

With the return method set to Link in Thank You Page, the shopper will be taken to the Thank You Page after completing a successful purchase. This page will feature a redirect link. When clicked, the shopper (and collected sale parameters if the case) is directed to the provided Approved URL via GET.

HEADER REDIRECT

Set the return method to Header Redirect to have the Approved URL immediately displayed to the shoppers, while they still remain on our server.

The shopper will be immediately redirected to your Approved URL. Using this method, the sale parameters will be returned along with the shopper (in case of product/order URL).

DIRECT RETURN

Note to user NOTE:  Direct return is available only to clients upgraded from previous 2Checkout Admin Area.

With the return method set to Direct Return, sale parameters will be posted automatically to the approved URL while fetched by our server and displayed to the buyer. When using this return method, the Approved URL will be masked to the customer, while the experience provided would be that of a 2Checkout domain.

This method can be used with redirects as long as each page outputs more than 255 characters of content to the browser. If Direct Return encounters a page that redirects without outputting content the process will fail and the customer will be sent to our standard Order Processed page. This generally occurs with a header redirect from your Approved URL when that URL outputs less than 255 characters of content to the browser.

Approved URL priority

Depending on the cPanel URL settings and the return methods you have in place, the priority of the approved URL will be the following:

  • Priority I: Order level – with corresponding Approved URL set at order level. 
  • Priority II: Product level – with corresponding return method, has priority if there is no order level return URL and there is only one product with product level Approved URL set.
  • Priority III: Account level – with corresponding return method set at vendor account level is applied in any of the following situations:
    • There are more than one products in the cart that have approved URLs set, and there is no order level approved URL.
    • None of the products have approved URL set and there is no order level URL set.

 

Order session content

Overview

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

Retrieve session content                              Retrieve contents with prefill                                         Retrieve VAT or sales tax

Session contents object

Parameters                                                                                                       Type/Description

Errors

 

Array of strings

 

 

Payment gateway processing errors.

Items

Array of objects

    Details below. 

 

ProductDetails

Object

      Details below. 

 

 

Name

String

 

 

 

Product name.

    ShortDescription String
      Product short description.
    Tangible Boolean
     

Possible values:

  • TRUE - for physical products
  • FALSE - for digital products
    IsDynamic Boolean
     

Possible values:

  • TRUE - for dynamic products
  • FALSE - for catalog products

 

 

ExtraInfo

String

 

 

 

The text entered in the Additional information field when generating Buy links, or via the INFO[PRODUCT_ID] parameter used in Buy links.

 

 

RenewalStatus

Boolean

 

 

 

  • TRUE for orders renewing subscriptions.
  • FALSE for all other orders: new purchases, upgrades.

 

 

Subscriptions

Object

        Details below. 

 

 

 

SubscriptionReference

String

 

 

 

 

Unique, system-generated subscription identifier.

 

 

 

PurchaseDate

String

 

 

 

 

The date time stamp when shoppers acquired their subscriptions corresponding to the moment when the 2Checkout system marks the purchase as finished. Format (YYYY-MM-DD HH:mm:ss). Default GMT+02:00.

 

e.g. 2015-08-11 15:18:52

 

 

 

SubscriptionStartDate

String

 

 

 

 

 

Example: 2015-09-29 17:57:59

 

 

 

ExpirationDate

String

 

 

 

 

The date time stamp of upcoming renewal/expiration for subscriptions not taking into account grace period settings.

 

Format (YYYY-MM-DD HH:mm:ss). Default GMT+02:00.

 

e.g. 2015-09-11 15:18:52

 

 

 

Lifetime

Boolean

 

 

 

 

  • TRUE – For non-recurring, evergreen subscriptions.
  • FALSE– For recurring subscriptions with a specific billing cycle from 7 days to 36 months.

 

 

 

Trial

Boolean

 

 

 

 

  • TRUE – For trial subscriptions.
  • FALSE– For non-trial, recurring subscriptions with a specific billing cycle from 7 days to 36 months.

 

 

 

Enabled

Boolean

 

 

 

 

  • TRUE – For active and past due subscriptions.
  • FALSE– For expired and cancelled subscriptions.

 

 

 

RecurringEnabled

Boolean

 

 

 

 

  • TRUE - customers opted for subscriptions to renew automatically when they expire.
  • FALSE- customers did not choose to renew the subscription automatically.

                    

PriceOptions

Array of strings

 

 

Product price options.

 

Price

Object

 

 

This object returns the price per unit at order line level.

 

In the case of trials, the object returns the costs for the trial to full subscription conversion.

 

 

UnitNetPrice

Float

 

 

 

The value per product unit, excluding sales tax/VAT expressed in the payment currency.

 

 

UnitGrossPrice

Float

 

 

 

Total value per product unit, including sales tax/VAT expressed in the payment currency. UnitGrossPrice does not reflect any discounts.

 

 

UnitVAT

Int
 

 

 

Sales tax/VAT per product unit expressed in the payment currency.

 

 

UnitDiscount

Int

 

 

 

Value of the discount per product unit expressed in the payment currency.

 

 

UnitNetDiscountedPrice

Float

 

 

 

The value per product unit, expressed in the payment currency, excluding sales tax/VAT, from which 2Checkout deducts the unit discount.

 

 

UnitGrossDiscountedPrice

Float

 

 

 

Total costs shoppers incur per product unit, expressed in the payment currency. This value includes sales tax/VAT, 2Checkout and affiliate commissions, but 2Checkout deducts the value of any discounts.

 

 

UnitAffiliateCommission

Int

 

 

 

Value of the affiliate commission per product unit calculated expressed in the payment currency.

 

2Checkout deducts discounts from the costs incurred by shoppers before calculating affiliate commissions.

 

2Checkout does not take into account shipping costs when calculating affiliate commissions.

 

NULL when 2Checkout does not apply an affiliate commission.

    VATPercent Int
      Percentage of VAT charged on the order.
    HandlingFeeNetPrice Int
      Handling fee applied to your net price configuration. 
    HandlingFeeGrossPrice Int
      Handling fee applied to your gross price configuration.

 

 

Currency

Optional (string)

 

 

 

The currency ISO code for the payment - ISO 4217. Example: usd.

 

 

NetPrice

Optional (double)

 

 

 

The value per order line, excluding sales tax/VAT expressed in the payment currency.

 

 

GrossPrice

Optional (double)

 

 

 

Total value per order line, including sales tax/VAT expressed in the payment currency. UnitGrossPrice does not reflect any discounts.

 

 

NetDiscountedPrice

Optional (double)

 

 

 

The NetPrice value per order line, excluding sales tax/VAT, from which 2Checkout deducts discounts. NetDiscountedPrice is expressed in the payment currency.

 

 

GrossDiscountedPrice

Optional (double)

 

 

 

Total costs shoppers incur per order line, expressed in the payment currency. This value includes sales tax/VAT, 2Checkout and affiliate commissions, but 2Checkout deducts the value of any discounts.

 

Example:

  • UnitNetPrice: 99
  • UnitGrossPrice: 120.39
  • UnitVAT: 21.39
  • UnitDiscount: 9.9
  • UnitNetDiscountedPrice: 89.1
  • UnitGrossDiscountedPrice: 110.49
  • UnitAffiliateCommission: 22.28
  • Currency: "usd"
  • NetPrice: 198
  • GrossPrice: 240.77
  • NetDiscountedPrice: 178.2
  • GrossDiscountedPrice: 220.97
  • Discount: 19.8
  • VAT: 42.77
  • AffiliateCommission: 44.56

 

 

Discount

Optional (double)

 

 

 

Value of the discounts per order line expressed in the payment currency.

 

 

VAT

Optional (double)

 

 

 

Value of sales tax/VAT per order line expressed in the payment currency.

 

 

AffiliateCommission

Optional (double)

 

 

 

Value of the affiliate commission per order line, calculated from the NetDiscountedPrice expressed in the payment currency. Or NULL. 2Checkout does not take into account shipping costs when calculating affiliate commissions.

  LineItemReference String
    System-generated item reference.
  PurchaseType String
   

Possible values:

  • PRODUCT
  • SHIPPING
  • TAX
  • COUPON
  ExternalReference String
    External order reference that you control.

 

Code

String

 

 

Unique product identifier your control. Max length 256 characters.

 

Quantity

Int

 

 

Number of units

 

SKU

String

 

 

SKU identifier.

 

CrossSell

Object

      Details below. 

 

 

ParentCode

String

 

 

 

The product code of the master product you set to trigger the campaign.

 

 

CampaignCode

String

 

 

 

Unique, system-generated identifier for cross-sell campaigns.

 

Trial

Object

      Details below. 

 

 

Period

Int

 

 

 

The length of the trial subscription lifetime in days.

 

 

GrossPrice

Float

 

 

 

Total trial price in the payment currency before 2Checkout deducts any taxes, discounts, etc.

 

 

VAT

Float

 

 

 

The total value of taxes for the trial in the payment currency, before 2Checkout deducts any discounts.

 

 

NetPrice

Float

 

 

 

Total trial price in the payment currency, not including taxes, before 2Checkout deducts any discounts.

 

AdditionalFields

Array of objects

      Details below. 

 

 

Code

String

 

 

 

The alpha-numeric characters, underscores and dashes that are set as the field identifier.

 

 

Text

String

 

 

 

Field text visible to shoppers in the cart.

 

 

Value

String

 

 

 

Selected field value.

 

Promotion

Object

      Details below. 

 

 

Name

String

 

 

 

Promotion name.

 

 

Description

String

 

 

 

Promotion description.

 

 

StartDate

String

 

 

 

The date when you set the promotion to start. NULL for promotions that start immediately after you create them.

 

 

EndDate

String

 

 

 

The date when you set the promotion to end. NULL for promotions you want active indefinitely.

 

 

MaximumOrdersNumber

Int

 

 

 

2Checkout only applies the promotion to a maximum number of orders you define.

 

Can be NULL if you want the promotion to apply to an unlimited number of orders.

 

 

MaximumQuantity

Int

 

 

 

Discount only applies to a maximum number of units purchased through a single order, smaller than the quantity you defined. Shoppers purchase any extra units at full price. Can be NULL if you want the promotion to apply to an unlimited number units.

 

 

InstantDiscount

Boolean

 

 

 

The instant discount option auto-applies the discount for ALL selected products, without the need for shoppers to enter a discount coupon.

 

 

Coupon

String

 

 

 

Promotion coupon/voucher.

 

 

DiscountLabel

String

 

 

 

Discounts can be set as a percentage from the product price or as a fixed amount in the chosen currency.

 

 

Enabled

String

 

 

 

true or false, depending on whether a promotion is active or disabled. 

 

 

Type

String

 

 

 

  • REGULAR – product/cart line level discounts.
  • ORDER – quantity discounts.
  • GLOBAL – order-level discounts.

Promotions

Array of objects

    Details below. 

 

Name

String

 

 

Promotion name.

 

Description

String

 

 

Promotion description.

 

StartDate

String

 

 

The date when you set the promotion to start. NULL for promotions that start immediately after you create them.

 

EndDate

String

 

 

The date when you set the promotion to end. NULL for promotions you want active indefinitely.

 

MaximumOrdersNumber

Int

 

 

2Checkout only applies the promotion to a maximum number of orders you define.

 

Can be NULL if you want the promotion to apply to an unlimited number of orders.

 

MaximumQuantity

Int

 

 

Discount only applies to a specific number of units purchased at once, smaller than the maximum quantity you defined. Shoppers purchase any extra units at full price. Can be NULL if you want the promotion to apply to an unlimited number units.

 

InstantDiscount

Boolean

 

 

The instant discount option auto-applies the discount for ALL selected products, without the need for shoppers to enter a discount coupon.

 

Coupon

String

 

 

Promotion coupon/voucher.

 

DiscountLabel

String

 

 

Discounts can be set as a percentage from the product price or as a fixed amount in the payment currency.

 

Enabled

String

 

 

true or false, depending on whether a promotion is active or disabled. 

 

Type

String

 

 

  • REGULAR – product/cart line level discounts.
  • ORDER – quantity discounts.
  • GLOBAL – order-level discounts.

AdditionalFields

Array of objects

    Details below. 

 

Code

String

 

 

The alpha-numeric characters, underscores and dashes that are set as the field identifier.

 

Text

String

 

 

Field text visible to shoppers in the cart.

 

Value

String

 

 

Selected field value.

BillingDetails

Object

Details below

  Person      

Object

Details below

    FirstName   String
  Customer first billing name.
    LastName   String
  Customer last billing name.
    CountryCode   String
  Two-letters code for customer billing country.
    State   String
  Customer billing state.
    City   String
  Customer billing city.
    Address1   String
  Customer billing address.
    Address2   String
  Customer additional address information.
    Zip   String
        Customer billing zip code.
    Email   String
        Customer billing email.
    Phone   String
        Customer billing phone.
    Company   String
        Customer billing company.
    FiscalCode   String
  Customer billing fiscal code.
DeliveryDetails

Object

Details below

  Person      

Object

Details below

    Phone   String
  Customer delivery phone number.
    FirstName   String
  Customer delivery first name.
    LastName   String
  Customer delivery last name.
    Company   String
  Customer delivery company.
    Email   String
  Customer delivery email.
    Address1   String
  Customer delivery address.
    Address2   String
  Customer additional delivery address.
    City   String
  Customer delivery city.
    Zip   String
  Customer delivery zip code.
    CountryCode   String
  Customer delivery country code.
    State   String
  Customer delivery state.
DeliveryInformation

Object

Details below

  ShippingMethod    

Object

Details below

    Code     String
          System-generated code assigned to the shipping method.
    TrackingURL   String
          Tracking URL assigned to the shipping method. 
    TrackingNumber   String
        Tracking Number provided to customers, used for obtaining more information about their package.
    Comment   String
  Additional information regarding the physical delivery of the product.

Currency

String

 

The currency ISO code for the payment - ISO 4217. Example: usd.

NetPrice

Float

 

Order value excluding sales tax/VAT expressed in the payment currency.

GrossPrice

Float

 

Total order value, including sales tax/VAT expressed in the payment currency. GrossPrice does not reflect any discounts.

NetDiscountedPrice

Float

 

The NetPrice order value excluding sales tax/VAT, from which 2Checkout deducts discounts. NetDiscountedPrice is expressed in the payment currency.

GrossDiscountedPrice

Float

 

Total costs shoppers incur, expressed in the payment currency. This value includes sales tax/VAT, 2Checkout and affiliate commissions, but 2Checkout deducts the value of any discounts.

 

For example:

  • Currency: "usd"
  • NetPrice: 396
  • GrossPrice: 486.29
  • NetDiscountedPrice: 376.2
  • GrossDiscountedPrice: 466.49
  • Discount: 19.8
  • VAT: 90.29
  • AffiliateCommission: 94.05

Discount

Float

 

Value of the discounts for an order expressed in the payment currency.

VAT

Float

 

Value of sales tax/VAT expressed in the payment currency.

AffiliateCommission

Float

 

Value of the affiliate commission for the order calculated from the NetDiscountedPrice expressed in the payment currency. Or NULL. 2Checkout does not take into account shipping costs when calculating affiliate commissions.

 

Retrieve subscription deal information

Overview

Use the GetDealInfo method to retrieve information about the existing deal on a given subscription as well as what the subscription will look like with the new proposed deal being applied to it.

Request parameters

Parameter name

Type

Required/Optional

Description

Currency

String

Required

The desired output currency.

Language

String Required

The desired output language.

Items

Array

Required

Each item corresponds to a subscription.

Items.DealDate

Datetime

Required

The date when the deal is set to come into effect. Format: YYYY-MM-DD HH:MM:SS.

Items.SubscriptionReference

String

Required

The subscription code.

Items.ProductCode

String

Required

The product code.

Items.Quantity

String

Required

The product quantity.

Items.DealPriceScenario

String

Required

The upgrade scenario to be applied. Must be one of: using_last_order_price, using_last_product_price, price_total, product_price_difference.

Items.DealSubscriptionScenario

String

Required

The scenarion for price calculation. Must be on of: start_new_deal_contract_now, start_new_deal_contract_after_current_cycle.

Items.PriceOptions

Array

Optional

The array of price options.

Items.PriceOptions.Code

String

Required

The price option group code if the group is of interval type or the price option code otherwise.

Items.PriceOptions.Options

Array

Optional

The array of options that belong to this option group.

Items.PriceOptions.Options.Value

String

Required

If the group is of type “scale”, this is a value from the allowed interval, otherwise, this is the option code as defined in Merchant Control Panel under “Unique Code”.

Items.Price

Object

Required

The product price.

Items.Price.Amount

Float

Required

The actual numeric amount.

Items.Price.Type

String

Required

Describes if the price type is catalog or custom. Can be only CUSTOM.

Items.Price.AmountType

String

Required

Describes if the price is NET or GROSS. Can be one of NET, GROSS.

Items.SubscriptionCustomSettings.CycleLength

Int

Required

The length of a single billing cycle.

Items.SubscriptionCustomSettings.CycleUnit

String

Required

The unit of a single billing cycle. Can be one of MONTH, DAY. 

To perform a getDeal call towards a One Time Fee subscription, this value must be -1.

Items.SubscriptionCustomSettings.CycleAmount

Float

Required

The price of a single billing cycle.

Items.SubscriptionCustomSettings.CycleAmountType

String

Required

Describes the price type. Can be one of NET, GROSS.

Items.SubscriptionCustomSettings.ContractLength

Int

Required

The number of billing cycles contained in a single contract. To perform a getDeal call towards a One Time Fee or a Lifetime subscription, this value must be NULL.

BillingDetails

Object

Required

The billing details.

BillingDetails.FirstName

String

Required

The first name.

BillingDetails.LastName

String

Required

The last name.

BillingDetails.CountryCode

String

Required

The country code. Must be one of the seller's associated country codes.

BillingDetails.State

String

Optional

Required only if the business model requires it.

BillingDetails.City

String

Required

The city name.

BillingDetails.Address1

String

Required

The address.

BillingDetails.Zip

String

Required

The zip code.

BillingDetails.Email

String

Required

The email address.

BillingDetails.Phone

String

Required

The phone number.

BillingDetails.Company

String

Required

The company's legal name.

BillingDetails.FiscalCode

String

Required

The fiscal code.

DeliveryDetails

Object

Required

The delivery details.

DeliveryDetails.FirstName

String

Required

The first name.

DeliveryDetails.LastName

String

Required

The last name.

DeliveryDetails.CountryCode

String

Required

The country code. Must be one of the seller's associated country codes.

DeliveryDetails.State

String

Optional

Required only if the business model requires it.

DeliveryDetails.City

String

Required

The city name.

DeliveryDetails.Address1

String

Required

The address.

DeliveryDetails.Zip

String

Required

The zip code.

DeliveryDetails.Email

String

Required

The email address.

DeliveryDetails.Phone

String

Required

The phone number.

DeliveryDetails.Company

String

Required

The company's legal name.

Request sample

<?php
declare(strict_types=1);

class Configuration
{
    public const MERCHANT_CODE = '';
    public const MERCHANT_KEY = '';
    public const URL = 'http://api.2checkout.com/soap/6.0';
    public const ACTION = 'getDealInfo';
    //array or JSON
    public const PAYLOAD = <<<JSON
 {
  "Currency": "us",
  "Country": "us",
  "Language": "ro",
  "CustomerIp": "91.220.121.21",
  "Source": "salesforce_cpq",
  "Items": [
    {
      "DealDate": "2021-09-20 23:59:59",
      "SubscriptionReference": "MY2DD1E8P0",
      "ProductCode": "CD297BBCE9",
      "Quantity": 10,
      "DealPriceScenario": "using_last_order_price",
      "DealSubscriptionScenario": "prolong",
      "Price": {
        "Amount": 10,
        "Type": "CUSTOM",
        "AmountType": "NET"
      },
      "SubscriptionCustomSettings": {
        "CycleLength": 1,
        "CycleUnit": "MONTHS",
        "CycleAmount": 10,
        "CycleAmountType": "NET",
        "ContractLength": 12
      }
    }
  ],
  "BillingDetails": {
    "FirstName": "Oscar",
    "LastName": "McMillan",
    "CountryCode": "ro",
    "State": "Ilsios",
    "City": "RE",
    "Address1": "4519 Kovar Road",
    "Zip": "645",
    "Email": "o.mcmillan@integrawealth.net",
    "Phone": "6172938133",
    "Company": "Integra Wealth",
    "FiscalCode": "2816464"
  },
  "DeliveryDetails": {
    "FirstName": "Maria",
    "LastName": "Frederick",
    "CountryCode": "ro",
    "State": "New York",
    "City": "Buffalo",
    "Address1": "2033 Nuzum Court",
    "Zip": "14216",
    "Email": "m.frederick@integrawealth.net",
    "Phone": "7165708136",
    "Company": "Integra Wealth"
  }
}
JSON;
}

class Client
{
    public function call(
        string $url = Configuration::URL,
        $payload = Configuration::PAYLOAD,
        string $action = Configuration::ACTION
    ): ?object {
        if (is_array($payload)) {
            $payload = json_encode($payload);
        }
        if (!empty($payload)) {
            // SoapClient works with objects(StdClass)
            $payload = json_decode($payload);
        }
        $soapClient = $this->getClient($url);
        $sessionId = $this->getSession($soapClient);
        $args = array_filter([$sessionId, $payload]);
        return $soapClient->$action(...$args);
    }

    public function getClient(string $url): SoapClient
    {
        return new SoapClient(
            $url . '?wsdl',
            [
                'location'   => $url,
                'cache_wsdl' => WSDL_CACHE_NONE,
            ]
        );
    }

    public function getSession(SoapClient $client)
    {
        $date = gmdate('Y-m-d H:i:s');
        $merchantCode = Configuration::MERCHANT_CODE;
        $key = Configuration::MERCHANT_KEY;
        $string = strlen($merchantCode) . $merchantCode . strlen($date) . $date;
        $hash = hash_hmac('md5', $string, $key);
        $client->__setCookie('XDEBUG_SESSION', 'PHPSTORM');
        return $client->login($merchantCode, $date, $hash);
    }
}

try {
    $client = new Client();
    var_dump($client->call());
} catch (Exception $ex) {
    var_dump($ex);
}

Response 

Parameter name

Type

Description

Currency

String

The currency code of all the returned price values.

DealDueNowPriceNet

Float

The NET amount that needs to be paid.

DealDueNowPriceGross

Float

The GROSS amount that needs to be paid.

DealTaxAmount

Float

The tax amount (DealDueNowPriceGross - DealDueNowPriceNet).

Items

Array

The array of response items, one for each subscription.

Items.SubscriptionReference

String

The subscription code.

Items.DealPriceScenario

String

The provided DealPriceScenario.

Items.DealSubscriptionScenario

String

The provided DealSubscriptionScenario.

Items.DealDate

Datetime

The provided DealDate. Format: YYYY-MM-DD HH:MM:SS.

Items.DealDueNowPriceNet

Float

The NET amount to be paid now.

Items.DealDueNowPriceGross

Float

The GROSS amount to be paid now.

Items.DealTaxAmount

Float

The tax amount.

Items.DealTaxPercent

Int

The percent that the tax amount is covering from the GROSS price.

Items.CurrentInfo

Object

The current subscription information.

Items.CurrentInfo.ProductCode

String

The product code.

Items.CurrentInfo.ProductName

String

The product name.

Items.CurrentInfo.ProductDescription

String

The product description.

Items.CurrentInfo.BillingPriceNet

Float

The NET price of a billing cycle.

Items.CurrentInfo.BillingPriceGross

Float

The GROSS price of a billing cycle.

Items.CurrentInfo.NoOfBillingCycles

Int

The number of billing cycles.

Items.CurrentInfo.CurrentBillingCycle

Int

The current billing cycle number.

Items.CurrentInfo.PayedBillingCycles

Int

The number of paid billing cycles.

Items.CurrentInfo.RemainingBillingCycles

Int

The number of remaining billing cycles.

Items.CurrentInfo.CurrentBillingCycleEndDate

Datetime

The end date of the current billing cycle. Format: YYYY-MM-DD HH:MM:SS.

Items.CurrentInfo.TaxAmount

Float

The tax amount.

Items.CurrentInfo.TaxPercent

Float

The percent that the tax amount is covering from the GROSS price.

Items.CurrentInfo.BillingCyclesFrequency

String

The frequency of a billing cycle for the current subscription as it is now.

Items.CurrentInfo.BillingCycleFrequencyUnit

String

The unit of a billing cycle for the current subscription as it is now.

Can be one of MONTHS, DAYS.

Items.CurrentInfo.ContractLength

Int

The contract length for the current subscription as it is now.

Items.CurrentInfo.ContractLengthUnit

Int

The unit of the contract length for the current subscription as it is now. Can be one of MONTH, DAY.

Items.CurrentInfo.ProductOptions

Array

The array of existing product options.

Items.CurrentInfo.ProductOptions.Code

String

The option group code as defined in the Merchant Control Panel under “Unique Code”.

Items.CurrentInfo.ProductOptions.Value

String

The price option value if the group is of type interval or the price option code as defined in the Merchant Control Panel under “Unique Code” otherwise.

Items.NewDealInfo

Object

The new deal information.

Items.NewDealInfo.ProductCode

String

The product code.

Items.NewDealInfo.ProductName

String

The product name.

Items.NewDealInfo.ProductDescription

String

The product description.

Items.NewDealInfo.BillingPriceNet

Float

The NET price of a billing cycle.

Items.NewDealInfo.BillingPriceGross

Float

The GROSS price of a billing cycle.

Items.NewDealInfo.NoOfBillingCycles

Int

The number of billing cycles.

Items.NewDealInfo.CurrentBillingCycle

Int

The current billing cycle number.

Items.NewDealInfo.PayedBillingCycles

Int

The number of paid billing cycles.

Items.NewDealInfo.RemainingBillingCycles

Int

The number of remaining billing cycles.

Items.NewDealInfo.CurrentBillingCycleEndDate

Datetime

The end date of the current billing cycle. Format: YYYY-MM-DD HH:MM:SS.

Items.NewDealInfo.TaxAmount

Float

The tax amount.

Items.NewDealInfo.TaxPercent

Float

The percent that the tax amount is covering from the GROSS price.

Items.NewDealInfoBillingCyclesFrequency

Int

The frequency of a billing cycle for this subscription following an eventual deal change with the provided Items.SubscriptionCustomSettings. In case of a One Time Fee subscription, this value will be -1.

Items.NewDealInfo.BillingCycleFrequencyUnit

String

The unit of a billing cycle for this subscription following an eventual deal change with the provided Items.SubscriptionCustomSettings. Can be one of MONTH, DAY.

Items.NewDealInfo.ContractLength

Int

The contract length for this subscription following an eventual deal change with the provided Items.SubscriptionCustomSettings. In case of a One Time Fee or Lifetime subscription, this value will be NULL.

Items.NewDealInfo.ContractLengthUnit

String

The unit of the contract length for this subscription following an eventual deal change with the provided Items.SubscriptionCustomSettings. Ca be one of MONTH, DAY.

Items.NewDealInfo.ProductOptions

Array

The array of existing product options.

Items.NewDealInfo.ProductOptions.Code

String

The option group code as it's defined in the Merchant Control Panel under “Unique Code”.

Items.NewDealInfo.ProductOptions.Value

String

The price option value if the group is of type interval or the price option code as defined in the Merchant Control Panel under “Unique Code” otherwise.

Items.TotalsDealInfo

Object

General statistics regarding the subscription.

Items.TotalsDealInfo.DealsNumber

Int

The total number of deals made so far.

Items.TotalsDealInfo.ContractsNumber

Int

The total number of contracts made so far.

Items.TotalsDealInfo.PaidBillingCycles

Int

The number of paid billing cycles.

Items.TotalsDealInfo.ElapsedBillingCycles

Int

The number of elapsed billing cycles.

Error handling

Situation

Error Code

Error Message

Mandatory parameter(s) not provided

MALFORMED_PARAMETER

Currency not provided, Items.SubscriptionReference not provided, Items.Price.Type not provided, ...

DealDate not provided in required format

MALFORMED_PARAMETER

Invalid format provided for Items.DealDate. Format must be Y-m-d H:i:s. Provided: 2021-0920 23:59:59.

DealDate is in the past

MALFORMED_PARAMETER

Deal date 2020-09-20 23:59:59 is in the past.

Subscription not found or not associated with seller

VALIDATION_SUBSCRIPTION_MISSING

Subscription 6D4F1S81EEB not found.

Subscription not active

VALIDATION_SUBSCRIPTION_INACTIVE

Subscription 6D4F181EEB not active.

Product not found or not associated with seller

VALIDATION_PRODUCT_MISSING

Product with code 6A4C23036C not found.

Product not active

VALIDATION_PRODUCT_INACTIVE

Product with code 6A4C23036C not active.

The subscription is not B2B due to no custom renewal settings being found on subscription

VALIDATION_SUBSCRIPTION_NOT_B2B

No custom renewal settings found for subscription 6D4F1S81EEB. This subscription may not be a B2B subscription.

Provided price option groups are not valid price options for provided product

VALIDATION_PRICE_OPTION_MISSING

Some of the provided price options not found!

Provided subscription upgrade scenario not among supported values

VALIDATION_DEAL_SUBSCRIPTION_SCENARIO

Invalid upgrade subscription scenario provided: 'WRONG_SCENARIO'. Must be one of start_new_deal_contract_now, start_new_deal_contract_after_current_cycle.

Provided subscription price scenario not among supported values

VALIDATION_DEAL_PRICE_SCENARIO

Invalid price scenario provided: 'WRONG_SCENARIO'. Must be one of: using_last_order_price, using_last_product_price, price_total, product_price_difference.

Provided subscription price scenario not among supported values

VALIDATION_FISCAL_CODE

<fiscal code validation error>

Invalid billing email provided

VALIDATION_BILLING_DETAILS

Invalid billing email provided.

Provided billing country not among seller supported countries.

VALIDATION_BILLING_DETAILS

Provided billing country not among seller supported countries.

Business model tax calculation type requires that BillingDetails.State be provided.

VALIDATION_BILLING_DETAILS

Business model tax calculation type requires that BillingDetails.State be provided.

Invalid delivery email provided

VALIDATION_DELIVERY_DETAILS

Invalid delivery email provided.

Provided delivery country not among seller supported countries.

VALIDATION_DELIVERY_DETAILS

Provided delivery country not among seller supported countries.

Business model tax calculation type requires that DeliveryDetails.State be provided.

VALIDATION_DELIVERY_DETAILS

Business model tax calculation type requires that DeliveryDetails.State be provided.

Country '{$deliveryCountryCode}' provided in two different business model distributions.

VALIDATION_BUSINESS_MODEL

Country provided in two different business model distributions.

Invalid price type detected for the next renewal price

INTERNAL_ERROR

Internal error

Unexpected error

INTERNAL_ERROR

Internal error

 

Pricing configuration

Overview

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

Retrieve a pricing configuration by name            Retrieve a pricing configuration by code               Retrieve pricing configurations

Pricing configuration object

Parameters Type/Description

Name

String

 

Pricing configuration name.

Code

String

 

System-generated identifier. Read-only.

Default

Boolean

 

True for the default pricing configuration

BillingCountries

Array of strings

 

ISO codes of the countries assigned to the pricing configuration.

Empty unless a pricing configuration has specific countries assigned.

PricingSchema

String

 

DYNAMIC – With a base price

FLAT – Without a base price

PriceType

String

 

Possible values:

• NET

• GROSS

DefaultCurrency

String

 

The ISO code of the default currency for the pricing configuration.

Prices

Object

 

Details below.

 

Regular

Array of objects

 

 

Details below.

 

 

Amount

Int

 

 

 

The price of the product. Use -1 to delete it.

 

 

Currency

String

 

 

 

ISO code of the currency for the product price.

 

 

MinQuantity

Int

 

 

 

The minimum quantity of volume discounts. Default is 1.

 

 

MaxQuantity

Int

 

 

 

The maximum quantity of volume discounts. Default is 99999.

 

 

OptionCodes

Array of objects

 

 

 

Details below.

 

 

 

Code

String

 

 

 

 

System generated pricing options group code (you can also configure it) that the 2Checkout system uses to calculate product prices for pricing configurations without a base price.

 

 

 

Options

StringArray

 

 

 

 

The pricing options group option code you configured that the 2Checkout system uses to calculate product prices for pricing configurations without a base price.

 

Renewal

Array of objects

 

 

Details below.

 

 

Amount

Int

 

 

 

The price of the product. Use -1 to delete it.

 

 

Currency

String

 

 

 

ISO code of the currency for the product price.

 

 

MinQuantity

Int

 

 

 

The minimum quantity of volume discounts. Default is 1.

 

 

MaxQuantity

Int

 

 

 

The maximum quantity of volume discounts. Default is 99999.

 

 

OptionCodes

Array of objects

 

 

 

Details below.

PriceOptions

Array of objects

 

Details below.

 

Code

String

 

 

System generated pricing options group code (you can also configure it) that the 2Checkout system uses to calculate product prices for pricing configurations without a base price.

 

Required

Boolean

 

 

true – you set the price options group as required during the purchase process.

false - you did not set the price options group as required during the purchase process.

 

Retrieve assigned price option groups

Overview

Use the getAssignedPriceOptionGroups method to extract information about the price option groups you assigned to one of your products.

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.

ProductCode

Required (string)

 

The editable code that you control at product-level, not the unique, system-generated product ID.

Response

Parameters Type/Description

PriceOptionGroup

Array of objects

Request

<?php

require ('PATH_TO_AUTH');
 
$ProductCode = 'YOUR_PRODUCT_CODE';
 
try {
    $AssignedPriceOptionGroups = $client->getAssignedPriceOptionGroups($sessionID, $ProductCode);
}

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

var_dump("AssignedPriceOptionGroups", $AssignedPriceOptionGroups);

?>

Use WebMoney

Overview

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

Requirements

Shoppers in the CIS (Commonwealth of Independent States) area, Russia, and Asia (Malaysia, Indonesia) can purchase using WebMoney. 

Supported currencies

WebMoney supports transactions in EUR.

Workflow

  1. If the shopper is paying with any one of the supported currencies, they can use WebMoney as a payment method in the shopping cart.
  2. After the order is generated by calling the placeOrder method, in the order's details the shopper will find a URL where they need to be redirected in order to finish the payment.
  3. The URL can be found in the PaymentDetails/PaymentMethod response object, under the Redirect attribute. The shopper needs to be redirected to that URL via a POST call, with the parameters available in the API response sent to the URL.
  4. Once the shopper finishes the payment process on the WebMoney side, the order will be updated in the 2Checkout system as well.

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.

Order

Required (Object)

 

Object designed to collect all data necessary for an order, including billing, product/subscription plan and payment details.

See code sample for more details. 

Request Example

<?php

require ('PATH_TO_AUTH');

$Order = new stdClass();
$Order->RefNo = NULL;
$Order->Currency = 'EUR';
$Order->Country = "RO";
$Order->Language = 'EN';
$Order->CustomerIP = '10.5.22.197';
$Order->ExternalReference = NULL;
$Order->Source = NULL;
$Order->Affiliate = new stdClass();
$Order->Affiliate->AffiliateCode = 'Partner123'
$Order->Affiliate->AffiliateSource = 'MobilePlatform'
$Order->CustomerReference = NULL;
$Order->Items = array();
$Order->Items[0] = new stdClass();
$Order->Items[0]->Code = 'a01';
$Order->Items[0]->Quantity = 1;
$Order->Items[0]->PriceOptions = NULL;
$Order->Items[0]->SKU = NULL;
$Order->Items[0]->Price = NULL;
$Order->Items[0]->CrossSell = NULL;
$Order->Items[0]->Trial = false;
$Order->Items[0]->AdditionalFields = NULL;
$Order->Items[0]->SubscriptionStartDate = NULL; //If empty or null, subscriptions become active when purchase is made.
$Order->BillingDetails = new stdClass();
$Order->BillingDetails->FirstName = 'John';
$Order->BillingDetails->LastName = 'Doe';
$Order->BillingDetails->CountryCode = "RO";
$Order->BillingDetails->State = 'Bucharest';
$Order->BillingDetails->City = 'Bucharest';
$Order->BillingDetails->Address1 = 'Street Name 555';
$Order->BillingDetails->Address2 = NULL;
$Order->BillingDetails->Zip = '1111111';
$Order->BillingDetails->Email = 'test@2checkout.com';
$Order->BillingDetails->Phone = '00402505555';
$Order->BillingDetails->Company = 'blank';
$Order->DeliveryDetails = new stdClass();
$Order->DeliveryDetails->FirstName = 'John';
$Order->DeliveryDetails->LastName = 'Doe';
$Order->DeliveryDetails->CountryCode = 'RO';
$Order->DeliveryDetails->State = 'Bucharest';
$Order->DeliveryDetails->City = 'Bucharest';
$Order->DeliveryDetails->Address1 = 'Street Name 555';
$Order->DeliveryDetails->Address2 = NULL;
$Order->DeliveryDetails->Zip = '1111111';
$Order->DeliveryDetails->Email = 'test@2checkout.com';
$Order->DeliveryDetails->Phone = '00402505555';

$Order->DeliveryDetails->Company = NULL;
$Order->PaymentDetails = new stdClass ();
$Order->PaymentDetails->Type = 'WEBMONEY';
$Order->PaymentDetails->Currency = 'EUR';
$Order->PaymentDetails->HadPayPalToken = false;
$Order->PaymentDetails->CustomerIP = '10.5.22.197';

$Order->PaymentDetails->PaymentMethod = new stdClass ();
$Order->PaymentDetails->PaymentMethod->ReturnURL = 'https://yourreturnurl.com';
$Order->PaymentDetails->PaymentMethod->CancelURL= 'https://yourcancelurl.com ';


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

$output = callRPC($jsonRpcRequest, $host);

var_dump($output);

Response Parameters

Parameter Type/Description

Order information

Object

  Object containing order information.

Response Example

{
    "RefNo": "189878812",
    "OrderNo": 0,
    "ExternalReference": null,
    "ShopperRefNo": null,
    "Status": "PENDING",
    "ApproveStatus": "WAITING",
    "VendorApproveStatus": "OK",
    "MerchantCode": "251772850506",
    "Language": "en",
    "OrderDate": "2022-08-23 14:52:20",
    "FinishDate": null,
    "Source": "testAPI.com",
    "WSOrder": null,
    "Affiliate": {
        "AffiliateCode": null,
        "AffiliateSource": null,
        "AffiliateName": null,
        "AffiliateUrl": null
    },
    "HasShipping": true,
    "BillingDetails": {
        "FiscalCode": null,
        "TaxOffice": null,
        "Phone": "010-6552-9988",
        "FirstName": "John",
        "LastName": "Doe",
        "Company": null,
        "Email": "test@verifone.com",
        "Address1": "Test Address",
        "Address2": null,
        "City": "Test City",
        "Zip": "35005",
        "CountryCode": "de",
        "State": null
    },
    "DeliveryDetails": {
        "Phone": "010-6552-9988",
        "FirstName": "John",
        "LastName": "Doe",
        "Company": null,
        "Email": "test@verifone.com",
        "Address1": "Test Address",
        "Address2": null,
        "City": "Test City",
        "Zip": "35005",
        "CountryCode": "de",
        "State": null
    },
    "PaymentDetails": {
        "Type": "WEBMONEY",
        "Currency": "eur",
        "PaymentMethod": {
            "Amount": "35.5",
            "Currency": "eur",
            "Redirect": {
                "Url": "https://psp.paymaster24.com/Payment/Init",
                "Method": "POST",
                "Params": {
                    "LMI_MERCHANT_ID": "094c1995-1c81-4779-bf14-79e0127a0aed",
                    "LMI_PAYMENT_AMOUNT": "35.5",
                    "LMI_PAYMENT_NO": "189878812",
                    "LMI_PAYMENT_DESC": "Payment for Avangate: #189878812",
                    "LMI_SIM_MODE": "",
                    "LMI_CURRENCY": "EUR",
                    "LMI_SUCCESS_URL": https://yourreturnurl.com,
                    "LMI_FAILURE_URL": https://yourcancelurl.com

                },
                "FullHtml": "<!DOCTYPE html><html><body><form action=\"https://psp.paymaster24.com/Payment/Init\" method=\"POST\" id=\"postform\"><input type=\"hidden\" name=\"LMI_MERCHANT_ID\" value=\"094c1995-1c81-4779-bf14-79e0127a0aed\" /><input type=\"hidden\" name=\"LMI_PAYMENT_AMOUNT\" value=\"35.5\" /><input type=\"hidden\" name=\"LMI_PAYMENT_NO\" value=\"189878812\" /><input type=\"hidden\" name=\"LMI_PAYMENT_DESC\" value=\"Payment for Avangate: #189878812\" /><input type=\"hidden\" name=\"LMI_SIM_MODE\" value=\"\" /><input type=\"hidden\" name=\"LMI_CURRENCY\" value=\"EUR\" /><input type=\"hidden\" name=\"LMI_SUCCESS_URL\" value=\"https://api.2checkout.com/order/gateway_return.php\" /><input type=\"hidden\" name=\"LMI_FAILURE_URL\" value=\"https://api.2checkout.com/order/gateway_cancel.php\" /></form><script type=\"text/javascript\">document.getElementById(\"postform\").submit();</script></body></html>"
            },
            "ReturnURL": https://yourreturnurl.com,
            "CancelURL": https://yourcancelurl.com,
            "Vendor3DSReturnURL": null,
            "Vendor3DSCancelURL": null,
            "InstallmentsNumber": null
        },
        "CustomerIP": "91.220.121.21"
    },
    "DeliveryInformation": {
        "ShippingMethod": {
            "Code": null,
            "TrackingUrl": null,
            "TrackingNumber": null,
            "Comment": null
        }
    },
    "CustomerDetails": null,
    "Origin": "API",
    "AvangateCommission": 2.63,
    "OrderFlow": "REGULAR",
    "GiftDetails": null,
    "PODetails": null,
    "ExtraInformation": null,
    "PartnerCode": null,
    "PartnerMargin": null,
    "PartnerMarginPercent": null,
    "ExtraMargin": null,
    "ExtraMarginPercent": null,
    "ExtraDiscount": null,
    "ExtraDiscountPercent": null,
    "LocalTime": null,
    "TestOrder": false,
    "FxRate": 0.960096,
    "FxMarkup": 4,
    "PayoutCurrency": "USD",
    "DeliveryFinalized": false,
    "Errors": null,
    "Items": [
        {
            "ProductDetails": {
                "Name": "Test Product",
                "ShortDescription": "<p>Join all your clouds in a big one</p>",
                "Tangible": false,
                "IsDynamic": false,
                "ExtraInfo": null,
                "RenewalStatus": false,
                "Subscriptions": null,
                "DeliveryInformation": {
                    "Delivery": "BY_AVANGATE",
                    "DownloadFile": null,
                    "DeliveryDescription": "",
                    "CodesDescription": "",
                    "Codes": []
                }
            },
            "PriceOptions": [],
            "Price": {
                "UnitNetPrice": 29.83,
                "UnitGrossPrice": 35.5,
                "UnitVAT": 5.67,
                "UnitDiscount": 0,
                "UnitNetDiscountedPrice": 29.83,
                "UnitGrossDiscountedPrice": 35.5,
                "UnitAffiliateCommission": 0,
                "ItemUnitNetPrice": null,
                "ItemUnitGrossPrice": null,
                "ItemNetPrice": null,
                "ItemGrossPrice": null,
                "VATPercent": 19,
                "HandlingFeeNetPrice": 0,
                "HandlingFeeGrossPrice": 0,
                "Currency": "eur",
                "NetPrice": 29.83,
                "GrossPrice": 35.5,
                "NetDiscountedPrice": 29.83,
                "GrossDiscountedPrice": 35.5,
                "Discount": 0,
                "VAT": 5.67,
                "AffiliateCommission": 0
            },
            "LineItemReference": "0b136a51c517ae2bcba2af651a97f925f1589e98",
            "PurchaseType": "PRODUCT",
            "Code": "LPUJL13OZ6",
            "ExternalReference": "",
            "Quantity": 1,
            "SKU": null,
            "CrossSell": null,
            "Trial": null,
            "AdditionalFields": null,
            "Promotion": null,
            "RecurringOptions": null,
            "SubscriptionStartDate": null,
            "SubscriptionCustomSettings": null,
            "UpSell": null
        }
    ],
    "Promotions": [],
    "AdditionalFields": null,
    "Currency": "eur",
    "NetPrice": 29.83,
    "GrossPrice": 35.5,
    "NetDiscountedPrice": 29.83,
    "GrossDiscountedPrice": 35.5,
    "Discount": 0,
    "VAT": 5.67,
    "AffiliateCommission": 0,
    "CustomParameters": null,
    "Refunds": null
}

For more on how to redirect shoppers to the payment method page to finalize the payment, please read here.

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