Schedule subscription changes
Overview
Schedule specific changes for a subscription to be applied at the end of the billing cycle. Use the scheduledProductUpdate method to change specific details about a 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. | |
| SubscriptionReference | Required (String) |
| The system-generated reference code of the subscription. | |
| ProductCode | String |
| Unique product identifier that you control to which the subscription should be updated. | |
| PricingOptions | Array |
| The product options codes selected for the subscription update. Pricing options codes are case sensitive. | |
| Quantity | Int |
| Number of product units |
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';
$newProductCode = 'PRODUCT_V2';
$newPricingOptions = 'OPTION_CODE1;OPTION_CODE2';
$newQuantity = 2;
$jsonRpcRequest = [
'method' => 'scheduleProductUpdate',
'params' => [$sessionID, $subscriptionReference, $newProductCode, $newPricingOptions, $newQuantity],
'id' => $i++,
'jsonrpc' => '2.0'
];
var_dump(callRPC((object)$jsonRpcRequest, $host, true));FAQ:
When is the scheduled update applied? At the next renewal - for both auto-renewals and manual renewals.
Is there a limit on how far in advance I can schedule an update? No specific time limit is enforced - the update remains scheduled until the next renewal or until explicitly removed.
How late in the billing cycle can an update be scheduled? At any point during the billing cycle, right up until the renewal.
Can I schedule changes to product, pricing options, and quantity at the same time? Yes. ProductCode, PricingOptions, and Quantity can be combined in a single scheduling call.
Can I schedule a quantity decrease? Yes. A quantity decrease is supported, but Quantity = 0 and negative values are not allowed and will return validation errors.
Are all pricing option types supported for scheduled subscription changes? Yes, with one exception: pay-per-usage (PAYPERUSAGE) pricing options are not supported.
Where can I see the scheduled update? In the GET subscription response under Future Events, and in the license history in the Control Panel and MyAccount after the update is applied.
Are shoppers notified when a subscription change is scheduled? No. Scheduling a subscription change does not trigger a notification to the shopper, however, an LCN will be sent to the vendor who can then decide to notify the shopper.
Does the renewal price reflect the scheduled changes? Yes. The GET renewal price APIs return pricing based on the scheduled changes.
Is the scheduled update applied if the subscription is renewed manually via MyAccount? Yes. The scheduled update is respected across all renewal paths.
Does an existing coupon still apply after a scheduled product change? Yes, provided the coupon is compatible with the new product. If the coupon is not compatible with the product being updated to, it will not be applied after the change.
Does an early renewal honor the scheduled changes? Yes. Early renewals respect the scheduled update - the subscription will renew with the new product, pricing options, and/or quantity as defined in the scheduled change.
Is bulk scheduling across multiple subscriptions supported? No. Scheduling is performed per individual subscription reference. Bulk scheduling across multiple subscriptions in a single API call is not supported — the API is designed specifically for one subscription at a time.