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

# Retrieve a subscription



## OpenAPI

````yaml /api-reference/commerce-v1.openapi.json get /v1/commerce/subscriptions/{id}
openapi: 3.0.3
info:
  description: >-
    Public REST API for COPE vendor integrations. Authenticate with a COPE API
    key or Clerk bearer token and call the endpoints described below.
  title: COPE Public API
  version: v1
servers:
  - description: Production
    url: https://api.cope.com
security:
  - cope_sk: []
paths:
  /v1/commerce/subscriptions/{id}:
    get:
      tags:
        - Subscriptions
      summary: Retrieve a subscription
      operationId: commerce.subscriptions.retrieve
      parameters:
        - description: id public identifier.
          example: sub_A1b2C3d4E5f6G7h8
          in: path
          name: id
          required: true
          schema:
            example: sub_A1b2C3d4E5f6G7h8
            pattern: ^sub_[A-Za-z0-9]{8,32}$
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                additionalProperties: false
                properties:
                  data:
                    additionalProperties: false
                    properties:
                      amount_cents:
                        type: integer
                      cancel_at:
                        nullable: true
                        type: string
                      currency:
                        type: string
                      id:
                        example: sub_A1b2C3d4E5f6G7h8
                        pattern: ^sub_[A-Za-z0-9]{8,32}$
                        type: string
                      latest_change:
                        additionalProperties: false
                        nullable: true
                        properties:
                          effective_at:
                            nullable: true
                            type: string
                          effective_confirmed_at:
                            nullable: true
                            type: string
                          failure:
                            additionalProperties: false
                            nullable: true
                            properties:
                              code:
                                type: string
                              message:
                                type: string
                            required:
                              - code
                              - message
                            type: object
                          from:
                            additionalProperties: false
                            properties:
                              amount_cents:
                                type: integer
                              currency:
                                type: string
                              plan_id:
                                nullable: true
                                type: string
                            required:
                              - plan_id
                              - amount_cents
                              - currency
                            type: object
                          reason:
                            nullable: true
                            type: string
                          requested_by:
                            additionalProperties: false
                            properties:
                              actor_id:
                                nullable: true
                                type: string
                              actor_type:
                                nullable: true
                                type: string
                              business_id:
                                type: string
                              initiated_by:
                                type: string
                            required:
                              - initiated_by
                              - actor_type
                              - actor_id
                              - business_id
                            type: object
                          status:
                            description: >-
                              What became of the attempt. `succeeded`: it was
                              applied. `failed`: it was refused, and `failure`
                              carries the code and the message saying why —
                              nothing changed. `processing`: it is still in
                              flight.
                            enum:
                              - processing
                              - succeeded
                              - failed
                            type: string
                          subscription_id:
                            type: string
                          to:
                            additionalProperties: false
                            properties:
                              amount_cents:
                                nullable: true
                                type: integer
                              currency:
                                type: string
                              plan_id:
                                nullable: true
                                type: string
                            required:
                              - plan_id
                              - amount_cents
                              - currency
                            type: object
                          type:
                            description: >-
                              Which change was attempted: `price` for the
                              recurring amount, `plan` for a move to another
                              plan. A pause, a resume and a cancel are recorded
                              elsewhere — see the operation description.
                            enum:
                              - price
                              - plan
                            type: string
                        required:
                          - subscription_id
                          - type
                          - status
                          - effective_at
                          - effective_confirmed_at
                          - reason
                          - from
                          - to
                          - requested_by
                          - failure
                        type: object
                      next_billing_at:
                        nullable: true
                        type: string
                      paused_at:
                        nullable: true
                        type: string
                      plan:
                        additionalProperties: false
                        properties:
                          interval:
                            type: string
                          interval_count:
                            type: integer
                          name:
                            type: string
                        required:
                          - name
                          - interval
                          - interval_count
                        type: object
                      status:
                        type: string
                    required:
                      - amount_cents
                      - cancel_at
                      - currency
                      - id
                      - next_billing_at
                      - paused_at
                      - plan
                      - status
                      - latest_change
                    type: object
                required:
                  - data
                type: object
          description: Successful response
        '400':
          content:
            application/problem+json:
              examples:
                unparsable_request:
                  summary: Unparsable request
                  value:
                    code: invalid_request
                    detail: >-
                      The request could not be parsed. Check the query string
                      and the request body.
                    request_id: req_123
                    status: 400
                    title: Invalid Request
                    type: https://docs.cope.com/errors/invalid_request
              schema:
                $ref: '#/components/schemas/PublicProblemDetail'
          description: Invalid request
        '401':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/PublicProblemDetail'
          description: Missing or invalid bearer token
        '403':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/PublicProblemDetail'
          description: Bearer token is not authorized for this route
        '404':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/PublicProblemDetail'
          description: Resource not found
      security:
        - cope_sk: []
components:
  schemas:
    PublicProblemDetail:
      additionalProperties: false
      properties:
        code:
          type: string
        detail:
          nullable: true
          type: string
        errors:
          items:
            additionalProperties: false
            properties:
              code:
                type: string
              detail:
                type: string
              param:
                type: string
            required:
              - code
              - detail
            type: object
          type: array
        request_id:
          type: string
        status:
          type: integer
        title:
          type: string
        type:
          type: string
      required:
        - type
        - title
        - status
        - code
        - request_id
      type: object
  securitySchemes:
    cope_sk:
      description: >-
        Bearer credential for the public API. Vendor integrations should send a
        live COPE API key (`ck_live_*`; keys issued earlier as `cope_sk_live_*`
        keep working). Clerk bearer tokens are also accepted when paired with
        `X-Cope-Business-Id`.
      scheme: bearer
      type: http

````