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

# Criar link

> Crie um checkout hospedado pelo AgitaPay.

Cria um checkout hospedado. O PIX só é gerado quando o pagador confirma em `/pay/{id}`. Requer `payment-links:write`.

<ParamField body="amount" type="number" required>
  Valor em reais.
</ParamField>

<ParamField body="name" type="string" required>
  Nome do link, até 120 caracteres.
</ParamField>

<ParamField body="description" type="string" required>
  Descrição, até 500 caracteres.
</ParamField>

<ParamField body="notification_url" type="string">
  HTTPS público para eventos.
</ParamField>

<ParamField body="webhook_secret" type="string">
  Opcional, 16 a 128 caracteres e somente com `notification_url`. Não volta na resposta.
</ParamField>

<RequestExample>
  ```json theme={null}
  {
    "amount": 10,
    "name": "Consultoria",
    "description": "Sessão de agosto",
    "notification_url": "https://loja.com/webhooks/agitapay",
    "webhook_secret": "segredo-do-webhook-1"
  }
  ```
</RequestExample>

<ResponseExample>
  ```json theme={null}
  {
    "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    "store": { "id": "uuid-da-loja", "name": "Padrão" },
    "name": "Consultoria",
    "description": "Sessão de agosto",
    "amount": 10,
    "currency": "BRL",
    "url": "https://agitapay.johndev.shop/pay/3fa85f64-5717-4562-b3fc-2c963f66afa6",
    "notification_url": "https://loja.com/webhooks/agitapay",
    "has_webhook_secret": true,
    "status": null,
    "payment_id": null,
    "paid_at": null,
    "created_at": "2026-09-02T16:00:00Z",
    "updated_at": "2026-09-02T16:00:00Z"
  }
  ```
</ResponseExample>

Os limites de valor seguem a política comercial da plataforma. Em links sem PIX gerado, `status` e `payment_id` são `null`.

<Note>
  A API v1 pública não expõe endpoints para atualizar ou excluir links. Faça essas ações pelo painel.
</Note>
