Skip to main content

Set next renewal price

Last updated: 06-May-2019
Rate this article:

Overview

Charge customers custom prices for the renewal of subscriptions, moving away from the recurring pricing configuration at product level. Use the setCustomRenewalPrice method to set custom renewal prices for subscriptions and control the number of recurring billing cycles the price impact subscribers.

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.

Price

Required (double)

 

The custom renewal price you want to charge.

Currency

Required (string)

 

Currency in which prices are expressed. The currency ISO code used for the payment is ISO 4217. The default currency is the same as in the previous payment made by the customer.

Cycles

Required (int)

 

Number of recurring billing cycles for which 2Checkout charges customers the custom price rather, ignoring product–level recurring pricing configurations. (The renewal cycles number must be a positive integer. Default value 1).

ReasonText

Optional (string)

 

Save details at the subscription-level about the custom costs.

Request

<?php

require ('PATH_TO_AUTH');

$subscriptionReference = 'YOUR_REFERENCE';
$Price = 25;
$Currency = 'gbp';
$Cycles = 7;
$ReasonText = null;

$jsonRpcRequest = array (
'method' => 'setCustomRenewalPrice',
'params' => array($sessionID, $subscriptionReference, $Price, $Currency, $Cycles, $ReasonText),
'id' => $i++,
'jsonrpc' => '2.0');

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

Response

Parameters Type/Description

Boolean

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

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