Test Scenarios
In the sandbox environment, you can test different transaction scenarios to understand how the API responds in different situations. By default, all authorization attempts are configured to pass. To simulate other flows, use the following test cards or temporary tokens:
Test Cardsβ
Card Number | Test Scenario | Result Description |
---|---|---|
4389355432185991 | Authorization Denied | This card simulates a scenario where authorization is denied. Use it to test how your application handles denied transactions. |
4716100289307782 5597773670668839 | 3Ds Setup | These cards simulate a scenario where 3DS configuration is authorized. |
5466245842998772 | 3DS Enrollment - Rejected | This card simulates a scenario where the 3DS enrollment is rejected. Use it to test how your application handles rejected 3DS enrollment transactions. |
5245581323894413 | 3DS Enrollment - with Challenge | This card simulates a scenario where the 3DS enrollment generates a challenge. Use it to test how your application handles 3DS enrollment transactions that generate a challenge. |
4389355432185992 | Internal Error | This card causes an internal error on the server (Error 500). Use it to check how robust your application is in dealing with unexpected API failures. |
Temporary Tokens for Testingβ
Temporary Token | Test Scenario | Result Description |
---|---|---|
card_t/BIChj63GkO650jVX0xSsIeRD03GxDY | Authorization Denied | This token simulates a scenario where authorization is denied. Use it to test how your application handles denied transactions. |
card_ZVHmBRSw3EjkJ7s93Vm4S5FiZwuQjgTi card_RtyG5hOw3EiJ8EJbwFHGQJJNDB0pqBXJ | 3Ds Setup | These tokens simulate a scenario where 3Ds configuration is authorized. |
card_icZKwUvB3EgIJiPqTLXwQZBdcls8Hx5t | 3DS Enrollment - Rejected | This token simulates a scenario where the 3DS enrollment is rejected. Use it to test how your application handles rejected 3DS enrollment transactions. |
card_7HdM7UvB3EgC0FQQ1/LSS5gF8OU5Ie6r | 3DS Enrollment - with Challenge | This token simulates a scenario where the 3DS enrollment generates a challenge. Use it to test how your application handles 3DS enrollment transactions that generate a challenge. |
card_t/CIChk54HlP760kWY1yTtJfSE14HyEZ | Internal Error | This token causes an internal error on the server (Error 500). Use it to check how robust your application is in dealing with unexpected API failures. |
Timeout Testsβ
Endpoint | Field - Value | Description of the Result |
---|---|---|
/charge/pix | transactions.pix.expiration - 321 | Passing 321 as the PIX expiration period will cause an internal communication error by timeout (502 Error). Use this to verify the robustness of your application in handling unexpected API failures. |
/charge/wallet | customer.name - Pessoa timeout | Passing Pessoa timeout as the customer name will cause an internal communication error by timeout (502 Error). Use this to verify the robustness of your application in handling unexpected API failures. |
Testing Tipsβ
- Be sure to test all scenarios to ensure your application can handle different API responses.
- Observe how your application handles errors and response messages provided by the API.
By using these cards or temporary tokens in your testing in the sandbox environment, you can prepare your application to handle a variety of situations that may occur in a production environment.