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

# Desativar checkout link

> Desative um checkout link criado pela API, para que ele pare de abrir.

Use o `slug` devolvido na criação do link. Só links criados pela API podem ser desativados aqui;
qualquer outro slug responde `404`. Chamar de novo num link já desativado responde `200`.

Desative o link de um pedido quando receber o primeiro `transaction.paid` dele, ou quando o carrinho
mudar e você criar um link novo. Um Pix ou boleto já emitido no link continua pagável até vencer.

Pagamentos novos no link são recusados na hora. Uma página do checkout já aberta, ou servida do cache,
ainda pode aparecer por até um minuto, mas pagar por ela falha.

Para o guia de integração, veja [Criar checkout links](https://developer.pagou.ai/pt/payments/checkout-links/create.md).


## OpenAPI

````yaml api-reference/openapi-v2.json POST /v2/checkout-links/{slug}/disable
openapi: 3.1.0
info:
  title: Pagou API - v2
  description: API for Pagou.ai Gateway
  version: 2.0.0
  contact:
    name: Support
    url: https://pagou.ai
    email: support@pagou.ai
servers:
  - url: https://api.pagou.ai
    description: Production server
  - url: https://api.sandbox.pagou.ai
    description: Sandbox server for testing
security:
  - BearerAuth: []
  - ApiKeyAuth: []
  - BasicAuth: []
paths:
  /v2/checkout-links/{slug}/disable:
    post:
      tags:
        - Checkout Links
      summary: Post Checkout Links By Slug Disable
      description: >-
        Disable a checkout link created through the API. It stops opening, and
        no new payment starts on it; a Pix or boleto already issued stays
        payable until it expires. Calling it again returns the same result.
      operationId: postCheckoutLinksBySlugDisable
      parameters:
        - schema:
            type: string
            minLength: 1
            maxLength: 255
          in: path
          name: slug
          required: true
          description: Slug returned when the link was created.
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  requestId:
                    type: string
                  data:
                    type: object
                    properties:
                      slug:
                        type: string
                      status:
                        type: string
                        enum:
                          - disabled
                    required:
                      - slug
                      - status
                    additionalProperties: false
                required:
                  - success
                  - requestId
                  - data
                additionalProperties: false
              example:
                success: true
                requestId: 0190a2b4-18a7-7de0-9a43-69b7cf261201
                data:
                  slug: string
                  status: disabled
        '404':
          description: HTTP 404 response
          content:
            application/json:
              schema:
                type: object
                properties:
                  type:
                    description: URI reference identifying the problem type.
                    type: string
                  title:
                    type: string
                    description: Short, human-readable summary of the problem.
                  status:
                    type: integer
                    minimum: -9007199254740991
                    maximum: 9007199254740991
                    description: HTTP status code.
                  detail:
                    description: Human-readable explanation specific to this occurrence.
                    type: string
                  instance:
                    description: URI reference identifying the specific occurrence.
                    type: string
                required:
                  - title
                  - status
                additionalProperties: {}
        '422':
          description: HTTP 422 response
          content:
            application/json:
              schema:
                type: object
                properties:
                  type:
                    description: URI reference identifying the problem type.
                    type: string
                  title:
                    type: string
                    description: Short, human-readable summary of the problem.
                  status:
                    type: integer
                    minimum: -9007199254740991
                    maximum: 9007199254740991
                    description: HTTP status code.
                  detail:
                    description: Human-readable explanation specific to this occurrence.
                    type: string
                  instance:
                    description: URI reference identifying the specific occurrence.
                    type: string
                required:
                  - title
                  - status
                additionalProperties: {}
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ValidationProblemDetails'
        '500':
          description: HTTP 500 response
          content:
            application/json:
              schema:
                type: object
                properties:
                  type:
                    description: URI reference identifying the problem type.
                    type: string
                  title:
                    type: string
                    description: Short, human-readable summary of the problem.
                  status:
                    type: integer
                    minimum: -9007199254740991
                    maximum: 9007199254740991
                    description: HTTP status code.
                  detail:
                    description: Human-readable explanation specific to this occurrence.
                    type: string
                  instance:
                    description: URI reference identifying the specific occurrence.
                    type: string
                required:
                  - title
                  - status
                additionalProperties: {}
        default:
          description: RFC 7807 Problem Details error response
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      security:
        - BearerAuth: []
        - ApiKeyAuth: []
        - BasicAuth: []
components:
  schemas:
    ValidationProblemDetails:
      allOf:
        - $ref: '#/components/schemas/ProblemDetails'
        - type: object
          properties:
            errors:
              type: array
              items:
                type: object
                properties:
                  field:
                    type: string
                  message:
                    type: string
                  code:
                    type: string
                additionalProperties: true
          additionalProperties: true
    ProblemDetails:
      type: object
      description: RFC 7807 Problem Details object.
      properties:
        type:
          type: string
          format: uri-reference
        title:
          type: string
        status:
          type: number
        detail:
          type: string
        instance:
          type: string
          format: uri-reference
      required:
        - type
        - title
        - status
        - detail
      additionalProperties: true
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
    ApiKeyAuth:
      type: apiKey
      in: header
      name: apiKey
    BasicAuth:
      type: http
      scheme: basic
      description: Use Basic auth with username `token` and password `x`.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.