# Service Reconfiguration

The Service Edit API Route can be used to edit the Stripe subscription of a service. Use-cases include those mentioned below:

**Reconfiguration Operation Use-cases**

```
Increase Quantity
Decrease Quantity
Change Payment Cycle
```

Service reconfiguration can be scheduled for the future. If a service reconfiguration is scheduled for the future, a SubscriptionSchedule is created to track this and is attached to the subscription.

#### Reconfiguration API Routes

There are three main API routes used in the reconfiguration process. They are as below:

<pre><code><strong>Service Reconfigure API Route
</strong>Service Reconfigure Calculate API Route
<strong>Service Reconfigure Option API Route
</strong></code></pre>

The recommended flow for a reconfiguration is described in as below:

<details>

<summary>Show Reconfiguration Options - Service Reconfigure Option API Route</summary>

Use this route and pass in a service\_id to return all the possible options reconfigure options in a list show the option constraints, for example, the maximum quantity you can increase the service at the end of the period and the minimum as well as all the different payment cycles the client can select from.

Use this route to inform/validate the UI on the options to show the customer.

</details>

<details>

<summary>Show Reconfiguration Quote - Service Reconfigure Calculate API Route</summary>

Use this route and pass in a service\_id and the reconfiguration options the customer has selected to generate information to display to the customer about the selected reconfiguration.

This information includes the new price, when the first billing event will occur and whether the billing anchor for the subscription will change. An example response structure is as below:

<pre class="language-json"><code class="lang-json">{
    "anchor_behavior": "string",
    "due": "string",
    "end_of_period": true,
    "message": "Service reconfiguration option validated and calculated.",
    "proration_behavior": "string",
<strong>    "service_price_id": "string",
</strong>    "service_quantity": 0,    
    "total": 0
}
</code></pre>

</details>

<details>

<summary>Process Reconfiguration - Service Reconfigure API Route</summary>

Once the customer has confirmed they are happy with the information presented by the Service Reconfigure Calculate API Route, you can then use the Service Reconfigure API Route to process the reconfiguration with the desired changes.

This will process the change and if the values are accepted, it will reconfigure the service immediately or create a SubscriptionSchedule will will reconfigure it at the end of the billing period.

</details>

<details>

<summary>Show Success Message / SubscriptionSchedule created - Service Reconfigure API Route Response</summary>

At this stage, you should relay the successful reconfiguration outcome to the user and either say it has been processed or it has been scheduled to be processed.

</details>


---

# 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://internal.developer.documentation.private.user.pingproxies.com/service-management/service-reconfiguration.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.
