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

# Edit Webhook Configuration

> Update an existing webhook configuration. Use this to rotate the event signer, change the destination endpoint, or adjust the subscribed event types.



## OpenAPI

````yaml PUT /webhook/{webhookConfigId}
openapi: 3.0.1
info:
  title: xPay API Store
  description: ''
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://api.xpaycheckout.com
security:
  - basicAuth: []
paths:
  /webhook/{webhookConfigId}:
    put:
      description: >-
        Update an existing webhook configuration. Use this to rotate the event
        signer, change the destination endpoint, or adjust the subscribed event
        types.
      parameters:
        - name: webhookConfigId
          in: path
          required: true
          schema:
            type: string
          description: Identifier of the webhook configuration to update
          example: whc_gKAi2oZN1AeU7BfV
        - $ref: '#/components/parameters/IdempotencyKey'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/create-webhook-request'
        required: true
      responses:
        '204':
          description: Webhook configuration updated successfully. No content is returned.
        '400':
          description: Invalid request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  parameters:
    IdempotencyKey:
      name: Idempotency-Key
      in: header
      required: false
      schema:
        type: string
        maxLength: 255
        pattern: ^[a-zA-Z0-9\-_:\.]+$
      description: >-
        A unique key for making the request idempotent. Must match pattern:
        `^[a-zA-Z0-9\-_:\.]+$`. See [Idempotent
        Requests](/developer-resources/idempotency) for more details.
      example: KG5LxwFBepaKHyUD
  schemas:
    create-webhook-request:
      type: object
      required:
        - eventSigner
        - endpoint
        - subscribedEventTypes
      properties:
        eventSigner:
          type: string
          description: >-
            Secret used to sign outbound webhook events. Provide a value that
            you will use to verify the signature.
          example: secret_key
        endpoint:
          type: string
          description: Public **HTTPS** URL where **xPay** should `POST` webhook events.
          example: https://your-webhook-endpoint.com/webhook
        subscribedEventTypes:
          type: array
          description: >-
            List of event types to subscribe to. Refer to [webhook
            events](/developer-resources/webhooks/events-list) for the full list
            of available events.
          items:
            type: string
          example:
            - intent.created
            - intent.success
            - intent.failed
            - intent.refunded
            - intent.checkout_opened
            - subscription.trialing
            - subscription.cycle_charged
    Error:
      required:
        - errorCode
        - errorDescription
      type: object
      properties:
        errorCode:
          type: string
          example: bad_request
        errorDescription:
          type: string
          example: Failed to read request
  securitySchemes:
    basicAuth:
      type: http
      scheme: basic

````