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

# Update a Pay connector

> Update a generic connector by name in the authenticated organization. Both test and live connectors can be updated through the API. Omitted fields remain unchanged. Supplying config replaces the entire config; it does not merge keys. Include endpoint_url and the credentials required for the selected auth_type on every config replacement. Omitting config preserves existing credentials, allowing a mode-only update. The path name cannot be renamed. Public updates use PATCH.



## OpenAPI

````yaml /openapi/source/external/call-control/pay-connectors.json patch /pay_connectors/{name}
openapi: 3.1.0
info:
  title: Telnyx Pay Connectors API
  version: 2.0.0
  x-latency-category: responsive
  x-endpoint-cost: light
  description: >-
    Manage generic Pay connectors. This reference covers generic processor
    configuration only. Use a Telnyx API key for these endpoints; config
    authentication applies separately to requests sent to the payment processor.
  license:
    name: MIT
    url: https://opensource.org/licenses/MIT
  contact:
    email: support@telnyx.com
servers:
  - url: https://api.telnyx.com/v2
security:
  - bearerAuth: []
tags:
  - name: Pay Connectors
    description: Generic payment connector configuration.
paths:
  /pay_connectors/{name}:
    patch:
      tags:
        - Pay Connectors
      summary: Update a Pay connector
      description: >-
        Update a generic connector by name in the authenticated organization.
        Both test and live connectors can be updated through the API. Omitted
        fields remain unchanged. Supplying config replaces the entire config; it
        does not merge keys. Include endpoint_url and the credentials required
        for the selected auth_type on every config replacement. Omitting config
        preserves existing credentials, allowing a mode-only update. The path
        name cannot be renamed. Public updates use PATCH.
      operationId: updatePayConnector
      parameters:
        - name: name
          in: path
          required: true
          description: Connector name, not its UUID. URL-encode the name as a path segment.
          schema:
            type: string
            example: my-payment-connector
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateGenericPayConnectorRequest'
            examples:
              modeOnly:
                summary: Change mode without re-sending credentials
                value:
                  mode: live
              replaceConfig:
                summary: Replace all config and re-send the bearer token
                value:
                  config:
                    endpoint_url: https://processor.example.com/pay
                    auth_type: bearer
                    token: <processor-bearer-token>
                    timeout: 15000
      responses:
        '200':
          description: >-
            Updated connector after the modeOnly example, with credentials
            omitted.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PayConnectorResponse'
              example:
                data:
                  id: 550e8400-e29b-41d4-a716-446655440000
                  record_type: pay_connector
                  name: my-payment-connector
                  type: generic
                  mode: live
                  user_id: user-example
                  organization_id: organization-example
                  config:
                    endpoint_url: https://processor.example.com/pay
                    auth_type: bearer
                  created_at: '2026-10-01T12:00:00.000000Z'
                  updated_at: '2026-10-01T12:00:00.000000Z'
        '404':
          description: Connector not found in the organization.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PayConnectorErrors'
              example:
                errors:
                  - detail: Resource not found
        '422':
          description: Invalid fields or duplicate name in the organization.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PayConnectorErrors'
              example:
                errors:
                  - code: '10000'
                    title: Invalid request
                    detail: >-
                      The 'config' parameter is invalid. Please consult the
                      documentation.
                    source:
                      pointer: /config
components:
  schemas:
    UpdateGenericPayConnectorRequest:
      type: object
      description: >-
        Only type, mode and config are updated; the connector name is selected
        by the path. Omit config to preserve existing configuration and
        credentials. If supplied, send the entire replacement config including
        required credentials.
      properties:
        type:
          type: string
          enum:
            - generic
          description: Generic connector type. Omit to preserve the existing value.
        mode:
          type: string
          enum:
            - test
            - live
          description: >-
            Omit to preserve the existing mode. Use an explicit test or live
            value.
        config:
          $ref: '#/components/schemas/GenericPayConnectorConfig'
    PayConnectorResponse:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/PayConnector'
    PayConnectorErrors:
      type: object
      properties:
        errors:
          type: array
          items:
            type: object
            properties:
              code:
                type: string
                description: Telnyx error code.
              title:
                type: string
                description: Error title.
              detail:
                type: string
                description: Error detail.
              source:
                type: object
                properties:
                  pointer:
                    type: string
                    description: Invalid field pointer.
    GenericPayConnectorConfig:
      type: object
      description: >-
        Configuration for a generic connector. A config update replaces the
        complete object, not individual keys. Unknown config keys are discarded.
        Authentication credentials must be nonblank strings when required by the
        selected auth_type.
      required:
        - endpoint_url
      properties:
        endpoint_url:
          type: string
          description: >-
            HTTP or HTTPS processor URL with a host. Use HTTPS to protect
            payment data in transit.
          pattern: ^https?://\S+
          example: https://processor.example.com/pay
        auth_type:
          type: string
          description: >-
            Processor authentication, separate from the Telnyx API key. If
            omitted, validation requires basic credentials but no Basic
            Authorization header is added. Explicitly set basic or bearer to
            send its corresponding Authorization header, or none for no
            processor authentication.
          enum:
            - none
            - basic
            - bearer
        username:
          description: >-
            Nonblank string required for basic authentication. Returned in
            connector responses.
        password:
          description: >-
            Nonblank string required for basic authentication. Write-only;
            omitted from responses. Re-send when replacing a basic-auth config.
          writeOnly: true
        token:
          description: >-
            Nonblank string required for bearer authentication. Write-only;
            omitted from responses. Re-send when replacing a bearer-auth config.
          writeOnly: true
        timeout:
          type:
            - integer
            - 'null'
          minimum: 1
          maximum: 4294967295
          default: 10000
          description: >-
            Processor HTTP timeout in milliseconds. Omitted or null uses 10000;
            null is removed before storage. Not the IVR digit-gather timeout.
      oneOf:
        - title: Basic authentication (also the validation default)
          properties:
            auth_type:
              const: basic
            username:
              type: string
              description: Basic username.
              minLength: 1
              pattern: \S
            password:
              type: string
              description: Basic password.
              minLength: 1
              pattern: \S
          required:
            - username
            - password
        - title: Bearer authentication
          properties:
            auth_type:
              const: bearer
            token:
              type: string
              description: Processor bearer token.
              minLength: 1
              pattern: \S
          required:
            - auth_type
            - token
        - title: No processor authentication
          properties:
            auth_type:
              const: none
          required:
            - auth_type
    PayConnector:
      type: object
      description: >-
        Organization-owned connector. Examples and config properties here
        describe generic connectors; listing is not restricted to that type
        unless filter[type]=generic is supplied. Passwords and bearer tokens are
        omitted, not masked. Defaults for auth_type and timeout need not appear
        in stored config.
      properties:
        id:
          type: string
          description: Connector identifier.
          format: uuid
        name:
          type: string
          description: Connector name used for retrieval, update, deletion and Pay.
        record_type:
          type: string
          description: Resource type.
          enum:
            - pay_connector
        user_id:
          type: string
          description: Creating user; assigned from authentication, not request input.
        organization_id:
          type: string
          description: >-
            Owning organization; assigned from authentication, not request
            input.
        type:
          type: string
          description: >-
            Connector type; generic is covered by this reference. Other types
            may appear in unfiltered lists.
        mode:
          type: string
          enum:
            - test
            - live
          description: Configured mode.
        config:
          type: object
          description: >-
            Redacted stored configuration. Generic connector fields are shown
            here. Unknown config keys are discarded. Password and token are
            never returned.
          properties:
            endpoint_url:
              type: string
              description: >-
                HTTP or HTTPS processor URL with a host. Use HTTPS to protect
                payment data in transit.
              pattern: ^https?://\S+
              example: https://processor.example.com/pay
            auth_type:
              type: string
              description: >-
                Stored processor authentication selection. Omitted if it was not
                explicitly configured.
              enum:
                - none
                - basic
                - bearer
            username:
              description: >-
                Stored username, when supplied. Required to be a nonblank string
                for basic authentication.
            timeout:
              type: integer
              minimum: 1
              maximum: 4294967295
              description: >-
                Stored processor HTTP timeout in milliseconds. Omitted when no
                timeout was configured; the effective runtime default is 10000.
        created_at:
          type: string
          description: Creation time.
          format: date-time
        updated_at:
          type: string
          description: Last update time.
          format: date-time
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: Telnyx API key, not the processor bearer token.

````