# Update payment link status

> Enable or disable a payment link by Payment Link ID.

```yaml
openapi: 3.1.0
info:
  title: Update payment link status
  version: 1.0.0
  description: Enable or disable a payment link by Payment Link ID.
paths:
  /v1/txn/paymentLink/updateStatus:
    post:
      summary: Update payment link status
      description: Enable or disable a payment link by Payment Link ID.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                id:
                  type: string
                  description: Payment Link ID returned by [Create payment
                    link](/payments/api-reference/endpoints/create-payment-link)
                    or [List payment
                    links](/payments/api-reference/endpoints/list-payment-links).
                    Submit it as a string.
                linkStatus:
                  type: boolean
                  description: Target payment link status.
                  x-onerway-constraints:
                    - kind: values
                      text: Submit boolean `true` to enable the payment link or boolean `false` to
                        disable it; do not submit numeric `1` or `0` for this
                        update endpoint.
                merchantNo:
                  type: string
                  description: Merchant number assigned by Onerway. See
                    [Setup](/payments/get-started/setup#retrieve-your-credentials)
                    for how to obtain it.
                sign:
                  type: string
                  description: Request signature string. See [Request
                    signing](/payments/get-started/request-signing) for how to
                    generate it.
              required:
                - id
                - linkStatus
                - merchantNo
                - sign
            examples:
              enable-payment-link:
                summary: Enable payment link
                value:
                  id: payment_link_demo_202606210001
                  linkStatus: true
                  merchantNo: replace_with_merchant_no
                  sign: "{{SIGN}}"
      responses:
        "200":
          description: Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  respCode:
                    type: string
                    description: "`20000` means the status update request was processed
                      successfully. Other values are error codes. See [Response
                      codes](/payments/api-reference/response-codes)."
                  respMsg:
                    type: string
                    description: Human-readable message for the response code.
                  data:
                    type:
                      - object
                      - "null"
                    properties:
                      {}
                    description: Status update result data.
                    x-onerway-value:
                      nullable: true
                      when:
                        en: Can be `null` when the update succeeds.
                        zh: 更新成功时可为 `null`。
```
