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

# Lists referral payments

> Returns newest-first payments logged against the referral, including
amount, payment date, check number, and any procedures the payment is
allocated to. Procedure `description` matches the portal study string
(for example `MRI Left Ankle w/contrast`).

This capability is disabled until Scan enables payment read access for
your account.




## OpenAPI

````yaml /openapi.yaml get /api/v2/referrals/{referral_id}/payments
openapi: 3.1.0
info:
  title: Scan.com API
  version: v2
  description: >
    This API provides comprehensive access to Scan.com’s core functionalities, 

    including management of referrals, patient information, authentication, body
    parts, 

    and imaging modalities. It enables seamless integration for scheduling, data
    retrieval, 

    and workflow automation within the Scan.com platform, facilitating efficient
    and secure 

    handling of medical imaging processes.
servers:
  - url: https://api.staging.scan.com
    description: Sandbox
  - url: https://api.scan.com
    description: Production
security:
  - BearerAuth: []
tags:
  - name: Courier SSO
    description: >-
      Mint a one-time Courier portal SSO URL with the same Bearer token used for
      the rest of the API.
  - name: Webhooks
    description: >-
      Outbound HTTP POST notifications sent to your api_credentials.webhook_url
      when visit or notification status changes. Configure api_credentials on
      your LawFirm, Practice, CoordinationGroup, Insurance, Employer, or
      NurseCaseManagementGroup.
  - name: Order Documents
    description: >-
      Retrieve radiology report PDFs, DICOM imaging, and invoices for orders
      visible to the authenticated group.
  - name: Locations
    description: >-
      Rank nearby imaging centers for a referral after medical safety answers
      are on file. Partners submit a preferred center; Scan books the visit.
  - name: Testing
    description: Staging-only fixture bootstrap, status advancement, and test webhooks.
  - name: FHIR
    description: >-
      Opt-in FHIR R4 read shapes for DiagnosticReport and ImagingStudy. Not a
      FHIR server.
paths:
  /api/v2/referrals/{referral_id}/payments:
    get:
      tags:
        - Referrals
      summary: Lists referral payments
      description: |
        Returns newest-first payments logged against the referral, including
        amount, payment date, check number, and any procedures the payment is
        allocated to. Procedure `description` matches the portal study string
        (for example `MRI Left Ankle w/contrast`).

        This capability is disabled until Scan enables payment read access for
        your account.
      operationId: listReferralPayments
      parameters:
        - name: referral_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
        - name: page
          in: query
          required: false
          schema:
            type: integer
            minimum: 1
            default: 1
        - name: per_page
          in: query
          required: false
          schema:
            type: integer
            minimum: 1
            default: 20
      responses:
        '200':
          description: Referral payments
          content:
            application/json:
              schema:
                type: object
                required:
                  - referral_payments
                  - meta
                properties:
                  referral_payments:
                    type: array
                    items:
                      $ref: '#/components/schemas/ReferralPayment'
                  meta:
                    type: object
                    properties:
                      current_page:
                        type: integer
                      next_page:
                        type: integer
                        nullable: true
                      prev_page:
                        type: integer
                        nullable: true
                      total_pages:
                        type: integer
                      total_count:
                        type: integer
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '500':
          $ref: '#/components/responses/InternalServerError'
      security:
        - BearerAuth: []
components:
  schemas:
    ReferralPayment:
      type: object
      description: A payment logged against a referral
      required:
        - id
        - amount
        - date
        - procedures
      properties:
        id:
          type: string
          format: uuid
        amount:
          type: number
          format: double
          description: Amount received, in dollars
          example: 10
        date:
          type: string
          format: date
          nullable: true
          description: Payment date. Null on older payments recorded without one
          example: '2026-09-01'
        check_number:
          type: string
          nullable: true
          example: '1002'
        procedures:
          type: array
          description: >
            Procedures this payment is allocated to. Empty when the payment is
            not allocated to a procedure.
          items:
            type: object
            required:
              - order_id
              - description
            properties:
              order_id:
                type: string
                format: uuid
              accession_id:
                type: string
                nullable: true
                description: Order `reference_id`
              cpt_code:
                type: string
                nullable: true
              description:
                type: string
                description: >
                  Study description as shown in the portal, for example `MRI
                  Left Ankle w/contrast`
                example: MRI Left Ankle w/contrast
    ErrorResponse:
      type: object
      properties:
        error:
          type: string
        message:
          type: string
        type:
          type: string
          example: validation_error
        code:
          type: string
          example: unprocessable_entity
        request_id:
          type: string
        documentation_url:
          type: string
        errors:
          type: array
          items:
            type: string
      required:
        - error
        - message
        - type
        - code
  responses:
    Unauthorized:
      description: Missing, expired, or wrong-environment token
      headers:
        X-Request-Id:
          $ref: '#/components/headers/RequestId'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          examples:
            unauthorized:
              value:
                error: Unauthorized
                message: Unauthorized
                type: authentication_error
                code: unauthorized
                request_id: abc-123
                documentation_url: https://docs.scan.com/guides/errors#unauthorized
            expired:
              value:
                error: API token expired
                message: API token expired
                type: authentication_error
                code: api_token_expired
                request_id: abc-123
                documentation_url: https://docs.scan.com/guides/errors#api_token_expired
    Forbidden:
      description: Endpoint is not enabled for this account
      headers:
        X-Request-Id:
          $ref: '#/components/headers/RequestId'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error: This endpoint is not enabled for your account
            message: This endpoint is not enabled for your account
            type: permission_error
            code: endpoint_not_enabled
            request_id: abc-123
            documentation_url: https://docs.scan.com/guides/errors#endpoint_not_enabled
    NotFound:
      description: Resource not found or not accessible to this account
      headers:
        X-Request-Id:
          $ref: '#/components/headers/RequestId'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error: Referral not found
            message: Referral not found
            type: not_found_error
            code: not_found
            request_id: abc-123
            documentation_url: https://docs.scan.com/guides/errors#not_found
    TooManyRequests:
      description: Sandbox request allowance exhausted
      headers:
        X-Request-Id:
          $ref: '#/components/headers/RequestId'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error: Sandbox request limit reached
            message: Sandbox request limit reached
            type: rate_limit_error
            code: sandbox_request_limit_reached
            request_id: abc-123
            documentation_url: https://docs.scan.com/guides/errors#sandbox_request_limit_reached
    InternalServerError:
      description: Unexpected internal error
      headers:
        X-Request-Id:
          $ref: '#/components/headers/RequestId'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error: Internal server error
            message: Internal server error
            type: api_error
            code: internal_error
            request_id: abc-123
            documentation_url: https://docs.scan.com/guides/errors#internal_error
  headers:
    RequestId:
      description: Correlate this response with Scan support.
      schema:
        type: string
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: >
        `Authorization: Bearer <api_token>`. Sandbox tokens come from Get API
        keys

        and allow 2,000 successful requests or 7 days. Failed 4xx/5xx responses
        do

        not consume the allowance. Production tokens are issued from the group's

        API access tab.

````