PayZuDocs

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.

Copy and paste into your AI
Ready-made prompt: points ChatGPT, Claude, Gemini, or Cursor to this doc.
You are a senior engineer specialized in the PayZu 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 **Pix** API, a SEPARATE system from the Cards API (`https://api.payzu.io/v1`, mTLS + client_credentials, amounts in cents) and the Digital Account API (`https://api.hub.payzu.com.br/api/v1`, amounts in cents). NEVER mix them: neither `api.payzu.io` nor `api.hub.payzu.com.br` is 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 (48 operations):
- Pix charges: POST /pix, GET /pix, GET /pix/qr-code/{transactionId}, GET /proof/{id}
- Refund: POST /refund/{transactionId}
- Withdrawals: POST /withdraw, GET /withdraw, POST /withdraw/qrcode, GET /withdraw/proof/{id}
- Keys and DICT: GET /pix/key, POST /pix/qrcode/read, GET /user/dict
- Internal transfer: POST /internal-transfer, GET /internal-transfer
- Account: GET /user, GET /user/balance
- Reports: GET /user/transactions, GET /user/transactions/{id}, POST /user/report, GET /user/report, GET /user/report/{id}, POST /user/report/{id}/download, GET /user/bank-statements, GET /user/bank-statements/{id}, GET /user/deposit-pending, GET /user/deposit-pending/{id}, GET /user/summary
- Callbacks: GET /user/callbacks, GET /user/callbacks/{id}, POST /user/callbacks/resend, POST /user/callbacks/resend/{transactionId}, POST /user/callbacks/resend/webhook/{webhookId}, POST /user/callbacks/resend/webhook, POST /user/callbacks/secret, PATCH /user/callbacks/secret/rotate
- Webhooks: POST /user/webhooks, GET /user/webhooks, GET /user/webhooks/{id}, PATCH /user/webhooks/{id}, DELETE /user/webhooks/{id}, POST /user/webhooks/{id}/rotate-secret, GET /user/webhooks/sent/quantity, GET /user/webhooks/{id}/sent/{callbackId}
- MED infractions: GET /user/infractions, GET /user/infractions/{id}, POST /user/infractions/{id}/defenses, GET /user/infractions/{id}/defenses, GET /user/infractions/{infractionId}/defenses/{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`)
- Other languages, official SDK: PHP `composer require payzu/pix`, Ruby `gem install payzu-pix`, Java `br.com.payzu:payzu-pix` (Maven Central), Go `go get github.com/PayZuAI/payzu-sdks/go/v3`
- 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). The envelope changes per route (`total` and `pages`, `pagination.hasNextPage` or `pagination.totalPages`): follow the route schema in the OpenAPI
- `callbackUrl` (webhook) must respond `2xx` within **5 seconds**. Heavy processing goes to a queue
- Verify the delivery signature: the `X-Callback-Signature` header comes as `t=<unix_seconds>, v1=<hex64>` and the HMAC-SHA256 is over `<t>.<raw body>`. There is no nonce. A registered webhook signs with the webhook secret. The delivery to the transaction `callbackUrl` is signed with the account callback secret, when the account has one (`POST /user/callbacks/secret`). Reject on mismatch
- Each delivery gets up to **12 attempts** with exponential backoff. The `X-Callback-Attempt` header numbers the attempt starting at 1. Deduplicate callbacks by `id` plus the event from the `X-Callback-Event` header, because three events do not change the `status`
- Refund: `POST /refund/{transactionId}` with `amount` for a partial refund or `{}` for the full amount. It is asynchronous: the response carries the transaction with `refundStatus` and `refunds[]`, one item per refund, newest first. `clientReference` in the body makes the refund idempotent
- Callback resend: `POST /user/callbacks/resend` (batch), `/resend/{transactionId}` (one transaction), `/resend/webhook/{webhookId}` (one webhook) and `/resend/webhook` (by filters). The limit is 5 requests per minute per account, shared across these routes. Above it the API returns 422
- Dates in ISO 8601 UTC

Transaction status: `PENDING`, `COMPLETED`, `CANCELED`, `WAITING_FOR_REFUND`, `REFUNDED`, `EXPIRED`, `ERROR`
Pix key type: `cpf`, `cnpj`, `phone` (5511…), `email`, `evp` (UUID)
Transaction type: `DEPOSIT`, `WITHDRAW`, `COMMISSION`, `LIQUIDATION` or `ADJUSTMENT`

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 the language I ask for, through its official SDK. For a language without an official SDK, generate the client from the OpenAPI or use an HTTP client
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

URLWhat it has
/pix-processamento/llms.txtMarkdown-formatted index with link and description of every page from Pix Processamento only.
/pix-processamento/llms-full.txtAll of Pix Processamento concatenated into one file. Fits in the context of most LLMs.
/llms.txtGlobal index (all PayZu products together).
/llms-full.txtGlobal dump (all PayZu products together).
/openapi.jsonOpenAPI 3 specification of the V1 API. Source-of-truth for endpoints, schemas, errors.
/api-scalarInteractive Scalar rendering of the OpenAPI.
/api-swaggerSwagger UI rendering of the OpenAPI.
/payzu-pix.postman_collection.jsonPostman 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 /en/docs/... with /llms.mdx/docs/en/.../content.md:

HTML pageRaw markdown
/en/docs/pix-processamento/llms.mdx/docs/en/pix-processamento/content.md
/en/docs/pix-processamento/webhooks/llms.mdx/docs/en/pix-processamento/webhooks/content.md
/en/docs/pix-processamento/best-practices/idempotency/llms.mdx/docs/en/pix-processamento/best-practices/idempotency/content.md

At the top of every page are the Ask AI, Copy for LLM (copies the page's markdown) and View as Markdown (opens the page's markdown) buttons.

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>". Delivery to the callbackUrl is signed with the account
   callback secret, when the account has one; a registered webhook uses the webhook
   secret. Without a callback secret the delivery is not signed: create the secret
   or protect the endpoint by source IP. 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); the response envelope changes per route
- 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. Each delivery gets up to 12 attempts; X-Callback-Attempt starts at 1
- Deduplicate callbacks by id + event (X-Callback-Event header): three events do not change the status
- Refund: POST /refund/{transactionId} is asynchronous; the response carries refundStatus and refunds[], one item per refund, newest first
- Resend: the /user/callbacks/resend* routes share a limit of 5 requests per minute per account; POST /user/callbacks/resend/webhook resends by filters
- Official SDK: npm install payzu-pix, pip install payzu-pix, composer require payzu/pix, gem install payzu-pix,
  Maven br.com.payzu:payzu-pix, go get github.com/PayZuAI/payzu-sdks/go/v3
- 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.json

RAG / 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

Node.js, Python, PHP, Ruby, Java and Go have an official SDK. For another language or your own 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.txt and /llms-full.txt on the next deploy.
  • /openapi.json when the API gains new endpoints or schema changes.
  • The Copy for LLM button always copies the current version of the 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.

On this page