Trigger the renewal for a pay-per-usage subscription even before the end of the usage upload interval. Once the API call is made, the subscription is marked as ready to renew, and a renewal will be attempted. If the first attempt if not successful, the renewal of the subscription will be attempted again based on the regular renewal schedule.
|sessionID||String||Required||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||String||Required||Unique, system-generated subscription identifier.
2Checkout charges customers using the payment data attached to subscriptions. 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 2Checkout system uses the latest card info provided to charge subscription renewals.
<?php require ('PATH_TO_AUTH'); $subscriptionReference = 'YOUR_SUBSCRIPTION_REFERENCE'; $jsonRpcRequest = array ( 'method' => 'markUsageSubscriptionToRenewNow', 'params' => array($sessionID, $subscriptionReference), 'id' => $i++, 'jsonrpc' => '2.0' ); var_dump (callRPC((Object)$jsonRpcRequest, $host, true));
|Boolean||true or false depending on whether or not the subscription was marked as ready to be renewed. The response does not reflect the success of the renewal attempt.|