Actualiza un plan de suscripción. Usa este método para actualizar un plan de prueba de 30 días o una suscripción a un plan flexible a un plan de compromiso anual con pagos mensuales o anuales.
La forma en que se actualiza un plan difiere según el plan y los productos. Para obtener más información, consulta la descripción en Administrar suscripciones.
Solicitud HTTP
POST https://reseller.googleapis.com/apps/reseller/v1/customers/{customerId}/subscriptions/{subscriptionId}/changePlan
Puede ser el nombre de dominio principal del cliente o su identificador único. Si cambia el nombre de dominio de un cliente, no se puede usar el nombre de dominio anterior para acceder a él, pero siempre se puede usar el identificador único del cliente (como lo muestra la API). Te recomendamos que almacenes el identificador único en tus sistemas cuando corresponda.
subscriptionId
string
Esta es una propiedad obligatoria. subscriptionId es el identificador de suscripción y es único para cada cliente. Dado que un subscriptionId cambia cuando se actualiza una suscripción, te recomendamos que no uses este ID como clave para los datos persistentes. Y puedes encontrar el subscriptionId con el método recuperar todas las suscripciones de revendedor.
Cuerpo de la solicitud
El cuerpo de la solicitud contiene una instancia de ChangePlanRequest.
Cuerpo de la respuesta
Si se ejecuta de forma correcta, el cuerpo de la respuesta contiene una instancia de Subscription.
Identifica el recurso como una solicitud de cambio de plan de suscripción. Valor: subscriptions#changePlanRequest
planName
string
La propiedad planName es obligatoria. Es el nombre del plan de pagos de la suscripción. Para obtener más información sobre los planes de pagos de Google, consulta Conceptos de la API.
Los valores posibles son los siguientes:
ANNUAL_MONTHLY_PAY: Es el plan de compromiso anual con pagos mensuales.
ANNUAL_YEARLY_PAY: Es el plan de compromiso anual con pagos anuales.
Esta es una propiedad obligatoria. La propiedad de asientos es la cantidad de licencias de asientos de usuario.
purchaseOrderId
string
Esta es una propiedad opcional. Esta información de la orden de compra (OC) es para que los revendedores la usen para el seguimiento de su empresa. Si se proporciona un valor purchaseOrderId, este aparecerá en las respuestas de la API y en la factura. La propiedad acepta hasta 80 caracteres de texto sin formato.
dealCode
string
Es un código emitido por Google (máximo 100 caracteres) para obtener precios con descuento en los planes de suscripción. El código de oferta se debe incluir en la solicitud de changePlan para recibir la tarifa con descuento. Esta propiedad es opcional. Si ya se agregó un código de oferta a una suscripción, esta propiedad se puede dejar vacía y se seguirá aplicando la tarifa con descuento existente (si no está vacía, solo proporciona el código de oferta que ya está presente en la suscripción). Si nunca se agregó un código de oferta a una suscripción y esta propiedad se deja en blanco, se aplicará el precio normal.
[null,null,["Última actualización: 2025-07-25 (UTC)"],[],[],null,["# Method: subscriptions.changePlan\n\n- [HTTP request](#body.HTTP_TEMPLATE)\n- [Path parameters](#body.PATH_PARAMETERS)\n- [Request body](#body.request_body)\n- [Response body](#body.response_body)\n- [Authorization scopes](#body.aspect)\n- [ChangePlanRequest](#ChangePlanRequest)\n - [JSON representation](#ChangePlanRequest.SCHEMA_REPRESENTATION)\n- [Try it!](#try-it)\n\nUpdates a subscription plan. Use this method to update a plan for a 30-day trial or a flexible plan subscription to an annual commitment plan with monthly or yearly payments.\n\nHow a plan is updated differs depending on the plan and the products. For more information, see the description in [manage subscriptions](https://developers.google.com/workspace/admin/reseller/v1/how-tos/manage_subscriptions#update_subscription_plan).\n\n### HTTP request\n\n`POST https://reseller.googleapis.com/apps/reseller/v1/customers/{customerId}/subscriptions/{subscriptionId}/changePlan`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Path parameters\n\n| Parameters ||\n|------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `customerId` | `string` This can be either the customer's primary domain name or the customer's unique identifier. If the domain name for a customer changes, the old domain name cannot be used to access the customer, but the customer's unique identifier (as returned by the API) can always be used. We recommend storing the unique identifier in your systems where applicable. |\n| `subscriptionId` | `string` This is a required property. The `subscriptionId` is the subscription identifier and is unique for each customer. Since a `subscriptionId` changes when a subscription is updated, we recommend to not use this ID as a key for persistent data. And the `subscriptionId` can be found using the [retrieve all reseller subscriptions](https://developers.google.com/workspace/admin/reseller/v1/how-tos/manage_subscriptions#get_all_subscriptions) method. |\n\n### Request body\n\nThe request body contains an instance of [ChangePlanRequest](/workspace/admin/reseller/reference/rest/v1/subscriptions/changePlan#ChangePlanRequest).\n\n### Response body\n\nIf successful, the response body contains an instance of [Subscription](/workspace/admin/reseller/reference/rest/v1/subscriptions#Subscription).\n\n### Authorization scopes\n\nRequires the following OAuth scope:\n\n- `https://www.googleapis.com/auth/apps.order`\n\nFor more information, see the [Authorization guide](/workspace/guides/configure-oauth-consent).\n\nChangePlanRequest\n-----------------\n\nJSON template for the subscriptions.changePlan rpc request.\n\n| JSON representation |\n|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"kind\": string, \"planName\": string, \"seats\": { object (/workspace/admin/reseller/reference/rest/v1/subscriptions#Seats) }, \"purchaseOrderId\": string, \"dealCode\": string } ``` |\n\n| Fields ||\n|-------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `kind` | `string` Identifies the resource as a subscription change plan request. Value: `subscriptions#changePlanRequest` |\n| `planName` | `string` The `planName` property is required. This is the name of the subscription's payment plan. For more information about the Google payment plans, see [API concepts](https://developers.google.com/workspace/admin/reseller/v1/how-tos/concepts.html). Possible values are: - `ANNUAL_MONTHLY_PAY` - The annual commitment plan with monthly payments **Caution:** `ANNUAL_MONTHLY_PAY` is returned as `ANNUAL` in all API responses. - `ANNUAL_YEARLY_PAY` - The annual commitment plan with yearly payments - `FLEXIBLE` - The flexible plan - `TRIAL` - The 30-day free trial plan \u003cbr /\u003e |\n| `seats` | `object (`[Seats](/workspace/admin/reseller/reference/rest/v1/subscriptions#Seats)`)` This is a required property. The seats property is the number of user seat licenses. |\n| `purchaseOrderId` | `string` This is an optional property. This purchase order (PO) information is for resellers to use for their company tracking usage. If a `purchaseOrderId` value is given it appears in the API responses and shows up in the invoice. The property accepts up to 80 plain text characters. |\n| `dealCode` | `string` Google-issued code (100 char max) for discounted pricing on subscription plans. Deal code must be included in `changePlan` request in order to receive discounted rate. This property is optional. If a deal code has already been added to a subscription, this property may be left empty and the existing discounted rate will still apply (if not empty, only provide the deal code that is already present on the subscription). If a deal code has never been added to a subscription and this property is left blank, regular pricing will apply. |"]]