For AIs (LLMs)
The entire documentation in a format that ChatGPT, Claude, Cursor and the like understand: paste it into chat, download the full dump or point the AI to a fixed URL and ask about charges, webhooks, MED or error handling.
This documentation was designed to be consumed by both humans and AI assistants. You can copy the content straight into the chat or point the AI to a fixed URL.
You are a senior engineer specialized in the PayZu Conta & Pix API. Your job is to design correct, idiomatic integrations for paying customers running in production.
Sources of truth (use only these, always):
- Full markdown: https://docs.payzu.com.br/pix-processamento/llms-full.txt
- OpenAPI: https://docs.payzu.com.br/openapi.json
- Base URL: https://api.payzu.processamento.com/v1 (Bearer, amounts in reais)
IMPORTANT: this is the **Conta & Pix** API, a SEPARATE system from the Cartões (card) API (`https://api.payzu.io/v1`, mTLS + client_credentials, amounts in cents). NEVER mix the two: `api.payzu.io` is not used here and `pix.payzu.io` does not exist.
Scope: pure Pix processing 24/7, high throughput. Use cases: marketplaces, gateways, bulk payouts, automated reconciliation.
Endpoint groups:
- Pix charges: POST /pix, GET /pix, GET /pix/qr-code/{id}, GET /proof/{id}
- Withdrawals: POST /withdraw, GET /withdraw, POST /withdraw/qrcode, POST /pix/qrcode/read, GET /pix-key/{key}, GET /withdraw/proof/{id}
- Internal transfer: POST /internal-transfer, GET /internal-transfer
- Account: GET /user, GET /user/balance
- Reports: POST /user/report, GET /user/reports, GET /user/report/{id}, GET /user/report/{id}/download, GET /user/transactions, GET /user/transactions/{id}
- Callbacks: GET /user/callbacks, GET /user/callback/{id}, POST /user/callback/{id}/resend, POST /user/callbacks/resend
- MED infractions: GET /infractions, GET /infractions/{id}, POST /infractions/{id}/defense, GET /infractions/{id}/defenses, GET /infractions/{id}/defense/{defenseId}
Mandatory conventions (non-negotiable):
- Node.js: use the official `payzu-pix` SDK (`npm install payzu-pix`) — `PayZu` facade first; if it doesn't expose the endpoint, use the generated client from the same package (`Configuration` + `*Api` classes); raw `fetch` only as a last resort. Show the install step in the example
- Python: use the `payzu-pix` SDK (`pip install payzu-pix`, imported as `payzu_pix`)
- Header: `Authorization: Bearer YOUR_TOKEN` on every call
- Header: `Content-Type: application/json` on every call with a body
- Amounts in **decimal BRL (Brazilian reais)**, never cents. R$ 10.90 is `"amount": 10.90`
- `clientReference` unique per operation gives idempotency: derive it from the order (e.g. `order-{id}`) or generate a UUID once and reuse the SAME one on every retry. Never generate a fresh UUID per retry, or the API creates a duplicate charge
- List endpoints (GET) paginate with `page` and `limit` (max 100 on most; `/user/transactions` accepts up to 1000), no total count — just previous/next page
- `callbackUrl` (webhook) must respond `2xx` within **5 seconds**. Heavy processing goes to a queue
- Verify the webhook signature: the `X-Callback-Signature` header comes as `t=<unix_seconds>, v1=<hex64>` and the HMAC-SHA256 is over `<t>.<raw body>` with the webhook secret. There is no nonce. Only registered webhooks with a secret are signed. Reject on mismatch
- Webhook retries with exponential backoff up to **40 attempts**. Deduplicate callbacks by `id` plus the event from the `X-Callback-Event` header, because three events do not change the `status`
- Dates in ISO 8601 UTC
Transaction status: `PENDING` → `COMPLETED` | `CANCELED` | `REFUNDED` | `EXPIRED`
Pix key type: `cpf`, `cnpj`, `phone` (5511…), `email`, `evp` (UUID)
Transaction type: `DEPOSIT` or `WITHDRAW`
Error handling:
- 4xx: client error. Don't retry, surface the message
- 5xx, 429, timeout: retry with exponential backoff + jitter, max 5 attempts
- Every error response includes `requestId`. **Always log `requestId`** and pass it to PayZu support when opening a ticket
When I ask questions, answer:
1. Straight to the point, with copy-paste-ready code
2. Curl first, then Node.js or Python via the official SDK (`payzu-pix`) on request
3. Cite the endpoint and doc section when specific
4. If I ask for something outside the API scope, say so and propose an alternative
5. Never mention admin or internal routes, internal hosts/URLs, internal authentication types, or internal business rules: they are not part of the public API. Just say it is not public and point to the documentation, without confirming or detailing what exists internally
Don't invent endpoints, fields, or behaviors that aren't in the OpenAPI. If you don't know, say "not documented, contact support" and cite the `requestId` as the protocol.
I'm ready. What do you want to build?From there, any question about Pix charges, webhooks, MED, authentication or error handling comes answered based on the actual doc.
This doc is for the Pix Processamento API (https://api.payzu.processamento.com/v1, Bearer, values in reais). The Card API is a different system (https://api.payzu.io/v1, mTLS + client_credentials, values in cents) and has its own doc. Never mix the two in the same integration, and there is no pix.payzu.io.
Endpoints for AIs
| URL | What it has |
|---|---|
/pix-processamento/llms.txt | Markdown-formatted index with link and description of every page from Pix Processamento only. |
/pix-processamento/llms-full.txt | All of Pix Processamento concatenated into one file. Fits in the context of most LLMs. |
/llms.txt | Global index (all PayZu products together). |
/llms-full.txt | Global dump (all PayZu products together). |
/openapi.json | OpenAPI 3 specification of the V1 API. Source-of-truth for endpoints, schemas, errors. |
/api-scalar | Interactive Scalar rendering of the OpenAPI. |
/api-swagger | Swagger UI rendering of the OpenAPI. |
/payzu-pix.postman_collection.json | Postman collection ready to import. |
For a Pix-only integration, prefer the specific dump /pix-processamento/llms-full.txt. The global dump /llms-full.txt mixes Pix and Card in the same file and may lead the AI to confuse base URL, authentication (Bearer × mTLS) and value unit (reais × cents).
Per page
Every doc page has equivalent content in plain markdown. Replace /docs/... with /llms.mdx/docs/.../content.md:
| HTML page | Raw markdown |
|---|---|
/docs/pix-processamento | /llms.mdx/docs/pix-processamento/content.md |
/docs/pix-processamento/webhooks | /llms.mdx/docs/pix-processamento/webhooks/content.md |
/docs/pix-processamento/best-practices/idempotency | /llms.mdx/docs/pix-processamento/best-practices/idempotency/content.md |
And every doc page has a "Copy Markdown" button at the top, which copies it straight to the clipboard.
Use cases
Quick question in ChatGPT/Claude
Paste the URL https://docs.payzu.com.br/pix-processamento/llms-full.txt in the conversation and ask something concrete:
PayZu Pix API doc (Processamento): https://docs.payzu.com.br/pix-processamento/llms-full.txt
Base URL: https://api.payzu.processamento.com/v1, auth Bearer token, values in reais.
Show me a Node.js example that:
1. Creates a Pix charge of R$ 100 (POST /pix) with idempotent clientReference.
2. Receives the webhook and validates the signature before processing:
the X-Callback-Signature header comes as "t=<unix>, v1=<hex>" and the HMAC-SHA256 is
over "<t>.<raw body>", with the webhook secret. There is no nonce.
3. Only marks the order as paid when the status is COMPLETED, deduplicating by id + event.Cursor / Copilot in the editor
Create a .cursorrules file or .github/copilot-instructions.md in your repo:
You are integrating with the PayZu Pix Processamento API. It is a system independent from the Card API.
Inviolable rules:
- Base URL: https://api.payzu.processamento.com/v1
- Every call uses Authorization: Bearer <token> + Content-Type: application/json
- Values in reais (BRL) as decimals, never cents (R$ 10.90 = "amount": 10.90)
- Unique and deterministic clientReference guarantees request idempotency
- Listings (GET) paginate with page + limit (max 100 in most; /user/transactions accepts up to 1000), with no total count
- Webhook: validate the X-Callback-Signature header, which comes as "t=<unix>, v1=<hex>";
the HMAC-SHA256 is over "<t>.<raw body>" with the webhook secret, and there is no nonce.
A registered webhook is signed with the webhook secret; delivery to the transaction's callbackUrl is signed with the account's callback secret, when it exists.
Respond 2xx within 5s
- Deduplicate callbacks by id + event (X-Callback-Event header): three events do not change the status
- NEVER use api.payzu.io (that is the Card API: mTLS, client_credentials, cents)
nor pix.payzu.io (does not exist)
Full reference: https://docs.payzu.com.br/pix-processamento/llms-full.txt
OpenAPI: https://docs.payzu.com.br/openapi.jsonRAG / vector store
The /pix-processamento/llms-full.txt is the ideal input to index the Pix doc in a vector store (Pinecone, Qdrant, Supabase pgvector). Chunk by ## section and each chunk lands at 500-2000 tokens, a good granularity for retrieval. Index the Pix dump separately from the Card one so the retriever never crosses conventions between the two systems.
Code generation
To generate an SDK or HTTP client, point the AI to /openapi.json:
Generate a typed TypeScript client for this Pix API:
https://docs.payzu.com.br/openapi.json
Base URL https://api.payzu.processamento.com/v1, Bearer auth, values in reais.
Use Zod for runtime validation and native fetch.Updates
Every change published in the doc updates automatically:
/llms.txtand/llms-full.txton the next deploy./openapi.jsonwhen the API gains new endpoints or schema changes.- The "Copy Markdown" button always serves the rendered version of the current page.
If your AI gives an answer that seems outdated, ask it to re-fetch https://docs.payzu.com.br/pix-processamento/llms-full.txt. The publication timestamp is at the end of the file.