# Retrieve upgrade price

Use the **getProductUpgradeOptionsPrice** method to retrieve information about the costs a customer incurs when upgrading a specific subscription.

## Request parameters

<table><thead><tr><th width="218.2667236328125">Parameter</th><th>Type / Description</th></tr></thead><tbody><tr><td><code>sessionID</code></td><td><p><strong>Required (string)</strong></p><p>Session identifier, the output of the <strong>Login</strong> method. Include <code>sessionID</code> into all your requests. Avangate throws an exception if the values are incorrect. The <code>sessionID</code> expires in <strong>10 minutes</strong>.</p></td></tr><tr><td><code>subscriptionReference</code></td><td><p><strong>Required (string)</strong></p><p>Unique, system-generated subscription identifier.</p></td></tr><tr><td><code>productCode</code></td><td><p><strong>Required (string)</strong></p><p>Unique identifier of the target product for the subscription upgrade process. You control the product code and can set it up in the Control Panel.</p></td></tr><tr><td><code>currency</code></td><td><p><strong>Required (string)</strong></p><p>ISO 4217 code.</p></td></tr><tr><td><code>options</code></td><td><p><strong>Required (string)</strong></p><p>Pricing options of the target product for the subscription upgrade process. String - ';' separated list of <code>OptionValue</code> returned by <strong>getProductUpgradeOptions</strong> function. If the pricing options groups is "scale" (interval), the Options parameter should be sent like this: [option group unique code] = value — e.g. Users=7</p></td></tr></tbody></table>

### Request sample

```php
<?php

require ('PATH_TO_AUTH');

$subscriptionReference = 'YOUR_SUBSCRIPTION_REFERENCE';
$productCode = 'my_subscription_123';
$currency = 'usd';
$options = 'emailsupport;oneuser1';

$jsonRpcRequest = array (
  'method' => 'getProductUpgradeOptionsPrice',
  'params' => array($sessionID, $subscriptionReference, $productCode, $currency, $options),
  'id' => $i++,
  'jsonrpc' => '2.0'
);

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

## Response parameters

The response returns details about the upgrade price for a single product.

| Parameter                                   | Type / Description                                                                                               |
| ------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- |
| `UpgradePrice`                              | <p><strong>Object</strong></p><p>Details below.</p>                                                              |
| `UpgradePrice.BillingPrice`                 | <p><strong>Int</strong></p><p>Net billing price available for the upgrade process.</p>                           |
| `UpgradePrice.BillingGrossPrice`            | <p><strong>Int</strong></p><p>Gross billing price available for the upgrade process.</p>                         |
| `UpgradePrice.BillingCurrency`              | <p><strong>String</strong></p><p>Billing currency available for the upgrade process.</p>                         |
| `UpgradePrice.Quantity`                     | <p><strong>String</strong></p><p>Quantity available for the upgrade process.</p>                                 |
| `UpgradePrice.DisplayPrice`                 | <p><strong>Int</strong></p><p>Net display price available for the upgrade process.</p>                           |
| `UpgradePrice.DisplayGrossPrice`            | <p><strong>Int</strong></p><p>Gross display price available for the upgrade process.</p>                         |
| `UpgradePrice.DisplayCurrency`              | <p><strong>String</strong></p><p>Display currency available for the upgrade process.</p>                         |
| `UpgradePrice.Discount`                     | <p><strong>Float</strong></p><p>Applied discounts</p>                                                            |
| `UpgradePrice.DiscountedProratedPrice`      | <p><strong>Float</strong></p><p>Prorated net price for the upgrade with applied discounts</p>                    |
| `UpgradePrice.DiscountedProratedGrossPrice` | <p><strong>Float</strong></p><p>Prorated gross price for the upgrade with applied discounts</p>                  |
| `UpgradePrice.DiscountedBillingPrice`       | <p><strong>Float</strong></p><p>Net billing price available for the upgrade process with applied discounts</p>   |
| `UpgradePrice.DiscountedBillingGrossPrice`  | <p><strong>Float</strong></p><p>Gross billing price available for the upgrade process with applied discounts</p> |
| `UpgradePrice.DisplayDiscount`              | <p><strong>Float</strong></p><p>Discount displayed for the upgrade process</p>                                   |
| `UpgradePrice.DiscountedDisplayPrice`       | <p><strong>Float</strong></p><p>Net display price available for the upgrade process with applied discounts</p>   |
| `UpgradePrice.DiscountedDisplayGrossPrice`  | <p><strong>Float</strong></p><p>Gross display price available for the upgrade process with applied discounts</p> |

{% hint style="info" %}
The response returns details about the upgrade price for a single product. For multiple products, the user needs to calculate the value using the **quantity x upgradePrice** (the value from the returned response) parameters.
{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.2checkout.com/json-rpc-api-reference/json-rpc-api-6.0/api-requests/subscription-upgrade/retrieve-upgrade-price.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
