Testing Transfers
Introduction
The Asaas Sandbox environment allows the complete simulation of financial transfers, enabling you to safely validate integrations without moving real funds.
This guide explains how to test Pix transfers and TED transfers, highlighting the expected behaviors, differences from production, and resources available exclusively in this environment.
When to use
Transfer tests are recommended for integrations that need to:
- validate fund transfer flows;
- homologate Pix transfers;
- homologate TED transfers;
- validate balance updates;
- test transfer-related webhooks;
- verify the handling of success and failure scenarios.
Before starting the tests, it is recommended to have available balance in the Sandbox account and a registered Pix key when necessary.
See also:
- Adding balance to a Sandbox account
- How to configure your Sandbox account
Important transfer fields
When making a transfer to another institution or Pix key, some fields play a fundamental role in the operation:
| Field | Purpose |
|---|---|
| value | Transfer amount |
| operationType | Transfer type (PIX or TED) |
| pixAddressKey | Destination Pix key |
| bankAccount | Destination bank account information |
| description | Operation identification |
ImportantThe complete parameters are documented in the endpoint reference.
The purpose of this page is to demonstrate the homologation scenarios available in Sandbox.
Testing Pix Transfers
Option 1: Using BACEN Test Pix Keys
The Central Bank provides fictitious Pix keys for use in homologation environments.
When making a transfer to any of these keys:
- the operation will be completed successfully;
- the amount will be debited from the Sandbox account;
- no credit will be made to another account;
- no real financial institution will be contacted.
Test Pix keys
Name: João Silva
CPF/CNPJ: 99991111140
Pix Key: [email protected]
Name: João Silva Silva
CPF/CNPJ: 99992222263
Pix Key: [email protected]
Name: José Silva
CPF/CNPJ: 99993333387
Pix Key: [email protected]
Name: José Silva Silva
CPF/CNPJ: 99994444409
Pix Key: [email protected]
Name: José da Silva
CPF/CNPJ: 99995555514
Pix Key: [email protected]Option 2: Using Pix keys from other Sandbox accounts
You can also perform tests using real Sandbox accounts.
In this scenario:
- the amount is debited from the source account;
- the amount is credited to the destination account;
- the balances of both accounts are updated;
- it is possible to validate reconciliation and receipt flows.
Simplified flow:
Sandbox Account A
↓
Pix Transfer
↓
Sandbox Account B Pix Key
↓
Sandbox Account BThis approach is recommended when the integration needs to validate scenarios closer to real-world operation.
ImportantTransfers made to fictitious keys do not generate credit in any account.
Transfers between Sandbox accounts allow validation of debit, credit, and balance updates.
Testing TED Transfers
In the Sandbox environment, TED transfers have specific homologation mechanisms.
After initiating the transfer, the Asaas interface provides manual actions to simulate the result of the operation.
Confirm transfer
- Simulates a successfully completed TED.
- The amount is debited from the account.
- The status changes to completed.
Simulate failure
- Simulates a rejected TED.
- The amount is not debited.
- The status changes to failed.
These controls exist only in Sandbox and are not available in production.
Homologation example
A typical transfer homologation follows the flow below:
Add balance
↓
Create transfer
↓
Process operation
↓
Update status
↓
Validate balance
↓
Validate integrationAt the end of the process, it is recommended to validate:
- API response;
- balance updates;
- webhook delivery;
- transfer status updates.
Possible difficulties
If the transfer is not completed as expected, check whether:
- there is available balance in the Sandbox account;
- the Pix key was provided correctly;
- the TED banking information is valid;
- authentication is being performed using a Sandbox API Key;
- the environment being used is actually Sandbox.
Differences between Sandbox and Production
| Sandbox | Production |
|---|---|
| Uses simulations | Moves real funds |
| Allows manual TED confirmation | Real TED processing |
| Fictitious Pix keys are accepted | Only real Pix keys are accepted |
| No real financial impact | Real financial impact |
Operational impacts
Transfer tests allow validation of:
- balance updates;
- reconciliation rules;
- financial automations;
- webhooks;
- failure handling;
- credit and debit flows.
Proper homologation significantly reduces operational issues after going live in production.
API Reference
See the call to perform transfers:
Transfer to an account at another institution or Pix key
