> ## Documentation Index
> Fetch the complete documentation index at: https://docs.cope.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 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: ps_A1b2C3d4E5f6
          in: path
          name: id
          required: true
          schema:
            example: ps_A1b2C3d4E5f6
            pattern: ^ps_[A-Za-z0-9]{8,32}$
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                additionalProperties: false
                properties:
                  data:
                    additionalProperties: false
                    properties:
                      amount_cents:
                        description: The recurring amount in force, in minor units.
                        type: integer
                      business:
                        additionalProperties: false
                        description: The business that sold the subscription.
                        properties:
                          id:
                            example: biz_A1b2C3d4E5f6G7h8
                            pattern: ^biz_[A-Za-z0-9_-]{8,32}$
                            type: string
                          object:
                            enum:
                              - business
                            type: string
                        required:
                          - object
                          - id
                        type: object
                      cancel_at:
                        description: >-
                          When the cancellation takes effect, or took effect.
                          `null` when none was scheduled, and when it is not
                          recorded.
                        nullable: true
                        type: string
                      cancelled_at:
                        description: >-
                          When the cancellation was accepted, or when the
                          subscription ended for an ending nobody asked for.
                          `null` when not cancelled, and when it is not
                          recorded.
                        nullable: true
                        type: string
                      created_at:
                        type: string
                      currency:
                        type: string
                      id:
                        example: ps_A1b2C3d4E5f6
                        pattern: ^ps_[A-Za-z0-9]{8,32}$
                        type: string
                      line_item:
                        additionalProperties: false
                        description: The order line it was sold on.
                        properties:
                          id:
                            example: li_A1b2C3d4E5f6
                            pattern: ^li_[A-Za-z0-9]{8,32}$
                            type: string
                          object:
                            enum:
                              - line_item
                            type: string
                        required:
                          - object
                          - id
                        type: object
                      next_billing_at:
                        description: >-
                          The next renewal. `null` while paused, once a
                          cancellation has started, and while no renewal date is
                          known.
                        nullable: true
                        type: string
                      object:
                        enum:
                          - subscription
                        type: string
                      order:
                        additionalProperties: false
                        description: >-
                          The order it was sold in: `GET
                          /v1/commerce/orders/{id}`.
                        properties:
                          id:
                            example: ord_A1b2C3d4E5f6
                            pattern: ^ord_[A-Za-z0-9]{8,32}$
                            type: string
                          object:
                            enum:
                              - order
                            type: string
                        required:
                          - object
                          - id
                        type: object
                      paused_at:
                        description: '`null` unless `paused`.'
                        nullable: true
                        type: string
                      pending_change:
                        additionalProperties: false
                        description: >-
                          A price or plan change waiting for the next renewal:
                          present until a renewal bills its terms, on every
                          payment method. `null` when none is waiting and once a
                          cancellation has started. A renewal that bills nothing
                          (a 100% discount) does not count, so the change stays
                          pending until a paid renewal bills it.
                        nullable: true
                        properties:
                          amount_cents:
                            type: integer
                          effective_at:
                            description: >-
                              The next renewal, which is when it takes effect.
                              `null` while paused.
                            nullable: true
                            type: string
                          plan:
                            additionalProperties: false
                            properties:
                              id:
                                description: >-
                                  The id of the plan these terms were sold on or
                                  switched to. `null` when no recorded fact
                                  names the plan — for example, a subscription
                                  sold through an offer, a plan since deleted
                                  from the product, or one sold before plans
                                  were recorded.
                                example: plan_A1b2C3d4
                                nullable: true
                                pattern: ^plan_[A-Za-z0-9]{8,32}$
                                type: string
                              interval:
                                type: string
                              interval_count:
                                type: integer
                              name:
                                nullable: true
                                type: string
                              object:
                                enum:
                                  - payment_plan
                                type: string
                            required:
                              - object
                              - id
                              - name
                              - interval
                              - interval_count
                            type: object
                          type:
                            enum:
                              - price
                              - plan
                            type: string
                        required:
                          - type
                          - amount_cents
                          - plan
                          - effective_at
                        type: object
                      plan:
                        additionalProperties: false
                        description: The plan in force for the period already billed.
                        properties:
                          id:
                            description: >-
                              The id of the plan these terms were sold on or
                              switched to. `null` when no recorded fact names
                              the plan — for example, a subscription sold
                              through an offer, a plan since deleted from the
                              product, or one sold before plans were recorded.
                            example: plan_A1b2C3d4
                            nullable: true
                            pattern: ^plan_[A-Za-z0-9]{8,32}$
                            type: string
                          interval:
                            type: string
                          interval_count:
                            type: integer
                          name:
                            nullable: true
                            type: string
                          object:
                            enum:
                              - payment_plan
                            type: string
                        required:
                          - object
                          - id
                          - name
                          - interval
                          - interval_count
                        type: object
                      status:
                        description: >-
                          `canceling` means a cancellation was accepted and has
                          not taken effect; it becomes `cancelled` when the
                          subscription ends.
                        enum:
                          - pending
                          - trial
                          - active
                          - overdue
                          - paused
                          - canceling
                          - cancelled
                        type: string
                    required:
                      - id
                      - object
                      - status
                      - business
                      - order
                      - line_item
                      - plan
                      - amount_cents
                      - currency
                      - next_billing_at
                      - paused_at
                      - cancel_at
                      - cancelled_at
                      - created_at
                      - pending_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: a live COPE API key (`ck_live_*`;
        keys issued earlier as `cope_sk_live_*` keep working). Dashboard sign-in
        tokens are not accepted.
      scheme: bearer
      type: http

````