Skip to main content

US ZIP+4 codes

Overview

2Checkout offers support for both standard and ZIP+4 ZIP codes.

Standard US ZIP codes

The standard ZIP code notation used by the United States Postal service uses five digits to identify a delivery area.

An example of a standard US ZIP code is 90210.

ZIP+4 codes

In addition to the classic five-digit ZIP codes used in the United States, 2Checkout also supports the use of ZIP+4 add-on ZIP codes, important when shipping physical goods.

The ZIP+4 system uses the basic five-digit code together with four additional digits to identify a geographic segment located within a five-digit delivery area. The segment can be a city block, a group of apartments or other mail receiving units that could benefit from the use of an additional identifier.

An example of a ZIP+4 ZIP code is 99577-0727.

Payment failed (Direct Debit)

Overview

Use the variables in the list below to customize the Payment failed (Direct Debit) shopper email notifications according to your needs.

Check the 'Mandatory' column to see the variables that are required in your customized version of the e-mail.

Variable name Description Test value Mandatory
BANKACCOUNT Avangate bank account [NLXXABNAXXXXXXXXXX (IBAN)] No
BANKIBAN Avangate bank IBAN ABNANL2XXX No
BANKNAME Avangate bank name  ABN AMRO Bank Amsterdam No
BANKROUTINGNUMBER Avangate bank routing number 0 No
BANKSWIFT Avangate bank swift code ABNANL2XXX No
BUSINESS_COMPANY Avangate company name Avangate Yes
BUSINESS_HOTLINE Avangate support phone +31 88 0000008 No
BUSINESS_HOTLINEUS Avangate US hotline number +1 (650) 963-5701 / (888) 247-1614 No
BUSINESS_OPEMAIL Avangate operational email address support@avangate.com No
BUSINESS_SUPEMAIL Avangate support email address support@avangate.com No
BUY_NOW_NEW_LINK * Prefilled buy link https://secure.avangate.com/ No
COMMERCIALNAME Merchant's commercial name 0 No
CURRENCY Order billing currency USD] Yes
CURRENCY_ORIGINAL Original order currency (applicable to refunds) 0 No
ENCRYPTED_MERCHANT_CODE Encrypted merchant code 0 No
FIRSTNAME Shopper's first name used on the delivery information [John No
GATEWAY_ERROR_CODE Gateway error code GW_PROCESSING_ERROR
See the full
list of Possible Values
No
GATEWAY_ERROR_MESSAGE Reason why the transaction failed. (e.g. Invalid card, insufficient funds) Error processing the card transaction. The card account has not been debited. Card data is invalid or incomplete. No
GENERALTOTAL Total order price [56.50 Yes
HAS_RENEWAL_PRODUCTS Flag that indicates whether at least one product has renewal settings 0 No
IS_RENEWAL Flag that indicates whether at least one product has renewal settings 0 No
LASTNAME Shopper's last name used on the delivery information Doe] No
MYACCOUNT_URL_UPDATE_CC URL for updating credit card information in myAccount 0 No
MY_ACCOUNT_URL_UPDATE_CC URL for updating credit card information in myAccount 0 No
NAMES_OF_PRODUCTS Names of all products in the order, comma separated 0 No
ORDERDATE Order placement date [2017-05-26] Yes
ORDER_AMOUNT_ORIGINAL Original order value (applicable to refunds) 0 No
ORDER_DATE_STANDARD_FORMAT Standard format used for the order placement date 0 No
ORDER_FLOW Purchase flow used to place the order 0 No
ORDER_STATUS Order status 0 No
PAYMENT_TYPE_INFO English payment method name. Includes last four card digits (if applicable). 0 No
PRODUCTS 0 0 No
PRODUCTS[index1].BILLING_CYCLE Indicates how many renewals have been successfully performed so far (on the subscription) 11 No
PRODUCTS[index1].DISCOUNT Product discount value per product line [2.00 No
PRODUCTS[index1].INFO Additional product information defined by merchant when generating buy links [Product info 1] No
PRODUCTS[index1].LICENSE_TYPE Type of purchased subscription 0 No
PRODUCTS[index1].PCODE Product code. [P_CODE_1] No
PRODUCTS[index1].PID Product ID number 1001 No
PRODUCTS[index1].PNAME Product name [Test product name 1] No
PRODUCTS[index1].PRICE Product unit price [20.00 No
PRODUCTS[index1].PRODUCT_OPTIONS[index2] 0 0 No
PRODUCTS[index1].PRODUCT_OPTIONS[index2].OptionText Ignore internal var. 0 No
PRODUCTS[index1].PROMONAME Name of the promotion applied to the product [Some promotion] No
PRODUCTS[index1].QUANTITY Purchased product quantity [2] No
PRODUCTS[index1].SHORT_DESCRIPTION Short product description 0 No
PRODUCTS[index1].TOTAL Total gross price per product line (before applying discounts) [45.60 No
PRODUCTS[index1].VAT VAT/Sales tax value per product line [3.80 No
PRODUCTS_DATA[index1].IdProduct Product ID number 0 No
PRODUCTS_DATA[index1].PRODUCT_SHORT_DESCRIPTION Short product description 0 No
PRODUCTS_NO Number of products in cart 0 No
REFNO Order reference number [9xxxxx] Yes
RETRYLINK Payment retry link 0 No
RETRY_LINK Payment retry link 0 No
SELLERCOMPANY Merchant's company name [Software Company Name] Yes
TOTALEQUIV The order amount converted to all the merchant's currencies 0 No
UNSUBSCRIBE_LINK Shopper unsubscribe link 0 No
UPLOADLINK File upload link 0 No
UPLOAD_LINK File upload link 0 No
WEBSITE Website where the shopper placed the order http://www.software-company-website.com Yes

Copy payment info

Overview

Copy card-on-file data available in the 2Checkout system from a source subscription to an imported target subscription. 2Checkout uses the existing payment information to charge customers as a part of the recurring billing (renewal) process.

Use the copyPaymentInfo method.

Requirements

The imported target subscription and the source subscription must belong to the same customer. The 2Checkout system checks to make sure that the 2Checkout Customer Reference (an internal identifier) coincides for the customer accounts associated to the target and source subscriptions.

Availability

Please contact 2Checkout directly if you wish to take advantage of this feature.

How does this method work?

  1. Customer A purchases Subscription A using a VISA credit card and you import Subscription B for the same customer with no data or with an AMEX card.
  2. When 2Checkout renews Subscription A, it charges Customer A using the VISA, while using the AMEX (if the data was provided) for Subscription B charges.
  3. When you copy the payment data from Subscription A to Subscription B, the 2Checkout system uses the VISA credit card to renew both subscriptions according to with their respective recurring billing cycles. 2Checkout charges customers during the recurring billing process for the imported target subscription using the payment method they used to purchase the source subscription.

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.

TargetSubscriptionReference

Required (string)

 

The 2Checkout Subscription Reference of the imported target subscription, to which 2Checkout copies the payment on file data associated with the source subscription.

SubscriptionReference

Required (string)

 

The 2Checkout Subscription Reference of the source subscription whose attached payment on file data 2Checkout copies to the target subscription.

Response

Parameter Type/Description

Boolean

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

Request

<?php

require ('PATH_TO_AUTH');

var_dump($sessionID);
$TargetSubscription = 'FFAE3C9429';
$SourceSubscription = '9F4154733C';

$jsonRpcRequest = array (
'method' => 'copyPaymentInfo',
'params' => array($sessionID, $TargetSubscription, $SourceSubscription),
'id' => $i++,
'jsonrpc' => '2.0');

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

?>

 

Place renewal partner orders

Overview

When placing an order on behalf of your partners, you can purchase subscription renewals in addition to new subscriptions and upgrades.

Requirements

  • It's mandatory that the products remain associated with the same price list as the original subscriptions and assigned to the same partners to provide them with the possibility of ordering renewals or to place renewal orders on their behalf.
  • Products that are not part of price lists assigned to partners will not be available as subscription renewal options.
  • Renewals are only available for active and expired subscriptions, but not for disabled items. As long as expired subscriptions are still in their grace period (featuring the Past due status), renewing them is also a valid option.
  • When configuring a product with recurring billing, make sure to generate a subscription under the Renewal tab. Products can only be renewed only if a subscription was generated when ordering on behalf of your partners.
  • Active subscriptions can only be renewed if only 90 days or less remain until their expiration deadline.

Place renewal partner orders

  1. Go to Orders & customers.
  2. Click Place partner order.
  3. Select the partner for which you're ordering the renewal, either by typing the name in the Select partner box or by using the drop-down menu available. Alternatively, provided that you already placed orders on behalf of your partners, a list of Last used partners will be available in this area, and clicking on a name will automatically select it.
  4. You'll now get the possibility to order a new subscription, a renewal or an upgrade. Select Renewal to move to the next stage.
  5. Click Add order.
  6. Find the specific subscription for which you're ordering a renewal, by searching for criteria such as Name/Company, email, order reference, external reference PO, 2Checkout Subscription Reference, subscription code, partner invoice number or SKU. Apply available filters as needed including subscription status and subscription expiration date to narrow down the results.
  7. Search for subscriptions you want to renew (this area is designed to list all active and expired subscriptions when you first access it, but you can still enter query parameters and hit the Search button to have the system display only specific products).
  8. The results returned for the search include active and expired subscriptions previously purchased by /for the selected partner. Disabled subscriptions, as well as those for which you haven't generated a subscription, will not be listed here, even if they were acquired by/for the selected partner. Renewals can be ordered individually, one at a time, but you also have the option to bulk renew a number of selected items.
  9. Check the boxes next to the products you want to be renewed and hit the Renew selected subscriptions button.
  10. Add extra margin/discount options to decrease the cost of renewal for your partner. Extra margins and discounts are entirely optional and completely under your control.
    • Discount. Apply a discount to the product(s) value in this order. The discount is deducted from the total price of the products before the partner margin is applied.
    • Extra margin. Offer an extra margin to your partner only for this order. The extra margin is deducted from the total price of the products after the discount and partner margin is applied.
  11. Click Place order.
  12. Order confirmation. Orders placed by you on behalf of your partners are confirmed automatically, regardless of the order confirmation settings of the partner account.
  13. Attach end-user information. For renewals, the 2Checkout system is designed to copy the end-user information attached to the original subscription. However, when such data is not available, you'll need to provide it for the order to move to the fulfillment stage (if they are required according to the Partner commercial settings). The partner on whose behalf you're placing the renewal order can also provide the end-user details.
  14. Attach reseller information. Reseller information is copied automatically from the original subscription as a part of the renewal process. Similarly, when such data is not available, you'll need to provide it for the order to move to the fulfillment stage, if the reseller information is required according to that Partner's commercial settings. The partner on whose behalf you're placing the renewal order can also provide the end-user details.
  15. Pay partner invoices. You can generate partner invoices manually or automatically, depending on your partner account settings. If the order is placed without any available credit, or your partners do not enjoy a credit limit - they will first need to pay the partner invoice that gets generated automatically when the order is confirmed, and only then will the process advance to the fulfillment stage. To manually issue a partner invoice, go to Orders & customers -> Partner partner invoices.
  16. Click Save.
  17. On the next screen, you'll have the option to notify your partner of the newly generated partner invoice or to cancel it if necessary.
  18. Delivery/fulfillment. When delivery/fulfillment is handled by 2Checkout, not required or has been confirmed by you, the system will give green light to deliveries immediately for an order that is paid in full or placed within available credit. When setting up partner accounts, you can configure automated reminders for expiring subscriptions. Email subscription renewal notifications can be sent to partners, to end-user or both. End-user notifications are sent only if email addresses are available. These notifications will be generated when the Subscription is about to expire and will provide the partners' contact details. You also have the option of sending automated subscription renewal emails to partners, providing a "Subscription Expiration report" designed to help them decide which subscriptions to renew. Once a renewal order is logged by the system, the validity of existing subscriptions will be extended and new activation keys will be generated, with 2Checkout proceeding to deliver them to either the partners or directly to end-users, depending on the settings of the partner accounts.

On Channel Manager (CM), when placing an upgrade order and selecting a product that has 'Create a new subscription (disable the existing one)' checked, the new generated subscription will inherit all user data from the old subscription, including Customer ID, end-user details, etc.

If the 'Ecommerce Subscription Type' option is unchecked then:

  • A new Customer ID is generated
  • New end-user data has to be added in the checkout process (if requested by the vendor setup for partner orders)

Canceling partner orders

To cancel an order:

  1. Go to Order search -> Partner orders.
  2. Identify the item you'd like to call off.
  3. Click to view the order.
  4. Click Cancel.

Canceling orders automatically disables all associated subscriptions.

F.A.Q.

Can I edit pricing details for placed orders?

Yes. If no partner invoice was generated then you'll be able to add extra margin and to increase the discount. When the partner invoice was already issued, you'll need to first cancel it to edit the order's extra margin and discount.

Add new partnership programs

Overview

Design multiple partnership programs and let your partners decide which is the right one for them.

After defining the partnership programs you can assign partners to it and apply settings to multiple partners at once.

Add partnership programs 

Follow the steps below to add a new partnership program.

  1. Login to the 2Checkout Merchant Control Panel.
  2. Go to Partner management -> Partnership programs.
  3. Click Add partnership program.
  4. Fill in the partnership program general information:
    • Program Title - mandatory;
    • Description - non-mandatory but offers useful information to partners.
  5. Click Commercial Settings.
  6. Choose how you want your partner to pay for orders, how the delivery should take place and how renewals are handled. These are not mandatory settings, so configure them at your will.
    • Offer a credit limit. This represents the amount a partner is allowed to owe you for placed and delivered orders. Credit limits set to 10.000 USD allow partners to place and receive orders in that amount, sending the payment at a later date. After this limit is reached, future orders will not be delivered until the credit limit has been restored. When choosing this option, you need to decide on:
      • Credit limit - maximum amount of credit your partners can use to place orders before sending the payment.
      • Warning level - when available credit decreases to the specified warning level, your partners are notified by email.
    • License settings. Define requirements regarding subscription delivery and management:
      • Requires end user information  - delivery of activation keys takes place after the end user information gets attached to the order. If your key generator requires end user information, this information is mandatory before delivering the keys even if the box remains unchecked.
      • Requires reseller information -  delivery of the activation keys takes place after the reseller information gets attached to the order. If your key generator requires reseller information, this information is mandatory before delivering the keys even if the box remains unchecked.
      • Email license keys to - define who receives the activation information. Select at least one of the two options available to ensure the success of the fulfillment/delivery process.
        • End users
        • Partner
    • Other settings
      • Partner offers tech support to end user - partner contact information is listed as technical/installation support in the electronic delivery email sent to the end users.
      • Orders are confirmed automatically change default order approval settings: by default, each partner order has to be manually reviewed and approved.
      • Order cancellation period - time period after order placement during which the order can be cancelled;
      • Enable Direct Renewal - enable end users who purchased products from your partners to renew subscriptions via your website or via 2Checkout while crediting the partners with the commissions you set. 2Checkout automatically notifies partners via email when you enable Direct Renewal.
      • Email subscription expiration notifications to:
        • End users (if end user information is available)
        • Partner
    • Partner margin
      • None - the offered partner margin is set to 0. In return, you may want to offer special prices to a partner directly from the pricing configuration/price list, or you may want to add partner margin when placing an order.
      • General margin - set a general margin for new acquisitions or renewals.
      • Margin per product/category - set specific margins for products or categories.
  7. Click Assign Partners.
  8. Click the unassigned partners that you want to be part of your partnership program.
  9. Click Review and Apply.
  10. Review the partnership program information.
  11. Click Save and Apply to Partners.

Place a renewal order

Overview

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

Requirements

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

Payment methods

You can place renewal orders using the following payment methods:

  • Credit/Debit cards: Visa, Visa Electron, MasterCard, Maestro, Amex, Discover, Dankort, Carte Bleue, JCB. 2Checkout supports local Brazilian cards.
  • PayPal and PayPal Express
  • Purchase Order
  • Wire
  • Check
  • WeChat Pay
  • iDEAL
  • Alipay
  • WebMoney
  • GiroPay
  • Trustly
  • SOFORT
  • TEST orders
  • Free orders (no payment information required)
  • Previous order references - In addition to the payment methods enumerated above, 2Checkout also supports 1-click purchase flows in which you use valid previous order references belonging to returning customers to pay for new orders with their previously used cards and PayPal accounts.
  • Order with installments
  • ApplePay
  • 2Pay.js
  • Boleto/Pix
  • Google Pay

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

Parameters

 
Parameters Type/Description

sessionID

Required (string)

 

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

Order

Required (Object)

 

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

To place an order with PayPal rather than PayPal Express, use PAYPAL as the type of the PaymentDetails object and send the shopper email and a return URL as part of the PaymentMethod object. See code sample. 

SubscriptionReference

Required (String)

Avangate generated subscription reference number. E.q. A8C5671BFE.

Response

 
Parameters Type/Description

Order information

Object

Request

<?php

require ('PATH_TO_AUTH');

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

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

$Order->MachineId = "MachineID";

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

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

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

$Order->PaymentDetails->PaymentMethod = new stdClass();
/**/
$Order->PaymentDetails->PaymentMethod->CardNumber = "4111111111111111";
$Order->PaymentDetails->PaymentMethod->CardType = "VISA";
$Order->PaymentDetails->PaymentMethod->ExpirationYear = "2019";
$Order->PaymentDetails->PaymentMethod->ExpirationMonth = "12";
$Order->PaymentDetails->PaymentMethod->CCID = "123";
$Order->PaymentDetails->PaymentMethod->HolderName = "John Doe";
$Order->PaymentDetails->PaymentMethod->RecurringEnabled = TRUE;
$Order->PaymentDetails->PaymentMethod->HolderNameTime = 1;
$Order->PaymentDetails->PaymentMethod->CardNumberTime = 1;
/**/


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

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

var_dump ($placeOrder);
 

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
$host   = "https://api.avangate.com";
$client = new SoapClient($host . "/soap/3.0/?wsdl", array(
    'location' => $host . "/soap/3.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 = "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
$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;
}
$SubscriptionReference = '30E47F8699';
$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);

Retrieve an order

Overview

Use the getOrder method to retrieve details on a specific order placed with dynamic product information, or catalog products, using its 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 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';

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

 

 

Subscription upgrade

Overview

Retrieve information about the upgrade options for a specific subscription.

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

 

Country-based promotions

Overview

Create promotions that apply based on your customer's country of purchase. Customers across the world respond to different incentives, therefore by making your promotions country-specific you are increasing the effectiveness of your marketing tools. Set promotions to apply to a certain country, region, or continent, depending on your business needs.

How it works

To make your promotions country-specific, follow these steps:

1. Set pricing localization

Geo-specific promotions work by incorporating a local pricing configuration in the promotion setup. Use pricing localization capabilities to define specific prices based on the customer's country/region/continent. Check our pricing localization article for learning how to define local prices for your products.

2. Assign pricing configurations to your promotions

To make your promotions geo-specific, click on Add pricing options when creating a promotion. Select the products that have a localized pricing scheme, and add the pricing configuration in the promotion setup.

promotion pricing options.png

Click on Add to promotion, to successfully add a localized pricing configuration to your promotion. 

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