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. |
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.
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:
Scenario | Description | Field | Value |
---|---|---|---|
500 Error | Returns a standard 500 error from our partner platform | CVV | 500 |
400 Error | Returns a standard 400 Bad Request error response | CVV | 400 |
To simulate the full successful flow:β
- Use a valid 3DS Setup test card or token.
- Then, simulate a successful 3DS Enrollment.
- Save the generated chargeId.
- 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.