> ## Documentation Index
> Fetch the complete documentation index at: https://docs.subotiz.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Update Subscription

> Update Subscription



## OpenAPI

````yaml openapi/v1-en.yaml POST /api/v1/subscription/{subscription_id}
openapi: 3.0.3
info:
  title: Subotiz API
  description: Subotiz OpenAPI
  version: 1.0.0
servers:
  - url: https://{api}.subotiz.com
    variables:
      api:
        default: api
security:
  - sec0: []
tags:
  - name: Subscription
    description: Subscription
  - name: Price
    description: Price
  - name: Trade
    description: Trade
  - name: Payment
    description: Payment
  - name: Checkout Session
    description: Checkout Session
  - name: Customer
    description: Customer
  - name: Customer Portal
    description: Customer Portal
paths:
  /api/v1/subscription/{subscription_id}:
    post:
      tags:
        - Subscription
      summary: Update Subscription
      description: Update Subscription
      operationId: v1-subscription-update-subscription
      parameters:
        - name: subscription_id
          in: path
          description: Subscription ID
          required: true
          schema:
            type: string
        - $ref: '#/components/parameters/HeaderRequestID'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateSubscriptionRequest'
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UpdateSubscriptionResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BaseResponse'
              example:
                code: system_error
                message: Internal server error.
components:
  parameters:
    HeaderRequestID:
      name: Request-Id
      in: header
      description: The unique identifier of the request
      required: true
      schema:
        type: string
        default: 008e3967-a1b5-48bb-be14-d5bff5092e61
  schemas:
    UpdateSubscriptionRequest:
      type: object
      properties:
        subscription_id:
          type: string
          description: Subscription ID
        merchant_id:
          type: string
          description: Merchant unique identifier
        price_id:
          type: string
          description: Target pricing ID
        effective_type:
          type: string
          description: |-
            Effective date
             - end_of_period: End of current period.
             - immediate: Immediate.
        proration:
          type: string
          description: |-
            Proration settings
             none: Do not invoice prorated amount. (The price difference is ignored and a full invoice for the new pricing will be generated at the end of the current billing cycle.)
             immediate: Invoice prorated amount immediately. (A prorated credit or charge will be invoiced based on the price difference.)
    UpdateSubscriptionResponse:
      type: object
      properties:
        code:
          type: string
          description: error code
        message:
          type: string
          description: error message
        data:
          $ref: '#/components/schemas/UpdateSubscriptionResponse_Data'
    BaseResponse:
      type: object
      properties:
        code:
          type: string
          description: error code
        message:
          type: string
          description: error message
    UpdateSubscriptionResponse_Data:
      type: object
      properties: {}
  securitySchemes:
    sec0:
      type: http
      description: >-
        Bearer API Key authentication. Format: Authorization: Bearer
        {your_api_key}
      scheme: bearer

````