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



## OpenAPI

````yaml /api-reference/commerce-v1.openapi.json get /v1/commerce/payments/{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/payments/{id}:
    get:
      tags:
        - Payments
      summary: Retrieve a payment
      operationId: retrieveCommercePayment
      parameters:
        - description: id public identifier.
          example: pay_A1b2C3d4E5f6G7h8
          in: path
          name: id
          required: true
          schema:
            example: pay_A1b2C3d4E5f6G7h8
            pattern: ^pay_[A-Za-z0-9]{16}$
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                additionalProperties: false
                properties:
                  data:
                    additionalProperties: false
                    properties:
                      activities_count:
                        type: integer
                      amount_cents:
                        type: integer
                      buyer:
                        additionalProperties: false
                        properties:
                          email:
                            nullable: true
                            type: string
                          full_name:
                            nullable: true
                            type: string
                        required:
                          - email
                          - full_name
                        type: object
                      cash_flow_at:
                        nullable: true
                        type: string
                      currency:
                        type: string
                      has_chargeback:
                        type: boolean
                      has_refund:
                        type: boolean
                      id:
                        example: pay_A1b2C3d4E5f6G7h8
                        pattern: ^pay_[A-Za-z0-9]{16}$
                        type: string
                      order:
                        additionalProperties: false
                        nullable: true
                        properties:
                          id:
                            example: ord_A1b2C3d4E5f6G7h8
                            pattern: ^ord_[A-Za-z0-9]{16}$
                            type: string
                        required:
                          - id
                        type: object
                      payment_chunks:
                        items:
                          additionalProperties: false
                          properties:
                            amount_cents:
                              type: integer
                            id:
                              example: pch_A1b2C3d4E5f6G7h8
                              pattern: ^pch_[A-Za-z0-9]{16}$
                              type: string
                            plan_type:
                              nullable: true
                              type: string
                            product:
                              additionalProperties: false
                              nullable: true
                              properties:
                                id:
                                  example: prd_A1b2C3d4E5f6G7h8
                                  pattern: ^prd_[A-Za-z0-9]{16}$
                                  type: string
                                name:
                                  type: string
                              required:
                                - id
                                - name
                              type: object
                            quantity:
                              nullable: true
                              type: integer
                            refund_deadline_at:
                              nullable: true
                              type: string
                            refund_eligibility_state:
                              type: string
                            refund_period_days:
                              nullable: true
                              type: integer
                            refundable_amount_cents:
                              type: integer
                          required:
                            - id
                            - amount_cents
                            - refund_period_days
                            - refund_deadline_at
                            - refund_eligibility_state
                            - refundable_amount_cents
                            - product
                            - quantity
                            - plan_type
                          type: object
                        type: array
                      payment_method:
                        nullable: true
                        type: string
                      payment_method_brand:
                        nullable: true
                        type: string
                      payment_method_last4:
                        nullable: true
                        type: string
                      payment_method_type:
                        nullable: true
                        type: string
                      payment_type:
                        type: string
                      refund_deadline_at:
                        nullable: true
                        type: string
                      refund_eligibility_state:
                        type: string
                      status:
                        type: string
                      total_refundable_amount_cents:
                        type: integer
                    required:
                      - id
                      - status
                      - payment_type
                      - payment_method
                      - amount_cents
                      - currency
                      - payment_method_type
                      - payment_method_last4
                      - payment_method_brand
                      - cash_flow_at
                      - has_refund
                      - has_chargeback
                      - order
                      - buyer
                      - total_refundable_amount_cents
                      - refund_deadline_at
                      - refund_eligibility_state
                      - payment_chunks
                      - activities_count
                    type: object
                required:
                  - data
                type: object
          description: Successful response
        '400':
          content:
            application/problem+json:
              examples:
                invalid_request:
                  summary: Invalid request
                  value:
                    code: invalid_request
                    detail: null
                    errors:
                      - code: missing
                        detail: 'param is missing or the value is empty: product_id'
                        param: product_id
                    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 (`cope_sk_live_*`). Clerk bearer tokens are also
        accepted when paired with `X-Cope-Business-Id`.
      scheme: bearer
      type: http

````