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

# Update Payment Medium

> Update a custom settlement type.

If renaming to a name that already exists and merge=True, the payment mediums will be merged:
all payments using the old medium will be updated to use the existing one,
and the old medium will be archived. If merge=False (default), an error is returned.



## OpenAPI

````yaml put /admin/payment-mediums/update/{name}
openapi: 3.1.0
info:
  title: Decoda API
  description: External API documentation for the Decoda Health platform.
  version: '1.0'
servers: []
security: []
paths:
  /admin/payment-mediums/update/{name}:
    put:
      tags:
        - provider
        - admin
        - payment-mediums
      summary: Update Payment Medium
      description: >-
        Update a custom settlement type. Updating the name will cascade to all
        existing payments.
      operationId: update_payment_medium_admin_payment_mediums_update__name__put
      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: name
          in: path
          required: true
          schema:
            type: string
            title: Name
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PaymentMediumUpdate'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaymentMediumDetail'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    PaymentMediumUpdate:
      properties:
        name:
          anyOf:
            - type: string
              maxLength: 100
              minLength: 1
            - type: 'null'
          title: Name
          description: The name of the custom settlement type.
        isArchived:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Isarchived
          description: Whether to archive/unarchive the payment medium.
      type: object
      title: PaymentMediumUpdate
      description: Schema for updating a custom settlement type.
    PaymentMediumDetail:
      properties:
        name:
          type: string
          title: Name
          description: The name/identifier of the payment medium (primary key).
        isSystem:
          type: boolean
          title: Issystem
          description: Whether this is a system-defined payment medium (immutable).
        isArchived:
          type: boolean
          title: Isarchived
          description: Whether this payment medium is archived.
        createdDate:
          type: string
          format: date-time
          title: Createddate
          description: The date and time the payment medium was created.
        updatedDate:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Updateddate
          description: The date and time the payment medium was last updated.
      type: object
      required:
        - name
        - isSystem
        - isArchived
        - createdDate
      title: PaymentMediumDetail
      description: Schema for reading payment medium records.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError

````