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

# Transfer Patient Credit

> Move part of a patient's credit balance onto another patient.

Locks the source PatientCredit, validates active + sufficient remaining +
distinct/existing recipient, decrements the source (deactivates at 0),
creates a new PatientCredit on the recipient, and writes a
``PatientCreditTransfer`` audit row. No money moves in or out of the
merchant — internal balance move only.



## OpenAPI

````yaml post /user/patient/credit/{source_credit_id}/transfer
openapi: 3.1.0
info:
  title: Decoda API
  description: External API documentation for the Decoda Health platform.
  version: '1.0'
servers: []
security: []
paths:
  /user/patient/credit/{source_credit_id}/transfer:
    post:
      tags:
        - Patient Credit
      summary: Transfer Patient Credit
      description: >-
        Move part of a patient's credit balance onto another patient.


        Locks the source PatientCredit, validates active + sufficient remaining
        +

        distinct/existing recipient, decrements the source (deactivates at 0),

        creates a new PatientCredit on the recipient, and writes a

        ``PatientCreditTransfer`` audit row. No money moves in or out of the

        merchant — internal balance move only.
      operationId: >-
        transfer_patient_credit_user_patient_credit__source_credit_id__transfer_post
      parameters:
        - name: TENANT
          in: header
          required: true
          schema:
            type: string
            title: Tenant
          description: The tenant you are making this request on behalf of
        - name: API-KEY
          in: header
          required: true
          schema:
            type: string
            title: Api-Key
          description: Your api key
        - name: source_credit_id
          in: path
          required: true
          schema:
            type: string
            title: Source Credit Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TransferPatientCreditRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PatientCreditTransfer'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    TransferPatientCreditRequest:
      properties:
        toPatientId:
          type: string
          title: Topatientid
          description: Patient who should receive the transferred credit
        amount:
          type: integer
          exclusiveMinimum: 0
          title: Amount
          description: How much credit to move, in cents (must be > 0)
        reason:
          $ref: '#/components/schemas/PatientCreditTransferReason'
          description: Why the transfer is being made
        note:
          anyOf:
            - type: string
              maxLength: 1000
            - type: 'null'
          title: Note
          description: Optional internal note explaining the transfer
      type: object
      required:
        - toPatientId
        - amount
        - reason
      title: TransferPatientCreditRequest
      description: >-
        Input schema for POST
        /billing/patient-credit/{source_credit_id}/transfer.
    PatientCreditTransfer:
      properties:
        id:
          type: string
          title: Id
          description: Unique identifier for the transfer
        sourceCreditId:
          type: string
          title: Sourcecreditid
          description: PatientCredit the balance was taken from
        destinationCreditId:
          type: string
          title: Destinationcreditid
          description: Newly-created PatientCredit the balance landed on
        fromPatientId:
          type: string
          title: Frompatientid
          description: Patient the source credit belonged to
        fromPatientName:
          anyOf:
            - type: string
            - type: 'null'
          title: Frompatientname
          description: Display name of the sending patient
        toPatientId:
          type: string
          title: Topatientid
          description: Patient who received the new credit
        toPatientName:
          anyOf:
            - type: string
            - type: 'null'
          title: Topatientname
          description: Display name of the receiving patient
        amount:
          type: integer
          title: Amount
          description: How much was moved, in cents
        reason:
          $ref: '#/components/schemas/PatientCreditTransferReason'
          description: Why the transfer was made
        note:
          anyOf:
            - type: string
            - type: 'null'
          title: Note
          description: Optional internal note from the staff member
        creatorId:
          type: string
          title: Creatorid
          description: User who recorded the transfer
        creatorName:
          anyOf:
            - type: string
            - type: 'null'
          title: Creatorname
          description: Display name of the user who recorded the transfer
        createdDate:
          type: string
          format: date-time
          title: Createddate
          description: When the transfer was recorded
      type: object
      required:
        - id
        - sourceCreditId
        - destinationCreditId
        - fromPatientId
        - toPatientId
        - amount
        - reason
        - creatorId
        - createdDate
      title: PatientCreditTransfer
      description: Serialized patient-credit-transfer audit row. Amounts in CENTS.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    PatientCreditTransferReason:
      type: string
      enum:
        - GIFT
        - FAMILY_SHARE
        - ACCOUNT_MERGE
        - CORRECTION
        - OTHER
      title: PatientCreditTransferReason
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError

````