Skip to main content

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 NumberTest ScenarioResult Description
4389355432185991Authorization DeniedThis card simulates a scenario where authorization is denied. Use it to test how your application handles denied transactions.
4716100289307782
5597773670668839
3Ds SetupThese cards simulate a scenario where 3DS configuration is authorized.
54662458429987723DS Enrollment - RejectedThis card simulates a scenario where the 3DS enrollment is rejected. Use it to test how your application handles rejected 3DS enrollment transactions.
52455813238944133DS Enrollment - with ChallengeThis 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.
4389355432185992Internal ErrorThis 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 TokenTest ScenarioResult Description
card_t/BIChj63GkO650jVX0xSsIeRD03GxDYAuthorization DeniedThis token simulates a scenario where authorization is denied. Use it to test how your application handles denied transactions.
card_ZVHmBRSw3EjkJ7s93Vm4S5FiZwuQjgTi
card_RtyG5hOw3EiJ8EJbwFHGQJJNDB0pqBXJ
3Ds SetupThese tokens simulate a scenario where 3Ds configuration is authorized.
card_icZKwUvB3EgIJiPqTLXwQZBdcls8Hx5t3DS Enrollment - RejectedThis token simulates a scenario where the 3DS enrollment is rejected. Use it to test how your application handles rejected 3DS enrollment transactions.
card_7HdM7UvB3EgC0FQQ1/LSS5gF8OU5Ie6r3DS Enrollment - with ChallengeThis 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/CIChk54HlP760kWY1yTtJfSE14HyEZInternal ErrorThis 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​

EndpointField - ValueDescription of the Result
/charge/pixtransactions.pix.expiration - 321Passing 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/walletcustomer.name - Pessoa timeoutPassing 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.