# PagBank PagSeguro MCP

> PagBank PagSeguro connects your AI agent directly to Brazil's major payment systems. Instantly create Pix QR codes, process Boleto payments for non-card users, generate multi-item checkout links, and manage refunds or check account balances—all through natural conversation.

## Overview
- **Category:** money-moves
- **Price:** Free
- **Tags:** payment-gateway, pix, boleto, credit-card-processing, refund-management, transaction-reporting

## Description

Need to handle sales in Brazil? This MCP gives your AI client direct access to PagBank's payment tools. Instead of copying credentials into a developer portal, you simply tell your agent what needs paying for, and it takes care of the rest. You can instantly generate Pix QR codes for immediate payments or create Boleto links if a customer doesn't have a credit card. It also lets you calculate installment options before checkout, build secure payment links for multiple items, or search through months of transactions just by asking. When you connect to Vinkius, you get this powerful financial tool alongside thousands of others, meaning you don't need another dedicated integration just to handle payments.

## Tools

### get_balance
Checks the current available money balance in your PagBank account.

### create_boleto_payment
Generates a Boleto Bancário payment code for customers who prefer bank transfers.

### cancel_transaction
Cancels any transaction, allowing you to process full or partial refunds if necessary.

### create_checkout_link
Builds a secure payment link and code that supports multiple items and different payment types.

### get_order
Retrieves specific details about a transaction using its unique order ID.

### get_transaction
Fetches complete details for any payment when you know the original transaction code.

### get_installment_options
Calculates and returns available installment plans for various credit cards.

### create_pix_payment
Creates an instant payment record and generates a scannable QR code using Pix.

### search_transactions
Searches all your transactions by defining a specific date range.

## Prompt Examples

**Prompt:** 
```
Create a Pix payment of R$99.90 for reference 'ORDER-001'.
```

**Response:** 
```
Pix payment created! Status: WAITING. QR Code generated for user to scan.
```

**Prompt:** 
```
Show me the balance of my account.
```

**Response:** 
```
Current Available Balance: R$ 1,250.45.
```

**Prompt:** 
```
Cancel transaction 12345-ABCDE-67890.
```

**Response:** 
```
Transaction cancelled successfully! Status: CANCELLED.
```

## Capabilities

### Generate Instant Payments
Create and track instant Pix payments using a generated QR code.

### Manage Non-Card Payments
Issue Boleto Bancário codes for customers who pay via bank transfer instead of card.

### Handle Refunds and Disputes
Cancel transactions completely or issue partial refunds on existing payments.

### Process Card Payments
Generate checkout links that support multiple items and calculate installment options for credit cards.

### Monitor Finances
Check your current available account balance or search transactions by a date range.

## Use Cases

### Handling an Urgent Refund
A customer calls because they were double-charged last week. Instead of having to look up the transaction code in a spreadsheet, the agent runs `search_transactions` for that date range and then uses `cancel_transaction` on the correct payment.

### Selling Custom Bundles
You sell an online bundle of three different products. Instead of making three separate payments, the agent creates one secure checkout link using `create_checkout_link`, ensuring all items are paid for at once.

### Processing a B2B Payment
A client can't pay with a card. The agent runs `create_boleto_payment` and instantly gives the customer a usable Boleto code, solving the payment issue in seconds.

### Verifying Large Orders
You need to confirm if an order ID is valid and what was paid. The agent uses `get_order` first to validate the details, then checks `get_transaction` for payment confirmation.

## Benefits

- Instead of manually navigating payment portals, you can ask your agent to generate a Pix QR code or create a Boleto link. It's all one chat command.
- You never have to worry about mixed payments again. The MCP lets you calculate credit card installment options before generating the final checkout link.
- Handling refunds is simple. You just tell your agent which transaction needs cancelling, and it runs the `cancel_transaction` tool for you.
- Monitoring funds gets faster. Use the `search_transactions` tool to pull up all payment records between two dates without exporting a spreadsheet.
- Getting initial details is easy. The MCP lets you check your current available balance with a single prompt, saving you time logging into a dashboard.

## How It Works

The bottom line is you get to manage complex financial tasks using simple natural language prompts.

1. Subscribe to this MCP and provide your PagBank Production or Sandbox Access Token.
2. Connect the credentials to any compatible AI client like Cursor, Claude, or Windsurf.
3. Ask your agent directly: 'Generate a Pix payment of R$ 50.00 for Order XYZ.' The agent calls the tool and returns the status and necessary codes.

## Frequently Asked Questions

**How do I check my available funds using the PagBank PagSeguro MCP?**
You use the `get_balance` tool. Just ask your agent to 'Show me the current account balance,' and it will pull the latest figure for you.

**Can I refund a payment using the PagBank PagSeguro MCP?**
Yes, you use `cancel_transaction`. You just need to provide the transaction ID, and your agent handles initiating the full or partial refund through the system.

**Which tool should I use if a customer only has cash/bank funds?**
You should use `create_boleto_payment`. This generates the necessary Boleto Bancário code, which allows customers to pay via bank transfer instead of a card.

**How does PagBank PagSeguro help with multi-item payments?**
The `create_checkout_link` tool builds a single payment link that supports multiple items. You provide the list, and it returns one consolidated checkout option for your customer.

**Can I find an old transaction using PagBank PagSeguro?**
You can use `search_transactions` by providing a start date and end date range. This tool gathers all records within that period for you to review.