PagSeguro (PagBank) API: what it can do and how to use it with AI agents
PagSeguro is a Brazilian payment provider, now under the PagBank brand. Its API lets you create charges, look up transactions and receive payment notifications. Online stores, service providers and platforms that sell in Brazil use it. Access is by an account token, and a test environment is available.
What the PagSeguro API offers
Orders and charges
Create orders paid by card, boleto (a Brazilian bank slip) or Pix (Brazil's instant payment) and follow the payment status.
Payment links
Generate links and checkouts to send to the customer.
Transaction lookups
Search completed payments and their details.
Refunds and cancellations
Cancel charges and return money to the customer.
Notifications
Alerts to your company's system when a payment status changes.
How to access the PagSeguro API
- With your company’s credentialsIt uses an authentication token generated in the PagBank account, with separate tokens for the test environment (sandbox) and for production.
- Sandbox and production use different credentials: do not mix them.
- Never pass card numbers through the agent: use a checkout or a payment link.
- Refunds and cancellations should have an amount ceiling and an approval step.
What an iTeam agent does with the PagSeguro API
Payment link in the conversation
During support, the agent creates the payment link with the order amount, sends it to the customer and tells the salesperson once it is paid.
Stuck orders
The agent finds pending or declined payments and offers the customer an alternative, such as Pix or a new card.
Sales reconciliation
The day's transactions are compared with orders in the e-commerce platform and the ERP, and mismatches go to finance.
Refund with approval
The agent prepares refund requests with the order history and runs them only after approval.
From the credential to the agent at work, with approval
Generate the token in PagBank
In the PagBank account, generate the integration token, starting with the sandbox one for testing.
Store it in the iTeam vault
The token stays in the vault. You decide who creates charges, who only looks things up and which refunds need approval.
Test in the sandbox, then go live
The agent runs the flows in the sandbox, the notification is validated, and only then is the production token added.
Ready-made AI teams for this work
Bank reconciliation team
Bank lines, Stripe payouts and ledger entries are matched each morning. You only see what did not match, with a reason.
Accounts payable team
Invoices arrive by e-mail and in shared folders. The team reads them, checks them and lines them up for your approval before the due date.
Collections team
Before and after each due date, customers get a clear reminder with a payment link. Disputes and promises to pay go to your team.
Cash flow forecast team
Every week the projection is rebuilt from your books, open invoices and bills, with a plain note on what changed and why.
Bookkeeping team
Transactions are categorized as they come in, receipts are matched, and the month-end close starts with a short list of questions.
Questions about the PagSeguro API
Is the PagSeguro API free?
Using the API does not usually carry a separate fee. The cost comes from PagBank's per-transaction rates, which depend on your plan and payment method.
Do I need to code to use the PagSeguro API with iTeam?
Not necessarily. iTeam reads the PagBank documentation, and the deployment team sets up charges, lookups and notifications with you.
Does PagSeguro have a test environment?
Yes. There is a sandbox for testing charges without moving real money.