How to test features
Testing credit card payment
For credit card charges, you can use test cards to simulate a direct payment through the endpoints to create a charge with a credit card. Here is an example of a valid card:
Credit card:
4444 4444 4444 4444
Expiration:
Any month after today's date
CCV:
123
(or any other 3 random numbers)
You can also use credit card generators for tests. All of these will work and confirm the payment.
To test payments with errors, use the cards below:
Mastercard:
5184019740373151
Visa:
4916561358240741
Testing bill payment
If you want to test bill payment in Sandbox, it is possible to make the call using the barcode of any boleto that has been generated in your own Asaas account in the Sandbox environment.
Testing Pix transfers
BACEN provides some Pix keys for transfer tests which you can use in Sandbox:
Name: Joao Silva
CPF/CNPJ 99991111140
Key: cliente-a00001@pix.bcb.gov.br
Bank Virtual Messaging 04 (99999004)
AGENCY 0001
ACCOUNT 12345678 CACC)
Name: Joao Silva Silva
CPF/CNPJ 99992222263
Key: cliente-a00002@pix.bcb.gov.br
Bank Virtual Messaging 04 (99999004)
AGENCY 0002
ACCOUNT 11345678 (CACC)
Name: Jose Silva
CPF/CNPJ 99993333387
Key: cliente-a00003@pix.bcb.gov.br
Bank Virtual Messaging 04 (99999004)
AGENCY 0003
ACCOUNT 12145678 (CACC)
Name: Jose Silva Silva
CPF/CNPJ 99994444409
Key: cliente-a00004@pix.bcb.gov.br
Bank Virtual Messaging 04 (99999004)
AGENCY 0004
ACCOUNT 12315678 (CACC)
Name: Jose da Silva
CPF/CNPJ 99995555514
Key: cliente-a00005@pix.bcb.gov.br
Bank Virtual Messaging 04 (99999004)
AGENCY 0004
ACCOUNT 12341678 (CACC)
Test payment of static Pix QRCodes
If you are looking for a way to test the integration flow of a static QRCode, there is a very simple way to test.
After creating a static QRCode in Sandbox, use the endpoint Pay a QRCode sending the payload of your generated QRCode.
POST
/v3/pix/qrCodes/pay
Check the complete reference for this endpoint
{
qrCode: {
payload: '00020126710014br.gov.bcb.pix01362ae3db4c-9f04-44de-9a39-adcc98a334c20209Churrasco520400005303986540550.005802BR5913John Donate6009Joinville62290525JHOND00000000465493ASA6304DB5E'
},
value: 50
}
When performing this action, a Pix type charge will be automatically created, receiving this payment with the pixTransaction
and pixQrCodeId
fields filled in.
Is it possible to disable the critical action token for transfers in Sandbox?
If you need, we can disable the token for transfers in Sandbox. However, it is important for you to know that the TOKEN is a security validation and, in its absence, the account may become more susceptible to inappropriate actions. We suggest, if you have some specific IP or IPs that move the account, to restrict so that only these are allowed and if the Asaas system identifies action from any other IP, it will block the action. You can also use our mechanism for validation of transfers by Webhook, for greater security.
To make this request, send an email to the Integration Success team.
Updated 11 days ago