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

# Atualizar link de pagamento

> Atualiza configuração de um link de pagamento.

<Note>
  **URL:** `PATCH https://api.goatpay.com.br/v1/payment-links/update/{id}` · Permissão: `payment-links/update`
</Note>

<RequestExample>
  ```bash cURL theme={null}
  curl -X PATCH 'https://api.goatpay.com.br/v1/payment-links/update/clx_link' \
    -H 'X-API-Key: gp_live_SUA_CHAVE' \
    -H 'Content-Type: application/json' \
    -d '{
      "fixedAmount": 79.90,
      "allowedMethods": ["PIX", "CARD"],
      "productIds": ["clx_product"]
    }'
  ```
</RequestExample>

### Corpo (parcial)

Mesmos campos de [criar link](/api-reference/endpoint/payment-links/create). Para só ativar/desativar, use [status](/api-reference/endpoint/payment-links/status).

Guia: [Links de pagamento](/api-reference/guides/loja#links-de-pagamento).


## OpenAPI

````yaml PATCH /payment-links/update/{id}
openapi: 3.1.0
info:
  title: GoatPay API
  description: >
    API pública merchant da GoatPay. Autenticação via header `X-API-Key:
    gp_live_...`.

    Respostas de sucesso usam o envelope `{ success, message, data, requestId
    }`.

    Campos internos (`accountId`, `metadata`, histórico de entregas de webhook,
    etc.) não são expostos.

    `providerTransactionId` aparece como `referenceId`; `providerInfractionId`
    como `infractionId`.

    Rate limit global: 100 requisições por minuto por API key (HTTP 429). Sem
    chave, limite por IP.
  version: 1.0.0
servers:
  - url: https://api.goatpay.com.br/v1
    description: Produção
security:
  - apiKeyAuth: []
tags:
  - name: pix
    description: >-
      Cobranças PIX (receber), reembolsos de depósito recebido e transferências
      PIX (enviar). Alias legado em payouts/* para envios.
  - name: transfer-internal
    description: Transferências entre contas GoatPay
  - name: transfer-scheduled
    description: Transferências programadas (agendar, repetir ou por saldo)
  - name: crypto
    description: Depósitos e transferências em criptomoeda
  - name: billings
    description: >-
      Cobranças avulsas (pagamento único) — boleto, cartão ou PIX na Conta
      Padrão (PF ou PJ)
  - name: subscriptions
    description: >-
      Assinaturas recorrentes com ciclo fixo — boleto, cartão ou PIX na Conta
      Padrão (PF ou PJ)
  - name: account
    description: Saldo e extrato
  - name: subaccount
    description: Subcontas merchant (carteiras lógicas sob a conta principal)
  - name: meds
    description: Disputas MED
  - name: webhooks
    description: Endpoints de webhook de saída
  - name: payouts
    description: Alias de transfer-pix para saques PIX
  - name: customers
    description: Clientes da loja (CRM)
  - name: products
    description: Produtos e entregas digitais
  - name: coupons
    description: Cupons de desconto para links
  - name: payment-links
    description: Links de pagamento e checkout hospedado
paths:
  /payment-links/update/{id}:
    patch:
      tags:
        - payment-links
      summary: Atualizar link de pagamento
      operationId: updatePaymentLink
      parameters:
        - $ref: '#/components/parameters/ResourceId'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreatePaymentLink'
      responses:
        '200':
          $ref: '#/components/responses/PaymentLinkSuccess'
components:
  parameters:
    ResourceId:
      name: id
      in: path
      required: true
      schema:
        type: string
      description: ID do recurso (transação, cobrança, webhook, etc.)
  schemas:
    CreatePaymentLink:
      type: object
      required:
        - name
        - slug
        - allowedMethods
      properties:
        name:
          type: string
        slug:
          type: string
        description:
          type: string
        fixedAmount:
          type: number
          minimum: 0.01
        allowedMethods:
          type: array
          minItems: 1
          items:
            type: string
            enum:
              - PIX
              - CRYPTO
        requireName:
          type: boolean
        requireDocument:
          type: boolean
        requireEmail:
          type: boolean
        requirePhone:
          type: boolean
        customerMode:
          type: string
          enum:
            - NONE
            - OPTIONAL
            - REQUIRED
        payerCoversFee:
          type: boolean
        productIds:
          type: array
          items:
            type: string
    PublicPaymentLink:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        slug:
          type: string
        publicCode:
          type: string
        fixedAmount:
          type:
            - number
            - 'null'
        allowedMethods:
          type: array
          items:
            type: string
        status:
          type: string
        payPageUrl:
          type: string
        checkoutPath:
          type: string
  responses:
    PaymentLinkSuccess:
      description: Link de pagamento.
      content:
        application/json:
          schema:
            type: object
            required:
              - success
              - message
              - data
            properties:
              success:
                type: boolean
              message:
                type: string
              data:
                $ref: '#/components/schemas/PublicPaymentLink'
              requestId:
                type: string
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
      description: Chave `gp_live_...` criada em Integrações → Chaves de API no dashboard.

````