Use this file to discover all available pages before exploring further.
Copy this prompt into any AI coding agent:
Pagou AI Context
Integrate Pagou payments. Docs: https://developer.pagou.ai/llms.txt | Full: https://developer.pagou.ai/llms-full.txt | OpenAPI: https://developer.pagou.ai/api-reference/openapi-v2.jsonRules:- Validate endpoints/fields against OpenAPI before coding- Include external_ref on all create requests- Card tokenization: Payment Element + elements.submit()- Fulfill only from webhook or reconciled state- Deduplicate webhooks by top-level event id
## Pagou Integration- Docs: https://developer.pagou.ai/llms.txt- OpenAPI: https://developer.pagou.ai/api-reference/openapi-v2.json- Always include external_ref, validate fields against OpenAPI, fulfill only from webhook
## Pagou Integration- Docs: https://developer.pagou.ai/llms.txt- OpenAPI: https://developer.pagou.ai/api-reference/openapi-v2.json- Always include external_ref, validate fields against OpenAPI, fulfill only from webhook
Or run with inline context:
codex "Read https://developer.pagou.ai/llms-full.txt then add Pix checkout"
Add to .cursorrules in project root:
## Pagou Integration- Docs: https://developer.pagou.ai/llms.txt- OpenAPI: https://developer.pagou.ai/api-reference/openapi-v2.json- Always include external_ref, validate fields against OpenAPI, fulfill only from webhook
Paste context prompt above at the start of your chat, then ask your question.If the agent can’t fetch URLs, paste the relevant section from llms-full.txt directly.
Start with this as your first message:
Read https://developer.pagou.ai/llms-full.txt for Pagou API context.Build: [describe your app]
Replace [describe your app] with what you want to build.
Read https://developer.pagou.ai/llms-full.txt and https://developer.pagou.ai/api-reference/openapi-v2.jsonBuild a Pix checkout flow:1. Backend: POST /v2/transactions with method=pix, include external_ref2. Frontend: display pix_qr_code as QR image, show pix_code as copy-paste fallback3. Webhook: listen for transaction.paid, update order status4. Handle expiration: check status via GET /v2/transactions/{id} if no webhookUse env var for API key. Never expose credentials in frontend.
Card checkout
Read https://developer.pagou.ai/llms-full.txt and https://developer.pagou.ai/api-reference/openapi-v2.jsonBuild a card checkout flow:1. Frontend: load Payment Element from https://js.pagou.ai/payments/v3.js, mount card form2. On submit: call elements.submit() to tokenize, send token to backend3. Backend: POST /v2/transactions with method=credit_card, token, installments, external_ref4. Handle 3DS: if response has next_action, redirect user to complete authentication5. Webhook: listen for transaction.paid or transaction.failed, update order statusUse env var for API key. Never handle raw card numbers.
Webhook handler
Read https://developer.pagou.ai/llms-full.txt and https://developer.pagou.ai/api-reference/openapi-v2.jsonBuild a webhook endpoint:1. POST /webhooks/pagou - accept JSON body2. Deduplicate by top-level "id" field (same event can be sent multiple times)3. Route payment events by data.event_type: transaction.paid, transaction.failed, transaction.refunded4. Route transfer events by type: payout.transferred, payout.failed5. Return 200 with {"received": true}6. Process async - respond fast, handle business logic in backgroundStore processed event IDs to prevent duplicate processing.
Pix payout
Read https://developer.pagou.ai/llms-full.txt and https://developer.pagou.ai/api-reference/openapi-v2.jsonBuild a Pix Out transfer flow:1. Backend: POST /v2/transfers with pix_key_type (CPF/CNPJ/EMAIL/PHONE/EVP), pix_key_value, amount, external_ref2. Webhook: listen for payout.transferred (success) or payout.failed (error)3. Status check: GET /v2/transfers/{id} if webhook not received4. Cancellation: POST /v2/transfers/{id}/cancel (only works if status is pending)Use env var for API key. Validate recipient Pix key before sending.