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

# Update Subscription Summary

> This API is used to get the summary of what changes will be there on updating a subscription. This API does not update the subscription but creates the summary for the customer.



## OpenAPI

````yaml /api-reference/subscriptions/subs.json post /subscription/v1.0/updateSubscriptionSummary
openapi: 3.0.3
info:
  title: Subscription API
  description: API for creating and managing subscription sessions and payments.
  version: 1.0.0
servers:
  - url: https://sandbox-api.transactbridge.com
    description: Sandbox Environment
  - url: https://api.transactbridge.com
    description: Production Environment
security:
  - ApiKeyAuth: []
    SignatureAuth: []
paths:
  /subscription/v1.0/updateSubscriptionSummary:
    post:
      tags:
        - Subscription
      summary: Update Subscription Summary
      description: >-
        This API is used to get the summary of what changes will be there on
        updating a subscription. This API does not update the subscription but
        creates the summary for the customer.
      operationId: UpdateSubscriptionSummary
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                subscriptionId:
                  type: string
                  format: MongoId
                  description: >-
                    Subscription Id of the subscription for which update is
                    needed.
                  example: 65a1b2c3d4e5f67890123456
                items:
                  type: array
                  description: Items the customer wants to buy.
                  items:
                    type: object
                    required:
                      - name
                      - quantity
                      - amount
                    properties:
                      productReferenceId:
                        type: string
                        description: >-
                          If the product is already created, use the referenceId
                          of that product.
                        example: PROD-10001
                      name:
                        type: string
                        description: Name of the product the customer wants to buy.
                        example: Premium Plan
                      quantity:
                        type: number
                        description: Number of products the customer wants to buy.
                        example: 1
                      amount:
                        type: number
                        description: Price of the product.
                        example: 2000
                      prorate:
                        type: number
                        description: >-
                          If the invoice needs to be partially paid, the total
                          amount will be calculated using prorate on a
                          day-consumed basis.
                        example: 0.5
                      description:
                        type: string
                        description: |-
                          Description of the product.
                            Description in the items object allows HTML syntax for customer view. Use html syntax for code break so that the description on the product page is better from a UI perspective. We break and show the description like unlisted items.
                        example: Monthly premium subscription plan
                      productId:
                        type: string
                        format: MongoId
                        description: >-
                          If product is already in the catelogue, Partner can
                          use that
                  required:
                    - productReferenceId
                    - name
                    - quantity
                    - amount
                billTo:
                  type: object
                  required:
                    - postalCode
                  description: Billing Details of the customer.
                  properties:
                    name:
                      type: string
                      description: Name of the customer.
                      example: John Doe
                    line1:
                      type: string
                      description: Address Line 1 of the customer.
                      example: 123 Main Street
                    line2:
                      type: string
                      description: Address Line 2 of the customer.
                      example: Apartment 4B
                    city:
                      type: string
                      description: City of the customer.
                      example: Mumbai
                    state:
                      type: string
                      description: State of the customer address.
                      example: Maharashtra
                    country:
                      type: string
                      description: >-
                        Country of the customer.[Enum for
                        country](/api-reference/validators-and-enum)
                    postalCode:
                      type: string
                      description: Pin code of the customer.
                      example: '400001'
                reAttemptConfig:
                  type: array
                  description: >-
                    To configure how the reattempt for failed invoices be
                    processed.
                  items:
                    type: object
                    properties:
                      days:
                        type: string
                        description: >-
                          Number of days after which the reattempt is to be
                          made.
                        example: '3'
                      attemptType:
                        type: string
                        description: >-
                          Depending on the enum passed, the post-reattempt flow
                          is configured.
                        enum:
                          - try_again
                          - subscription_active-invoice_unpaid
                          - subscription_paused-invoice_unpaid
                          - subscription_expire-invoice_unpaid
                          - subscription_expire-invoice_cancelled
                        example: try_again
                    required:
                      - days
                      - attemptType
                  example:
                    - days: '3'
                      attemptType: try_again
                meta:
                  type: object
                  description: To update meta params in the subscription.
                  properties:
                    param1:
                      type: string
                      maxLength: 256
                      example: ORDER-10001
                    param2:
                      type: string
                      maxLength: 256
                      example: website
                    param3:
                      type: string
                      maxLength: 256
                      example: campaign-2026
                  example:
                    param1: ORDER-10001
                    param2: website
                    param3: campaign-2026
                couponDetails:
                  type: object
                  required:
                    - coupon
                    - applicable
                    - discountType
                    - durationType
                  description: >-
                    To apply a coupon on the update Subscription. Only
                    applicable if the subscription requires a new mandate setup
                    to activate.
                  properties:
                    coupon:
                      type: string
                      description: Coupon code.
                      example: SAVE10
                    applicable:
                      type: boolean
                      description: Indicates whether the coupon is applicable.
                      example: true
                    discountType:
                      type: string
                      description: >-
                        Discount can be percentage based on the invoice value or
                        flat.
                      enum:
                        - PCNT
                        - FIX
                      example: PCNT
                    discountPcnt:
                      type: string
                      description: >-
                        Percentage discount. Mandatory when discountType is
                        PCNT.
                      example: '10'
                    discountQuoteAmount:
                      type: string
                      description: >-
                        Fixed discount amount. Mandatory when discountType is
                        FIX.
                      example: '300'
                    durationType:
                      type: string
                      description: >-
                        The duration for which this coupon will be applicable on
                        the subscription.
                      enum:
                        - LIMITED_PERIOD
                        - FOREVER
                        - ONETIME
                      example: LIMITED_PERIOD
                    periodUnit:
                      type: string
                      description: >-
                        Unit of the coupon period. Mandatory when durationType
                        is LIMITED_PERIOD.
                      enum:
                        - DAIL
                        - WEEK
                        - MNTH
                        - BIMN
                        - QURT
                        - MIAN
                        - YEAR
                        - ONDM
                      example: MNTH
                    period:
                      type: number
                      description: >-
                        Coupon duration. Mandatory when durationType is
                        LIMITED_PERIOD.
                      example: 3
                  example:
                    coupon: SAVE10
                    applicable: true
                    discountType: PCNT
                    discountPcnt: '10'
                    discountQuoteAmount: '300'
                    durationType: LIMITED_PERIOD
                    periodUnit: MNTH
                    period: 3
                frequency:
                  type: string
                  enum:
                    - DAIL
                    - WEEK
                    - MNTH
                    - BIMN
                    - QURT
                    - MIAN
                    - YEAR
                    - ONDM
                  description: >-
                    To update the frequency of a subscription. Only prepaid
                    subscriptions are allowed for frequency update.
                  example: MNTH
                maxUnpausedInvoiceDueCount:
                  type: string
                  description: >-
                    Maximum number of unpaid invoices count allowed after that
                    the subscription is PAUSED by the system. For example, if a
                    subscription has been paused due to 3 non-payment of
                    invoices and this parameter is set to 2, then once the
                    customer pays 1 invoice the subscription will be
                    reactivated.
                  example: 2
                maxQuoteAmount:
                  type: string
                  description: >-
                    Amount that can be auto-debited from the customer using the
                    existing mandate. Increasing this parameter might require a
                    new mandate setup.
                  example: 15000
              required:
                - subscriptionId
            example:
              subscriptionId: 65a1b2c3d4e5f67890123456
              items:
                - productReferenceId: PROD-10001
                  name: Premium Plan
                  quantity: 1
                  amount: 2000
                  prorate: 0.5
                  description: Monthly premium subscription plan
              billTo:
                name: John Doe
                line1: 123 Main Street
                line2: Apartment 4B
                city: Mumbai
                state: Maharashtra
                country: IN
                postalCode: '400001'
              reAttemptConfig:
                - days: '3'
                  attemptType: try_again
              meta:
                param1: ORDER-10001
                param2: website
                param3: campaign-2026
              couponDetails:
                coupon: SAVE10
                applicable: true
                discountType: PCNT
                discountPcnt: '10'
                durationType: LIMITED_PERIOD
                periodUnit: MNTH
                period: 3
              frequency: MNTH
              maxUnpausedInvoiceDueCount: 2
              maxQuoteAmount: 15000
      responses:
        '200':
          description: Contains the updated subscription details.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/updateSubscription'
components:
  schemas:
    updateSubscription:
      type: object
      properties:
        status:
          type: string
          description: The response from the API
        sub_status:
          type: string
          description: Used for internal purposes only
        data:
          type: object
          description: Contains the updated subscription details.
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: Merchant API Key
    SignatureAuth:
      type: apiKey
      in: header
      name: x-signature
      description: Generated request signature

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.