Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

n8n-nodes-pagbank-connect

r-martins390MIT1.3.2TypeScript support: included

n8n integration with PagBank Connect for Brazilian payment processing (PIX, Boleto, Credit Card, Payment Link, etc)

n8n-community-node-package, n8n-community-node, pagbank, pagseguro, payment, brazil, pix, boleto, credit-card

readme

n8n-nodes-pagbank-connect

n8n integration with PagBank Connect for Brazilian payment processing.

Features

  • PIX - Instant payments with QR Code
  • Credit/Debit Card - Secure card processing
  • Payment Links - Custom checkout
  • Recurring Subscriptions - Recurring payments (coming soon)
  • Webhooks - Real-time notifications
  • Sandbox Environment - Safe testing
  • Official Partner - PagBank Integrations is an Official PagBank Partner since 2014.
  • Reduced fees - You pay less fees on PagBank when using our integrations

Installation

npm install n8n-nodes-pagbank-connect

Configuration

1. Get Credentials

Visit PagBank Connect to get your Connect Key for free

If you need a Test Connect Key, click here.

2. Configure in n8n

  1. Add your Connect key in PagBank Connect credentials
  2. Click Save and check if the connection was successful.

Available Nodes

PagBank (Main)

  • Create Payment Link - Generates checkout links for customers to pay on PagBank
  • Create PIX Order - Creates PIX payments
  • Create Credit Card Charge - Processes a payment with the provided credit card data
  • Check order status - Queries the status of an ORDER with PagBank (must have been generated with this connect key)
  • Validate Connect Key - Validates the Connect Key configured in your credentials

PagBank Webhook

  • Payment Webhook - Receives notifications. You can filter notifications by payment status, payment methods or denial reason.

Data Format

Monetary Values

All values are in cents:

  • R$ 10.00 = 1000
  • R$ 1.50 = 150

CPF/CNPJ

  • CPF: 11 digits (numbers only)
  • CNPJ: 14 digits (numbers only)

Required for most operations, except payment link creation.

Environments

Sandbox (Test)

  • The environment will be for testing whenever your Connect Key starts with CONSANDBOX. Get yours here.
  • Automatic approval for values < R$ 100
  • 5 minute delay for values between R$ 100-200
  • Ideal for development and testing
  • See Test Cards

Production

  • Real payment processing
  • Requires PagBank approval
  • Use only after complete testing

Webhooks

Configuration

  1. Configure the webhook URL in n8n
  2. Add the generated URL in the Notification URL field when creating payments and payment links in other actions
  3. Configure filters by status and payment method
  4. Make sure the URL can be accessed from outside without any blocking.

Common Errors

  • **40002 - Buyer email same as seller
  • **40002 - Invalid CPF/CNPJ
  • **40002 - Invalid phone
  • **UNAUTHORIZED - Invalid Connect Key

Validations

  • CPF/CNPJ are automatically validated
  • Phones are formatted

Support

License

MIT License - see LICENSE file for details.

Contributing

  1. Fork the project on github
  2. Create a branch for your feature/bugfix
  3. Commit your changes
  4. Push to your local branch
  5. Open a Pull Request to the develop branch

Roadmap

  • More installment options
  • Recurring sales

Subject to change based on community requests.

changelog

Changelog

All notable changes to this project will be documented in this file.

[1.3.2] - 2024-10-20

🐛 Bug Fixes

  • Fixed CreatePixOrder endpoint: Corrected API endpoint from /connect/ws/checkouts to /connect/ws/orders for PIX order creation
  • Resolved URL duplication issue: Fixed double URL construction in createPixOrder method that was causing request failures
  • Improved error handling: Better error messages for PIX order creation failures

🔧 Technical Improvements

  • API consistency: All order creation methods now use correct endpoints
  • Request optimization: Removed redundant URL construction in pagBankConnectRequest calls
  • Better debugging: Clearer error messages for troubleshooting

📋 What's Fixed

  • ✅ CreatePixOrder now creates PIX orders instead of checkout links
  • ✅ Proper API endpoint usage for all order types
  • ✅ Eliminated "Request failed" errors in PIX order creation
  • ✅ Consistent behavior across all payment methods

[1.3.0] - 2024-10-15

🚀 Major Changes

  • Removed external dependencies: Eliminated n8n-nodes-base dependency to comply with N8N Community Node requirements
  • Zero runtime dependencies: Package now has no dependencies in production, only peer dependencies

🔧 Technical Improvements

  • Fixed icon loading: Corrected gulpfile to copy icons to the correct location (dist/nodes/PagBank/)
  • Updated build process: Icons now properly copied during build process
  • Improved package structure: Cleaner dependency management with only n8n-workflow as peer dependency

📦 Package Changes

  • Dependencies: Moved from dependencies to peerDependencies and devDependencies
  • Build optimization: Streamlined build process for better compatibility
  • Icon fixes: Resolved icon display issues in N8N interface

🎯 Compliance

  • N8N Community Node ready: Package now meets all requirements for N8N Community Node approval
  • No external dependencies: Eliminates potential security and compatibility issues
  • Clean architecture: Follows N8N best practices for community nodes

🔄 Migration Notes

  • No breaking changes for end users
  • All existing functionality preserved
  • Icons now display correctly in N8N interface
  • Improved stability and compatibility

[1.2.0] - Previous Version

  • Initial release with full PagBank Connect integration
  • Support for PIX, Boleto, Credit Card payments
  • Webhook support for payment notifications
  • Payment link creation functionality