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.

3DS Authorization Endpoint​

This endpoint simulates the final stage of 3DS authentication, where the transaction is either approved or rejected after completing the setup and enrollment steps.

Important!

To test this endpoint successfully in the sandbox, you must first complete the 3DS Setup and Enrollment endpoints using a valid test card or token.

This will generate a chargeId that is required for this endpoint. If you try to use a chargeId that has not gone through the previous steps, you will receive the following error:

{
"message": "3D Secure Authentication not found with chargeId: ff46de80-f29b-4ed5-8d24-bdad5f49a8d7",
"success": false
}

Simulation Scenarios​

By default, all valid requests to this endpoint are successful. To simulate error scenarios, use the following CVV values:

ScenarioDescriptionFieldValue
500 ErrorReturns a standard 500 error from our partner platformCVV500
400 ErrorReturns a standard 400 Bad Request error responseCVV400

To simulate the full successful flow:​

  1. Use a valid 3DS Setup test card or token.
  2. Then, simulate a successful 3DS Enrollment.
  3. Save the generated chargeId.
  4. Use this chargeId to call the 3DS Authorization endpoint and test different outcomes with the values above.

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.