> ## 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.

# Get Subscription

> This API is used to get the created session and fetch the status.



## OpenAPI

````yaml /api-reference/subscriptions/subs.json post /subscription/v1.0/getSubscription
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/getSubscription:
    post:
      tags:
        - Subscription
      summary: Get Subscription
      description: This API is used to get the created session and fetch the status.
      operationId: getSubscription
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                subscriptionId:
                  type: string
                  description: Created subscription Id
                  example: 6a96d38dbfe555e535134d34
                referenceId:
                  type: string
                  description: >-
                    Reference ID that was passed by the partner during the
                    generation of the subscription.
                  example: ORDER-12345
              anyOf:
                - required:
                    - subscriptionId
                - required:
                    - referenceId
            example:
              subscriptionId: 67d91a2f8c4e9a0012345678
              referenceId: ORDER-12345
      responses:
        '200':
          description: Get subscription details.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/getSubscription'
components:
  schemas:
    getSubscription:
      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: Full subscription object with all the information.
  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.