> ## Documentation Index
> Fetch the complete documentation index at: https://api-reference.hyperswitch.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Subscription - Resume Subscription

> Resume the subscription



## OpenAPI

````yaml post /subscriptions/{subscription_id}/resume
openapi: 3.0.3
info:
  title: Hyperswitch - API Documentation
  description: >

    ## Get started


    Hyperswitch provides a collection of APIs that enable you to process and
    manage payments.

    Our APIs accept and return JSON in the HTTP body, and return standard HTTP
    response codes.


    You can consume the APIs directly using your favorite HTTP/REST library.


    We have a testing environment referred to "sandbox", which you can setup to
    test API calls without

    affecting production data.

    Currently, our sandbox environment is live while our production environment
    is under development

    and will be available soon.

    You can sign up on our Dashboard to get API keys to access Hyperswitch API.


    ### Environment


    Use the following base URLs when making requests to the APIs:


    | Environment   |  Base URL                          |

    |---------------|------------------------------------|

    | Sandbox       | <https://sandbox.hyperswitch.io>   |

    | Production    | <https://api.hyperswitch.io>       |


    ## Authentication


    When you sign up on our [dashboard](https://app.hyperswitch.io) and create a
    merchant

    account, you are given a secret key (also referred as api-key) and a
    publishable key.

    You may authenticate all API requests with Hyperswitch server by providing
    the appropriate key in

    the request Authorization header.


    | Key             | 
    Description                                                                                 
    |

    |-----------------|-----------------------------------------------------------------------------------------------|

    | api-key         | Private key. Used to authenticate all API requests from
    your merchant server                  |

    | publishable key | Unique identifier for your account. Used to authenticate
    API requests from your app's client  |


    Never share your secret api keys. Keep them guarded and secure.
  contact:
    name: Hyperswitch Support
    url: https://hyperswitch.io
    email: support.global@juspay.io
  license:
    name: Apache-2.0
  version: 0.1.0
servers:
  - url: https://sandbox.hyperswitch.io
    description: Sandbox Environment
security: []
tags:
  - name: Merchant Account
    description: Create and manage merchant accounts
  - name: Profile
    description: Create and manage profiles
  - name: Merchant Connector Account
    description: Create and manage merchant connector accounts
  - name: Payments
    description: Create and manage one-time payments, recurring payments and mandates
  - name: Refunds
    description: Create and manage refunds for successful payments
  - name: Mandates
    description: Manage mandates
  - name: Customers
    description: Create and manage customers
  - name: Payment Methods
    description: Create and manage payment methods of customers
  - name: Disputes
    description: Manage disputes
  - name: API Key
    description: Create and manage API Keys
  - name: Payouts
    description: Create and manage payouts
  - name: payment link
    description: Create payment link
  - name: Routing
    description: Create and manage routing configurations
  - name: Event
    description: Manage events
  - name: Authentication
    description: Create and manage authentication
  - name: Subscriptions
    description: Subscription management and billing endpoints
  - name: Card Issuer
    description: Create and manage card issuers
paths:
  /subscriptions/{subscription_id}/resume:
    post:
      tags:
        - Subscriptions
      summary: Subscription - Resume Subscription
      description: Resume the subscription
      operationId: Resume Subscription
      parameters:
        - name: subscription_id
          in: path
          description: The unique identifier for the subscription
          required: true
          schema:
            type: string
        - name: X-Profile-Id
          in: header
          description: Profile ID for authentication
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ResumeSubscriptionRequest'
            examples:
              Resume subscription:
                value:
                  resume_option: immediately
                  unpaid_invoices_handling: schedule_payment_collection
        required: true
      responses:
        '200':
          description: Subscription resumed successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResumeSubscriptionResponse'
        '400':
          description: Invalid resume data
        '404':
          description: Subscription not found
      security:
        - api_key: []
components:
  schemas:
    ResumeSubscriptionRequest:
      type: object
      description: Request payload for resuming a subscription.
      properties:
        resume_option:
          allOf:
            - $ref: '#/components/schemas/ResumeOption'
          nullable: true
        resume_date:
          type: string
          description: >-
            Optional date when the subscription should be resumed (if not
            provided, resumes immediately)
          nullable: true
        charges_handling:
          allOf:
            - $ref: '#/components/schemas/ChargesHandling'
          nullable: true
        unpaid_invoices_handling:
          allOf:
            - $ref: '#/components/schemas/UnpaidInvoicesHandling'
          nullable: true
    ResumeSubscriptionResponse:
      type: object
      description: Response payload returned after successfully resuming a subscription.
      required:
        - id
        - status
        - profile_id
        - merchant_id
        - customer_id
      properties:
        id:
          $ref: '#/components/schemas/SubscriptionId'
        status:
          $ref: '#/components/schemas/SubscriptionStatus'
        merchant_reference_id:
          type: string
          description: Merchant specific Unique identifier.
          nullable: true
        profile_id:
          $ref: '#/components/schemas/ProfileId'
        merchant_id:
          $ref: '#/components/schemas/MerchantId'
        customer_id:
          $ref: '#/components/schemas/CustomerId'
        next_billing_at:
          type: string
          description: Date when the subscription was resumed
          nullable: true
    ResumeOption:
      type: string
      enum:
        - immediately
        - specific_date
    ChargesHandling:
      type: string
      enum:
        - invoice_immediately
        - add_to_unbilled_charges
    UnpaidInvoicesHandling:
      type: string
      enum:
        - no_action
        - schedule_payment_collection
    SubscriptionId:
      type: string
      description: A type for subscription_id that can be used for subscription ids
    SubscriptionStatus:
      type: string
      description: |-
        Possible states of a subscription lifecycle.

        - `Created`: Subscription was created but not yet activated.
        - `Active`: Subscription is currently active.
        - `InActive`: Subscription is inactive.
        - `Pending`: Subscription is pending activation.
        - `Trial`: Subscription is in a trial period.
        - `Paused`: Subscription is paused.
        - `Unpaid`: Subscription is unpaid.
        - `Onetime`: Subscription is a one-time payment.
        - `Cancelled`: Subscription has been cancelled.
        - `Failed`: Subscription has failed.
      enum:
        - active
        - created
        - in_active
        - pending
        - trial
        - paused
        - unpaid
        - onetime
        - cancelled
        - failed
    ProfileId:
      type: string
      description: A type for profile_id that can be used for business profile ids
    MerchantId:
      type: string
      description: A type for merchant_id that can be used for merchant ids
    CustomerId:
      type: string
      description: A type for customer_id that can be used for customer ids
  securitySchemes:
    api_key:
      type: apiKey
      in: header
      name: api-key
      description: >-
        Use the API key created under your merchant account from the HyperSwitch
        dashboard. API key is used to authenticate API requests from your
        merchant server only. Don't expose this key on a website or embed it in
        a mobile application.

````