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

# Get subscription

> Developer API operation for GET /dev/v1/subscriptions/{id}.



## OpenAPI

````yaml /openapi.json get /dev/v1/subscriptions/{id}
openapi: 3.0.3
info:
  title: Shoppex Developer API
  description: Mintlify-compatible Developer API reference for Shoppex.
  version: 1.0.0
  contact:
    name: Shoppex Support
    email: support@shoppex.io
    url: https://shoppex.io
servers:
  - url: https://api.shoppex.io
security:
  - bearerAuth: []
paths:
  /dev/v1/subscriptions/{id}:
    get:
      tags:
        - Subscriptions
      summary: Get subscription
      description: Developer API operation for GET /dev/v1/subscriptions/{id}.
      operationId: getDevV1SubscriptionsById
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Response for status 200
          content:
            application/json:
              schema:
                type: object
                required:
                  - data
                properties:
                  data:
                    type: object
                    required:
                      - id
                      - shop_id
                      - product_id
                      - product
                      - uniqid
                      - status
                      - gateway
                      - origin
                      - custom_fields
                      - customer_id
                      - payment_link_id
                      - stripe_subscription_id
                      - paypal_subscription_id
                      - coupon_id
                      - current_period_start
                      - current_period_end
                      - trial_end
                      - cancel_at_period_end
                      - renewal_invoice_created
                      - trial_period_ending_email_sent
                      - upcoming_email_1_week_sent
                      - status_details
                      - cancel_reason_id
                      - cancel_reason_comment
                      - created_at
                      - updated_at
                      - canceled_at
                      - invoices
                    properties:
                      id:
                        type: string
                      shop_id:
                        type: string
                      product_id:
                        type: string
                        nullable: true
                      product:
                        type: object
                        nullable: true
                        required:
                          - id
                          - uniqid
                          - title
                          - type
                          - subtype
                          - price
                          - price_display
                          - currency
                        properties:
                          id:
                            type: string
                          uniqid:
                            type: string
                          title:
                            type: string
                          type:
                            type: string
                          subtype:
                            type: string
                            nullable: true
                          price:
                            type: number
                          price_display:
                            type: number
                          currency:
                            type: string
                        additionalProperties: true
                      uniqid:
                        type: string
                      status:
                        type: string
                      gateway:
                        type: string
                      origin:
                        type: string
                        nullable: true
                      custom_fields:
                        nullable: true
                      customer_id:
                        type: string
                      payment_link_id:
                        type: string
                        nullable: true
                      stripe_subscription_id:
                        type: string
                        nullable: true
                      paypal_subscription_id:
                        type: string
                        nullable: true
                      coupon_id:
                        type: string
                        nullable: true
                      current_period_start:
                        type: number
                        nullable: true
                      current_period_end:
                        type: number
                        nullable: true
                      trial_end:
                        type: number
                        nullable: true
                      cancel_at_period_end:
                        type: boolean
                      renewal_invoice_created:
                        type: boolean
                      trial_period_ending_email_sent:
                        type: boolean
                      upcoming_email_1_week_sent:
                        type: boolean
                      status_details:
                        type: string
                        nullable: true
                      cancel_reason_id:
                        type: string
                        nullable: true
                      cancel_reason_comment:
                        type: string
                        nullable: true
                      created_at:
                        type: number
                      updated_at:
                        type: number
                        nullable: true
                      canceled_at:
                        type: number
                        nullable: true
                      invoices:
                        type: array
                        items:
                          type: object
                          required:
                            - id
                            - uniqid
                            - shop_id
                            - product_id
                            - gateway
                            - quantity
                            - items
                            - coupon_id
                            - status
                            - status_details
                            - currency
                            - total
                            - total_display
                            - exchange_rate
                            - crypto_exchange_rate
                            - discount
                            - created_at
                            - updated_at
                          properties:
                            id:
                              type: string
                            uniqid:
                              type: string
                            shop_id:
                              type: string
                            product_id:
                              type: string
                              nullable: true
                            gateway:
                              type: string
                              nullable: true
                            quantity:
                              type: number
                            items:
                              type: array
                              items:
                                type: object
                                required:
                                  - product_id
                                  - product_title
                                  - product_type
                                  - variant_title
                                  - quantity
                                  - unit_price
                                  - total
                                properties:
                                  product_id:
                                    type: string
                                    nullable: true
                                  product_title:
                                    type: string
                                  product_type:
                                    type: string
                                  variant_title:
                                    type: string
                                    nullable: true
                                  quantity:
                                    type: number
                                  unit_price:
                                    type: number
                                  total:
                                    type: number
                                additionalProperties: true
                            coupon_id:
                              type: string
                              nullable: true
                            status:
                              type: string
                            status_details:
                              type: string
                              nullable: true
                            currency:
                              type: string
                            total:
                              type: number
                            total_display:
                              type: number
                            exchange_rate:
                              type: number
                            crypto_exchange_rate:
                              type: number
                            discount:
                              type: number
                            created_at:
                              type: number
                              nullable: true
                            updated_at:
                              type: number
                              nullable: true
                          additionalProperties: true
                    additionalProperties: true
                additionalProperties: true
                example:
                  data:
                    id: sub_1
                    shop_id: shop_1
                    product_id: prod_membership
                    product:
                      id: prod_membership
                      uniqid: prod_public_membership
                      title: Pro Membership
                      type: SUBSCRIPTION
                      subtype: MONTHLY
                      price: 19.99
                      price_display: 19.99
                      currency: USD
                    uniqid: sub_public_1
                    status: ACTIVE
                    gateway: STRIPE
                    origin: null
                    custom_fields:
                      plan: pro
                    customer_id: cus_1
                    payment_link_id: null
                    stripe_subscription_id: sub_stripe_1
                    paypal_subscription_id: null
                    coupon_id: null
                    current_period_start: 1711510800
                    current_period_end: 1714102800
                    trial_end: null
                    renewal_invoice_created: false
                    trial_period_ending_email_sent: false
                    upcoming_email_1_week_sent: false
                    status_details: null
                    cancel_reason_id: null
                    cancel_reason_comment: null
                    created_at: 1711510800
                    updated_at: 1711510860
                    canceled_at: null
                    invoices:
                      - id: inv_sub_1
                        uniqid: 44444444-4444-4444-8444-444444444444
                        shop_id: shop_1
                        product_id: prod_membership
                        gateway: STRIPE
                        quantity: 1
                        items:
                          - product_id: prod_membership
                            product_title: Pro Membership
                            product_type: SUBSCRIPTION
                            variant_title: null
                            quantity: 1
                            unit_price: 19.99
                            total: 19.99
                        coupon_id: null
                        status: PAID
                        status_details: null
                        currency: USD
                        total: 19.99
                        total_display: 19.99
                        exchange_rate: 1
                        crypto_exchange_rate: 0
                        discount: 0
                        created_at: 1711510800
                        updated_at: 1711510860
        '401':
          description: Response for status 401
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: object
                    required:
                      - code
                      - message
                      - doc_url
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                      doc_url:
                        type: string
                      details:
                        type: array
                        items:
                          type: object
                          required:
                            - field
                            - message
                          properties:
                            field:
                              type: string
                            message:
                              type: string
                          additionalProperties: true
                      subcode:
                        type: string
                    additionalProperties: true
                additionalProperties: true
        '403':
          description: Response for status 403
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: object
                    required:
                      - code
                      - message
                      - doc_url
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                      doc_url:
                        type: string
                      details:
                        type: array
                        items:
                          type: object
                          required:
                            - field
                            - message
                          properties:
                            field:
                              type: string
                            message:
                              type: string
                          additionalProperties: true
                      subcode:
                        type: string
                    additionalProperties: true
                additionalProperties: true
        '404':
          description: Response for status 404
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: object
                    required:
                      - code
                      - message
                      - doc_url
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                      doc_url:
                        type: string
                      details:
                        type: array
                        items:
                          type: object
                          required:
                            - field
                            - message
                          properties:
                            field:
                              type: string
                            message:
                              type: string
                          additionalProperties: true
                      subcode:
                        type: string
                    additionalProperties: true
                additionalProperties: true
        '422':
          description: Response for status 422
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: object
                    required:
                      - code
                      - message
                      - doc_url
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                      doc_url:
                        type: string
                      details:
                        type: array
                        items:
                          type: object
                          required:
                            - field
                            - message
                          properties:
                            field:
                              type: string
                            message:
                              type: string
                          additionalProperties: true
                      subcode:
                        type: string
                    additionalProperties: true
                additionalProperties: true
        '429':
          description: Response for status 429
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: object
                    required:
                      - code
                      - message
                      - doc_url
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                      doc_url:
                        type: string
                      details:
                        type: array
                        items:
                          type: object
                          required:
                            - field
                            - message
                          properties:
                            field:
                              type: string
                            message:
                              type: string
                          additionalProperties: true
                      subcode:
                        type: string
                    additionalProperties: true
                additionalProperties: true
        '500':
          description: Response for status 500
          content:
            application/json:
              schema:
                anyOf:
                  - type: object
                    required:
                      - error
                    properties:
                      error:
                        type: object
                        required:
                          - code
                          - message
                          - doc_url
                        properties:
                          code:
                            type: string
                          message:
                            type: string
                          doc_url:
                            type: string
                          details:
                            type: array
                            items:
                              type: object
                              required:
                                - field
                                - message
                              properties:
                                field:
                                  type: string
                                message:
                                  type: string
                              additionalProperties: true
                          subcode:
                            type: string
                        additionalProperties: true
                    additionalProperties: true
                  - type: object
                    required:
                      - status
                      - data
                      - error
                      - message
                      - log
                      - env
                    properties:
                      status:
                        type: integer
                      data:
                        nullable: true
                      error:
                        type: string
                      message:
                        type: string
                        nullable: true
                      log:
                        nullable: true
                      env:
                        type: string
                    additionalProperties: true
      deprecated: false
      security:
        - bearerAuth: []
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: Use your Shoppex API key in the Authorization header.

````