Skip to main content

Save prices

Last updated: 25-Sep-2019
Rate this article:

Overview

Use the savePrices method to update product prices for a specific pricing configuration.

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.

Prices

BasicPrice Object

 

Details below.

Quantities

Object

 

Details below.

PriceOptions

Required (PriceOptionsAssigned object)

 

Details below.

PricingConfigCode

Required (string)

 

System-generated unique pricing configuration code. Read-only.

type

Require (string)

• REGULAR

• RENEWAL

 

Parameters Type/Description

BasicPrice

Object

Currency

String

 

The currency ISO code used for shipping costs - ISO 4217.

Amount

Float

 

Basic price.

 

Parameters Type/Description

Quantities

Object

MinQuantity

String

 

The minimum quantity of volume discounts. Default is 1.

MaxQuantity

String

 

The maximum quantity of volume discounts. Default is 99999.

 

Parameters Type/Description

PriceOptionsAssigned

Object

Code

String

 

Price option identifier.

Options

Array of strings

 

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

Response

bool(true)
<?php

require ('PATH_TO_AUTH');

$Prices = array();
$Prices[0] = new stdClass();
$Prices[0]->Currency = 'USD';
$Prices[0]->Amount = 999.99;
$Prices[1] = new stdClass();
$Prices[1]->Currency = 'EUR';
$Prices[1]->Amount = 111.99;
$Quantities = new stdClass();
$Quantities->MinQuantity = 1;
$Quantities->MaxQuantity = 99999;
$PriceOptions = null;
/*
$PriceOptions = array();
$PriceOptions[0] = new stdClass();
$PriceOptions[0]->Code = '04WCPNHWQ5';
$PriceOptions[0]->Options = array();
$PriceOptions[0]->Options[0] = 'loqmhwcpwk';
$PriceOptions[0]->Options[1] = 'n7332ux312';
$PriceOptions[1] = new stdClass();
$PriceOptions[1]->Code = '4CU1OVAGAA';
$PriceOptions[1]->Options = array();
$PriceOptions[1]->Options[0] = 'dvk7hv62jg';
$PriceOptions[1]->Options[1] = 'uf1svzaxcd';
*/
$PricingConfig              = new stdClass();
$PricingConfig->ProductCode = 'NewSubscriptionPlan_Code_12345';
$PricingConfig->Country     = null;
$type                       = 'REGULAR';

try {
    $NewPrice = $client->savePrices($sessionID, $Prices, $Quantities, $PriceOptions, $PricingConfig, $type);
}

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

var_dump("NewPrice", $NewPrice);


?>
Rate this article:

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