> ## 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.

# Integração com IA

> Contexto e prompts para integrar a API AgitaPay com assistentes de código.

Use este contexto no ChatGPT, Claude, Cursor ou outra IA. Informe sua linguagem e framework. Peça explicitamente para não inventar campos.

## Prompt geral

```text theme={null}
Você está integrando a API AgitaPay, pagamentos PIX no Brasil. REST e JSON.
Não invente campos, headers, status ou URLs.
Base staging: https://agitapay.johndev.shop/v1
Base produção: https://api.agitapay.com/v1
Auth: Authorization: Bearer agp_live_… Cada chave pertence a uma loja.
Valores em reais BRL (19.90 = R$ 19,90). IDs públicos são UUID.
Erros usam error.code, error.message e error.request_id.
POST /payments/pix e POST /withdrawals: use Idempotency-Key por loja.
Webhooks usam notification_url HTTPS; confirme o estado com GET no servidor.
Gere código na linguagem e framework informados. Use staging por padrão.
```

## Endpoints

| Recurso | Endpoints                                                                            |
| ------- | ------------------------------------------------------------------------------------ |
| Conta   | `GET /account`                                                                       |
| PIX     | `POST /payments/pix`, `GET /payments`, `GET /payments/{id}`, `POST /pix/{id}/cancel` |
| Links   | `POST /payment-links`, `GET /payment-links`, `GET /payment-links/{id}`               |
| Saldo   | `GET /balance`                                                                       |
| Saques  | `POST /withdrawals`, `GET /withdrawals`, `GET /withdrawals/{id}`                     |

## Regras que a IA deve preservar

* `customer.email`, `customer.name`, `customer.document`, `amount` e `notification_url` são obrigatórios ao criar PIX.
* `customer.document` aceita CPF ou CNPJ.
* `qrcode` é data URI PNG; `copy_paste` é o código EMV.
* Não existe header de loja: o token define a loja.
* O webhook é um aviso; confirme com GET antes de liberar produto.
* PIX recorrente, estorno, cartão e boleto estão fora da v1.
