# Test cards (/en/docs/cartao/test-cards)

<QuickLinks>
  <QuickLink href="/docs/cartao/getting-started" title="Getting started" />

  <QuickLink href="/docs/cartao/three-d-secure" title="3DS" />

  <QuickLink href="/docs/cartao/error-codes" title="Return codes" />

  <QuickLink href="/docs/cartao/transaction-status" title="Transaction status" />
</QuickLinks>

Use the cards below to simulate the different outcomes of a transaction in the sandbox environment, both the standard authorization flow and the 3DS authentication scenarios.

## Test cards (simulated) [#test-cards-simulated]

Each card number simulates a transaction status and returns the corresponding return code and return message:

| Transaction Status   | Cards                                                  | Return code | Return Message                    |
| -------------------- | ------------------------------------------------------ | ----------- | --------------------------------- |
| Authorized           | 0000000000000000 / 0000000000000001 / 0000000000000004 | 6           | Operação realizada com sucesso    |
| Not Authorized       | 0000000000000002                                       | 05          | Not Authorized                    |
| Not Authorized       | 0000000000000003                                       | 57          | Cartão Expirado                   |
| Not Authorized       | 0000000000000005                                       | 78          | Cartão Bloqueado                  |
| Not Authorized       | 0000000000000006                                       | 99          | Time Out                          |
| Not Authorized       | 0000000000000007                                       | 77          | Cartão Cancelado                  |
| Not Authorized       | 0000000000000008                                       | 70          | Problemas com o Cartão de Crédito |
| Random Authorization | 0000000000000009                                       | 4 to 99     | Operation Successful / Time Out   |

<Callout type="warn">
  The simulation looks only at the last digit of the number. Any Mod10-valid card ending in `1` falls on the `0000000000000001` row, which is why the examples in this documentation use `4111111111111111` and come back Authorized.
</Callout>

<Callout type="info">
  If the goal is to test a transaction on the Payment Gateway using a card number, we recommend using a card number generator that satisfies the Mod10 rule (Luhn Algorithm). This practice is valid for both sandbox and production environments.
</Callout>

## 3DS test cards [#3ds-test-cards]

If you want to simulate a specific [3DS](/docs/cartao/three-d-secure) authentication scenario, you can use the test cards below in the sandbox environment.

### Test cards with challenge [#test-cards-with-challenge]

| CARD             | BRAND                                              | RESULT     | DESCRIPTION                                                             |
| ---------------- | -------------------------------------------------- | ---------- | ----------------------------------------------------------------------- |
| 4000000000001091 | <CardBrand brand="visa" showLabel="false" />       | SUCCESS    | Authentication with challenge and cardholder authenticated successfully |
| 5200000000001096 | <CardBrand brand="mastercard" showLabel="false" /> | SUCCESS    | Authentication with challenge and cardholder authenticated successfully |
| 6505050000001091 | <CardBrand brand="elo" showLabel="false" />        | SUCCESS    | Authentication with challenge and cardholder authenticated successfully |
| 4000000000001109 | <CardBrand brand="visa" showLabel="false" />       | FAILURE    | Authentication with challenge and cardholder authentication failed      |
| 5200000000001104 | <CardBrand brand="mastercard" showLabel="false" /> | FAILURE    | Authentication with challenge and cardholder authentication failed      |
| 6505050000001109 | <CardBrand brand="elo" showLabel="false" />        | FAILURE    | Authentication with challenge and cardholder authentication failed      |
| 4000000000001117 | <CardBrand brand="visa" showLabel="false" />       | UNENROLLED | Authentication with challenge unavailable at the moment                 |
| 5200000000001112 | <CardBrand brand="mastercard" showLabel="false" /> | UNENROLLED | Authentication with challenge unavailable at the moment                 |
| 6505050000001117 | <CardBrand brand="elo" showLabel="false" />        | UNENROLLED | Authentication with challenge unavailable at the moment                 |
| 4000000000001125 | <CardBrand brand="visa" showLabel="false" />       | UNENROLLED | System error during the authentication step                             |
| 5200000000001120 | <CardBrand brand="mastercard" showLabel="false" /> | UNENROLLED | System error during the authentication step                             |
| 6505050000001125 | <CardBrand brand="elo" showLabel="false" />        | UNENROLLED | System error during the authentication step                             |

### Test cards without challenge [#test-cards-without-challenge]

| CARD             | BRAND                                              | RESULT     | DESCRIPTION                                                                |
| ---------------- | -------------------------------------------------- | ---------- | -------------------------------------------------------------------------- |
| 4000000000001000 | <CardBrand brand="visa" showLabel="false" />       | SUCCESS    | Authentication without challenge and cardholder authenticated successfully |
| 5200000000001005 | <CardBrand brand="mastercard" showLabel="false" /> | SUCCESS    | Authentication without challenge and cardholder authenticated successfully |
| 6505050000001000 | <CardBrand brand="elo" showLabel="false" />        | SUCCESS    | Authentication without challenge and cardholder authenticated successfully |
| 4000000000001000 | <CardBrand brand="visa" showLabel="false" />       | UNENROLLED | Authentication without challenge and cardholder authentication failed      |
| 5200000000001005 | <CardBrand brand="mastercard" showLabel="false" /> | UNENROLLED | Authentication without challenge and cardholder authentication failed      |
| 6505050000001000 | <CardBrand brand="elo" showLabel="false" />        | UNENROLLED | Authentication without challenge and cardholder authentication failed      |

<Callout type="info">
  The numbers above reproduce the official PayZu reference exactly. In the no-challenge table, the reference itself lists the same cards for the success and the failure scenarios. Before automating tests for these scenarios, confirm with support which number to use for each one.
</Callout>

## Next steps [#next-steps]

<QuickLinks>
  <QuickLink href="/docs/cartao/endpoints/charges/post_charges" title="Create charge" method="POST" path="/charges" />

  <QuickLink href="/docs/cartao/three-d-secure" title="3DS" />

  <QuickLink href="/docs/cartao/error-codes" title="Return codes" />
</QuickLinks>