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

# Retrieve subscription (hub-scoped)



## OpenAPI

````yaml /openapi/mio-openapi.json get /api/v1/hub/{hub_id}/me/subscriptions/{sub_id}
openapi: 3.1.0
info:
  description: >-
    Production API reference for Membership.io. Use the authored guides for
    workflows and the generated endpoint pages for exact parameters and schemas.
  title: Membership.io API
  version: 0.1.0
servers:
  - description: Production
    url: https://api.member.dev
security:
  - bearerAuth: []
paths:
  /api/v1/hub/{hub_id}/me/subscriptions/{sub_id}:
    get:
      tags:
        - checkout-me
      summary: Retrieve subscription (hub-scoped)
      operationId: checkout_me.get_checkout_me_get_hub_by_hub_id_me_subscriptions_by_sub_id
      parameters:
        - in: path
          name: hub_id
          required: true
          schema:
            title: Hub Id
            type: string
        - in: path
          name: sub_id
          required: true
          schema:
            title: Sub Id
            type: string
      responses:
        '200':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/SubscriptionResponse'
          description: Successful Response
        '400':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/JsonApiErrorResponse'
          description: Validation error
        '401':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/JsonApiErrorResponse'
          description: Not authenticated
        '403':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/JsonApiErrorResponse'
          description: Forbidden
        '404':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/JsonApiErrorResponse'
          description: Resource not found
        '409':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/JsonApiErrorResponse'
          description: Conflict (duplicate)
        '422':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/JsonApiErrorResponse'
          description: Unprocessable entity
        '503':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/JsonApiErrorResponse'
          description: Stripe unavailable
      security:
        - HTTPBearer: []
components:
  schemas:
    SubscriptionResponse:
      additionalProperties: false
      properties:
        data:
          $ref: '#/components/schemas/SubscriptionResource'
      required:
        - data
      title: SubscriptionResponse
      type: object
    JsonApiErrorResponse:
      description: Error JSON:API response.
      properties:
        errors:
          items:
            $ref: '#/components/schemas/JsonApiError'
          title: Errors
          type: array
        meta:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Meta
      required:
        - errors
      title: JsonApiErrorResponse
      type: object
    SubscriptionResource:
      additionalProperties: false
      properties:
        attributes:
          $ref: '#/components/schemas/SubscriptionAttributes'
        id:
          title: Id
          type: string
        type:
          const: subscriptions
          default: subscriptions
          title: Type
          type: string
      required:
        - id
        - attributes
      title: SubscriptionResource
      type: object
    JsonApiError:
      properties:
        code:
          anyOf:
            - type: string
            - type: 'null'
          title: Code
        detail:
          anyOf:
            - type: string
            - type: 'null'
          title: Detail
        id:
          anyOf:
            - type: string
            - type: 'null'
          title: Id
        meta:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Meta
        source:
          anyOf:
            - additionalProperties:
                type: string
              type: object
            - type: 'null'
          title: Source
        status:
          title: Status
          type: string
        title:
          title: Title
          type: string
      required:
        - status
        - title
      title: JsonApiError
      type: object
    SubscriptionAttributes:
      additionalProperties: false
      properties:
        cancel_at:
          anyOf:
            - format: date-time
              type: string
            - type: 'null'
          title: Cancel At
        cancel_at_period_end:
          default: false
          title: Cancel At Period End
          type: boolean
        canceled_at:
          anyOf:
            - format: date-time
              type: string
            - type: 'null'
          title: Canceled At
        collection_paused:
          default: false
          title: Collection Paused
          type: boolean
        contact_id:
          title: Contact Id
          type: string
        created_at:
          anyOf:
            - format: date-time
              type: string
            - type: 'null'
          title: Created At
        current_period_end:
          format: date-time
          title: Current Period End
          type: string
        current_period_start:
          format: date-time
          title: Current Period Start
          type: string
        deliverables_snapshot:
          default: []
          items:
            additionalProperties: true
            type: object
          title: Deliverables Snapshot
          type: array
        external_subscription_id:
          title: External Subscription Id
          type: string
        hub_id:
          title: Hub Id
          type: string
        origin_order_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Origin Order Id
        payment_account_id:
          title: Payment Account Id
          type: string
        payment_customer_id:
          title: Payment Customer Id
          type: string
        price_id:
          title: Price Id
          type: string
        product_id:
          title: Product Id
          type: string
        source:
          default: native
          title: Source
          type: string
        status:
          title: Status
          type: string
        trial_end:
          anyOf:
            - format: date-time
              type: string
            - type: 'null'
          title: Trial End
        trial_start:
          anyOf:
            - format: date-time
              type: string
            - type: 'null'
          title: Trial Start
        updated_at:
          anyOf:
            - format: date-time
              type: string
            - type: 'null'
          title: Updated At
      required:
        - hub_id
        - contact_id
        - price_id
        - product_id
        - payment_account_id
        - payment_customer_id
        - external_subscription_id
        - status
        - current_period_start
        - current_period_end
      title: SubscriptionAttributes
      type: object
  securitySchemes:
    bearerAuth:
      bearerFormat: JWT or mio_sk API key
      description: >-
        Send platform JWTs, contact JWTs, or team API keys as `Authorization:
        Bearer <token>`.
      scheme: bearer
      type: http
    HTTPBearer:
      scheme: bearer
      type: http

````