For AIs (LLMs)
This documentation is designed to be consumed by both humans and AI assistants. You can copy the content directly into the chat or point the AI to a fixed URL.
SKILL.md (recommended)
SKILL.md is the most compact and up-to-date way to guide an AI through the PayZu APIs. It contains inviolable rules, examples in Node.js + Python, enums, retry policy and common pitfalls, all in a ~9 KB file that fits in any model's context.
Works with: Claude Code, Claude Desktop, Cursor, GitHub Copilot, Codeium, Continue, ChatGPT, Gemini, and anything else that accepts markdown as instructions.
How to use:
- Claude Code: save to
~/.claude/skills/payzu/SKILL.mdor/.claude/skills/payzu/SKILL.mdin the project - Cursor: paste into
.cursorrulesor.cursor/rules/payzu.mdc - GitHub Copilot: paste into
.github/copilot-instructions.md - ChatGPT/Gemini: paste the content into the system prompt or first message
- Any of them via URL: point to
https://docs.payzu.com.br/SKILL.md
curl -o .claude/skills/payzu/SKILL.md https://docs.payzu.com.br/SKILL.mdYou are a senior engineer specialized in the PayZu PayZu Processamento (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
Scope: 29 endpoints across 7 groups, high throughput, pure Pix processing 24/7. 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):
- 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, deterministic, idempotent (use UUID v4 or `order-{id}`)
- `callbackUrl` must respond `2xx` within **5 seconds**. Heavy processing goes to a queue
- Webhook retries with exponential backoff up to **72 attempts**. Handle idempotency via `id + 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/Python/Go 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
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 on, any question about Pix charges, webhooks, MED, authentication or error handling comes answered based on the real docs.
Endpoints for AIs
| URL | What's in it |
|---|---|
/SKILL.md | Compact skill (~9 KB) with inviolable rules, examples and enums. Ready to paste into Claude/Cursor/Copilot. |
/pix-processamento/llms.txt | Index in markdown format with link and description of every page for Pix Processamento only. |
/pix-processamento/llms-full.txt | All of Pix Processamento concatenated in 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 for 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. |
Per page
Every page in the docs 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 page in the docs 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/llms-full.txt into the conversation and ask:
Here are the PayZu API docs: https://docs.payzu.com.br/llms-full.txt
Show me a Node.js example of creating a Pix charge for R$ 100
and processing the COMPLETED callback.Cursor / Copilot in the editor
Create a .cursorrules or .github/copilot-instructions.md file in your repo:
You are integrating with the PayZu Processamento API (Pix).
Inviolable rules:
- Every call uses Bearer token + Content-Type: application/json
- Amounts in reais (BRL), never cents
- Use a unique and deterministic clientReference for idempotência
- Respond to callbacks with 2xx within 5 seconds
- Dedupe callbacks by id + status, not by id alone
Full reference: https://docs.payzu.com.br/llms-full.txt
OpenAPI: https://docs.payzu.com.br/openapi.jsonRAG / vector store
/llms-full.txt is the ideal input for indexing the docs in a vector store (Pinecone, Qdrant, Supabase pgvector). Chunk by ## section and each chunk lands at 500-2000 tokens, a good granularity for retrieval.
Code generation
To generate an SDK or HTTP client, point the AI at /openapi.json:
Generate a typed TypeScript client for this API:
https://docs.payzu.com.br/openapi.json
Use Zod for runtime validation and native fetch.Updates
Every change published in the docs updates automatically:
/llms.txtand/llms-full.txton the next deploy./openapi.jsonwhenever 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 looks outdated, ask it to re-fetch https://docs.payzu.com.br/llms-full.txt. The publication timestamp is at the end of the file.