# Pagou Developer Docs > Integrate payments, subscriptions, payouts, webhooks, and frontend card flows with Pagou.ai API. ## Start Here ### Getting Started - [Pagou Developer Docs](https://developer.pagou.ai/index.md): Integrate Pix, voucher, card payments, subscriptions, payouts, webhooks, and frontend card flows with a v2-first developer journey. - [Overview](https://developer.pagou.ai/start-here/overview.md): Understand the supported public surface of Pagou.ai before you start integrating. - [Quickstart](https://developer.pagou.ai/start-here/quickstart.md): Create your first successful v2 sandbox transaction with the minimum required setup. - [Environments](https://developer.pagou.ai/start-here/environments.md): Choose the correct base URL, credentials, and release discipline for sandbox and production. - [Authentication](https://developer.pagou.ai/start-here/authentication.md): Authenticate Pagou API requests consistently and choose one production standard for your integration. - [Test Data](https://developer.pagou.ai/start-here/test-data.md): Sandbox test cards, documents, and amounts to exercise every payment method and outcome — Pix, Boleto/Voucher, and credit card (including 3DS and tokenization). ### Going to Production - [Idempotency](https://developer.pagou.ai/start-here/idempotency.md): Prevent duplicate money movement by treating external_ref as your stable write identifier. - [Errors and Retries](https://developer.pagou.ai/start-here/errors-and-retries.md): Interpret Pagou error responses and decide when to retry, fix input, or reconcile state. - [Webhook Fundamentals](https://developer.pagou.ai/start-here/webhooks.md): Use webhooks as the primary source of truth for asynchronous payment, subscription, and payout updates, with polling only as a fallback. - [Go-live Checklist](https://developer.pagou.ai/start-here/go-live-checklist.md): Use this production checklist before you switch a Pagou integration from sandbox to live traffic. ### AI-Assisted Integration - [AI-Assisted Integration](https://developer.pagou.ai/start-here/ai-integration.md): Give AI coding agents the right Pagou docs context before they generate integration code. - [CLAUDE.md Template](https://developer.pagou.ai/start-here/claude-md-template.md): Copy this CLAUDE.md file to give Claude Code full context for Pagou integrations. - [.cursorrules Template](https://developer.pagou.ai/start-here/cursorrules-template.md): Copy this .cursorrules file to give Cursor full context for Pagou integrations. ## Payments ### Payments - [Payments Overview](https://developer.pagou.ai/payments/overview.md): Understand how customers, transactions, Pix, vouchers, cards, webhooks, and refunds fit together in Pagou v2. - [Customers](https://developer.pagou.ai/payments/customers.md): Create and retrieve customer records in Pagou v2 when your product needs reusable buyer profiles. - [Transaction Statuses](https://developer.pagou.ai/payments/transaction-statuses.md): Use one canonical status map for Pix, voucher, and card transactions in your product, operations, and webhook handlers. ### Checkout Links - [Create Checkout Links](https://developer.pagou.ai/payments/checkout-links/create.md): Programmatically create a hosted checkout link with an API key — reference your own products by external_id, or generate a value-only link. ### Pix - [Accept Pix Payments](https://developer.pagou.ai/payments/pix/accept-payments.md): Create a Pix transaction, return QR code data to the buyer, and operate the flow with webhooks plus reconciliation. - [Pix Refunds](https://developer.pagou.ai/payments/pix/refunds.md): Issue full or partial refunds for eligible transactions and align your product and finance state to the resulting statuses. - [Pix Reconciliation](https://developer.pagou.ai/payments/pix/reconciliation.md): Use Pagou read APIs to verify transaction state when a webhook is delayed, missed, or operationally ambiguous. ### Vouchers - [Accept Voucher Payments](https://developer.pagou.ai/payments/vouchers/accept-payments.md): Create voucher transactions for local payment methods such as Boleto, SPEI, Mercado Pago, Webpay, CODI, PSE, and other country-specific cash or bank-transfer flows. ### Cards - [Card Payments Overview](https://developer.pagou.ai/payments/cards/overview.md): Choose the recommended card integration pattern and understand how Pagou handles tokenization and 3DS. - [Payment Element for Cards](https://developer.pagou.ai/payments/cards/payment-element.md): Understand why Payment Element is the default card integration and how it connects to the transactions API. - [Card Transaction Lifecycle](https://developer.pagou.ai/payments/cards/transaction-lifecycle.md): Handle authorization, 3DS, capture outcomes, and terminal states in a predictable card payment flow. - [Card Refund Behavior](https://developer.pagou.ai/payments/cards/refund-behavior.md): Model card refunds operationally so your product, support, and finance logic stay aligned. ## Subscriptions ### Recurring Billing - [Subscriptions Overview](https://developer.pagou.ai/subscriptions/overview.md): Create recurring billing by card or Pix Automático, with customers, renewals, retries, and subscription webhooks. - [Create a Subscription](https://developer.pagou.ai/subscriptions/create.md): Start recurring billing with a customer, a single-use card token, and the Subscriptions API. - [Pix Automático Subscriptions](https://developer.pagou.ai/subscriptions/pix-automatic.md): Bill a customer on a recurring schedule with Pix Automático: the payer authorizes once with a QR code and their bank debits each cycle. - [Subscription Lifecycle](https://developer.pagou.ai/subscriptions/lifecycle.md): Map subscription statuses into billing, access, retry, and cancellation behavior. - [Subscription Webhooks](https://developer.pagou.ai/subscriptions/webhooks.md): Handle recurring billing events with the subscription webhook envelope and event names. ## Payouts ### Pix Out - [Pix Out Overview](https://developer.pagou.ai/payouts/pix-out/overview.md): Send outbound Pix transfers, track lifecycle changes, and reconcile payout operations safely. - [Create a Pix Out Transfer](https://developer.pagou.ai/payouts/pix-out/create-transfer.md): Create a transfer request, persist the Pagou transfer ID, and transition state from webhook delivery. - [Cancel a Pix Out Transfer](https://developer.pagou.ai/payouts/pix-out/cancel-transfer.md): Cancel a pending transfer safely and avoid duplicate operator actions during payout management. - [Transfer Statuses](https://developer.pagou.ai/payouts/pix-out/statuses.md): Map Pagou payout statuses into operator workflows, customer messaging, and reconciliation jobs. - [Transfer Reconciliation](https://developer.pagou.ai/payouts/pix-out/reconciliation.md): Use Pagou transfer read APIs to recover from delayed events, worker failures, or uncertain payout state. ## Webhooks ### Webhooks - [Webhooks Overview](https://developer.pagou.ai/webhooks/overview.md): Build one resilient webhook ingestion path for payment, subscription, payout, and checkout events. - [Payment Events](https://developer.pagou.ai/webhooks/payment-events.md): Handle transaction webhooks for Pix, voucher, and card payments using the exact public payload shape Pagou delivers today. - [Subscription Webhooks](https://developer.pagou.ai/subscriptions/webhooks.md): Handle recurring billing events with the subscription webhook envelope and event names. - [Transfer Events](https://developer.pagou.ai/webhooks/transfer-events.md): Handle Pix Out webhook events using the live payout envelope Pagou emits today. - [Checkout Events](https://developer.pagou.ai/webhooks/checkout-events.md): Receive abandoned carts from the hosted checkout and run your own recovery flow. - [Retries and Reconciliation](https://developer.pagou.ai/webhooks/retries-and-reconciliation.md): Recover safely from webhook redelivery, worker failures, or uncertain payment and payout state. ## Front-end ### Start with Payment Element - [Overview](https://developer.pagou.ai/frontend/payment-element/overview.md): Understand what Payment Element is, when to use it, and how it fits into Pagou's card payment lifecycle. - [Quickstart](https://developer.pagou.ai/frontend/payment-element/quickstart.md): Mount the Payment Element, tokenize card details, and create a card payment through your backend in the shortest possible path. ### Build a Card Checkout - [SDK v3 Reference](https://developer.pagou.ai/frontend/payment-element/sdk-reference.md): Use the Pagou browser SDK v3 API to mount hosted card fields, submit card payments, and handle 3D Secure. - [Accept a Payment](https://developer.pagou.ai/frontend/payment-element/accept-a-payment.md): Build a production-safe Payment Element checkout from card input through backend creation, 3DS, and final order state handling. - [Appearance and Events](https://developer.pagou.ai/frontend/payment-element/appearance-and-events.md): Customize the Payment Element card field and react to its lifecycle with supported browser events. - [3D Secure](https://developer.pagou.ai/frontend/payment-element/three-d-secure.md): Payment Element authenticates card payments for you, with no extra integration work, and keeps checkout, fulfillment, and reconciliation aligned. - [Currency Quotes](https://developer.pagou.ai/frontend/payment-element/fx-quotes.md): Show and confirm the final amount with the buyer before authorization when your company passes the currency spread on to them. ### Launch and Migrate - [Testing and Troubleshooting](https://developer.pagou.ai/frontend/payment-element/testing-and-troubleshooting.md): Validate Payment Element in sandbox, test 3DS paths, and diagnose the most common integration mistakes. - [Migration from WebSDK](https://developer.pagou.ai/frontend/payment-element/migration-from-websdk.md): Move from the legacy WebSDK card flow to Payment Element with low operational risk and a stable backend contract. ### Customize the Checkout - [Custom CSS](https://developer.pagou.ai/frontend/custom-css.md): Style the checkout with stable CSS variables and hooks that pass the checkout styling policy. ## SDKs ### Choose an SDK - [TypeScript SDK Quickstart](https://developer.pagou.ai/sdks/typescript/quickstart.md): Install and configure the official server-side TypeScript SDK, then make safe requests with response metadata, retries, and typed errors. - [SDK v3 Reference](https://developer.pagou.ai/frontend/payment-element/sdk-reference.md): Use the Pagou browser SDK v3 API to mount hosted card fields, submit card payments, and handle 3D Secure. ### Server-side TypeScript - [Payments with the TypeScript SDK](https://developer.pagou.ai/sdks/typescript/payments.md): Create Pix, voucher, and card transactions, retrieve and list by cursor, run sandbox updates, and refund safely with the TypeScript SDK. - [Transfers with the TypeScript SDK](https://developer.pagou.ai/sdks/typescript/transfers.md): Create Pix transfers, retrieve and list them by cursor, cancel safely, and reconcile payout state with the TypeScript SDK. ## Examples ### Examples - [Examples Overview](https://developer.pagou.ai/examples/overview.md): Runnable, testable, cross-language examples of the Pagou v2 core flows, linked to the matching guide and API reference. ### By flow - [Payments Examples](https://developer.pagou.ai/examples/payments.md): Runnable payments examples per language: Pix + QR, vouchers, card via Payment Element, 3DS, refunds and pagination. - [Checkout Links Examples](https://developer.pagou.ai/examples/checkout-links.md): Runnable checkout-link examples per language: create a link and store the returned public URL identifier. - [Customers & Subscriptions Examples](https://developer.pagou.ai/examples/subscriptions.md): Runnable subscription examples per language: create or reuse a customer, then create, retrieve and cancel a subscription. - [Transfers (Pix Out) Examples](https://developer.pagou.ai/examples/transfers.md): Runnable transfer examples per language: create, retrieve and reconcile a transfer; cancel when the status allows. - [Webhooks Examples](https://developer.pagou.ai/examples/webhooks.md): Runnable webhook handlers per language for the transaction, subscription and transfer event families. ## API Reference ### Customers - [Customers Reference](https://developer.pagou.ai/api-reference/customers/reference.md): API operations for creating and retrieving reusable buyer profiles. - [Create a Customer](https://developer.pagou.ai/api-reference/customers/create.md): Create a reusable buyer profile. - [List Customers](https://developer.pagou.ai/api-reference/customers/list.md): List reusable buyer profiles. - [Get a Customer](https://developer.pagou.ai/api-reference/customers/get.md): Retrieve a reusable buyer profile by ID. ### Transactions - [Transactions Reference](https://developer.pagou.ai/api-reference/transactions/reference.md): API operations for creating, reading, updating, and refunding v2 transactions. - [Create a Transaction](https://developer.pagou.ai/api-reference/transactions/create.md): Create a Pix, voucher, or card transaction. - [List Transactions](https://developer.pagou.ai/api-reference/transactions/list.md): List transactions for reconciliation and operations. - [Get a Transaction](https://developer.pagou.ai/api-reference/transactions/get.md): Retrieve a transaction by ID. - [Update a Transaction](https://developer.pagou.ai/api-reference/transactions/update.md): Update a transaction in the test environment. - [Refund a Transaction](https://developer.pagou.ai/api-reference/transactions/refund.md): Refund an eligible transaction. - [Update Delivery Tracking](https://developer.pagou.ai/api-reference/transactions/delivery.md): Set or update shipping tracking on a paid transaction. - [Mark a Transaction as Paid Externally](https://developer.pagou.ai/api-reference/transactions/paid-externally.md): Record a pix or voucher sale that the buyer paid outside Pagou. ### Checkout Links - [Checkout Links Reference](https://developer.pagou.ai/api-reference/checkout-links/reference.md): API operations for creating hosted checkout links with an API key. - [Create a Checkout Link](https://developer.pagou.ai/api-reference/checkout-links/create.md): Create a hosted checkout link from products (upserted by external_id) or a value-only amount. ### Transfers - [Transfers Reference](https://developer.pagou.ai/api-reference/transfers/reference.md): API operations for creating, retrieving, listing, and canceling Pix Out transfers. - [Create a Transfer](https://developer.pagou.ai/api-reference/transfers/create.md): Create a Pix Out transfer. - [List Transfers](https://developer.pagou.ai/api-reference/transfers/list.md): List Pix Out transfers for payout reconciliation. - [Get a Transfer](https://developer.pagou.ai/api-reference/transfers/get.md): Retrieve a Pix Out transfer by ID. - [Cancel a Transfer](https://developer.pagou.ai/api-reference/transfers/cancel.md): Cancel a pending Pix Out transfer. ### Subscriptions - [Subscriptions Reference](https://developer.pagou.ai/api-reference/subscriptions/reference.md): API operations for creating, reading, updating, and canceling recurring subscriptions. - [Create a Subscription](https://developer.pagou.ai/api-reference/subscriptions/create.md): Create a recurring subscription from a single-use card token or with Pix Automático. - [List Subscriptions](https://developer.pagou.ai/api-reference/subscriptions/list.md): List subscriptions with cursor pagination and filters. - [Get a Subscription](https://developer.pagou.ai/api-reference/subscriptions/get.md): Retrieve a single subscription by id, including its billed transactions. - [Update a Subscription](https://developer.pagou.ai/api-reference/subscriptions/update.md): Update the editable fields of an existing subscription, or move it to another plan. - [Cancel a Subscription](https://developer.pagou.ai/api-reference/subscriptions/cancel.md): Cancel a subscription: at the end of the period for cards, immediately for Pix Automático. - [Charge an Unpaid Subscription](https://developer.pagou.ai/api-reference/subscriptions/charge.md): Charge the current cycle, or every open cycle, of an unpaid card subscription on its saved card. - [Replace a Subscription's Card](https://developer.pagou.ai/api-reference/subscriptions/update-payment-method.md): Replace the saved card of a card subscription with a new vaulted card. - [Simulate a Pix Automático Event](https://developer.pagou.ai/api-reference/subscriptions/simulate.md): Sandbox only: act as the payer's bank on a Pix Automático subscription. ### Legacy v1 - [Legacy v1 Reference](https://developer.pagou.ai/api-reference/legacy-v1/reference.md): Legacy API operations for existing v1 integrations. - [Create a Webhook Integration](https://developer.pagou.ai/api-reference/legacy-v1/create-webhook-integration.md): Configure webhook integration for a legacy v1 account. - [Validate Authentication](https://developer.pagou.ai/api-reference/legacy-v1/validate-authentication.md): Validate legacy v1 API authentication. - [Get Account Balance](https://developer.pagou.ai/api-reference/legacy-v1/get-account-balance.md): Retrieve the account balance for a legacy v1 integration. - [List PIX Transactions](https://developer.pagou.ai/api-reference/legacy-v1/list-pix-transactions.md): List PIX transactions for a legacy v1 integration. - [Get a PIX Transaction](https://developer.pagou.ai/api-reference/legacy-v1/get-pix-transaction.md): Retrieve a PIX transaction by ID for a legacy v1 integration. - [Create a PIX Payment](https://developer.pagou.ai/api-reference/legacy-v1/create-pix-payment.md): Create a PIX payment through the legacy v1 API. - [Refund a PIX Payment](https://developer.pagou.ai/api-reference/legacy-v1/refund-pix-payment.md): Refund a PIX payment through the legacy v1 API. - [Withdraw a PIX Payment](https://developer.pagou.ai/api-reference/legacy-v1/withdraw-pix-payment.md): Create a PIX withdrawal through the legacy v1 API. ## Resources ### Updates - [Changelog](https://developer.pagou.ai/changelog/index.md): Track documentation and public platform changes relevant to Pagou integrations. ### Legacy - [v1 Overview](https://developer.pagou.ai/legacy/v1/overview.md): Maintain existing v1 integrations while planning the move to Pagou v2. - [v1 Authentication](https://developer.pagou.ai/legacy/v1/authentication.md): Reference the legacy v1 auth model only if you maintain an existing integration. - [v1 Pix Payments](https://developer.pagou.ai/legacy/v1/pix-payments.md): Maintain or migrate legacy Pix payment flows exposed through the v1 route family. - [v1 Account Balance](https://developer.pagou.ai/legacy/v1/account-balance.md): Query account balance for legacy integrations that still depend on the v1 route family. - [v1 Webhook Configuration](https://developer.pagou.ai/legacy/v1/webhook-configuration.md): Reference the legacy webhook integration endpoint while moving webhook handling practice to the unified v2 guidance. - [v1 to v2 Migration](https://developer.pagou.ai/legacy/v1/migration-to-v2.md): Map legacy Pagou route families and operational assumptions to the recommended v2 integration model. ## OpenAPI Specs - [openapi-v2](/api-reference/openapi-v2.json) - [openapi-v1](/api-reference/openapi-v1.json) - [openapi](/api-reference/openapi.json) ## Optional - [API status](https://status.pagou.ai) - [GitHub](https://github.com/pagouai) > The links below point to documentation indexes. Follow each `/_llms/` index recursively until you reach documentation pages. ## Indexes - [Brazilian Portuguese (103 pages)](https://developer.pagou.ai/_llms/pt-br.txt): Comece Aqui, Pagamentos, Assinaturas, Transferências, Webhooks, Frontend, SDKs, Exemplos, Referência API, Recursos. This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.