# Test scenarios (/en/docs/pix-processamento/sandbox/cenarios)

<QuickLinks>
  <QuickLink href="/docs/pix-processamento/sandbox" title="Sandbox" />

  <QuickLink href="/docs/pix-processamento/sandbox/credencial" title="Generate a credential" />

  <QuickLink href="/docs/pix-processamento/sandbox/webhooks" title="Webhooks in the sandbox" />

  <QuickLink href="/docs/pix-processamento/endpoints" title="API Reference" />
</QuickLinks>

## Differences from production [#differences-from-production]

| Item                                       | Production                            | Sandbox                                                                                                                           |
| ------------------------------------------ | ------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------- |
| Host                                       | `api.payzu.processamento.com`         | `pix.sandbox.payzu.dev`                                                                                                           |
| Credential                                 | Account token, issued after approval  | `sbx_...` issued by e-mail and code, valid for 24 hours                                                                           |
| Charge (`POST /v1/pix`)                    | Paid when the payer completes the Pix | Starts `PENDING` and becomes `COMPLETED` 10 seconds later, firing the webhook signed as in production                             |
| Withdrawal by key (`POST /v1/withdraw`)    | Depends on the provider               | Below R$ 10.00 `CANCELED`; from R$ 10.00 to R$ 100.00 `COMPLETED` immediately; above R$ 100.00 `PENDING`, completes in 10 seconds |
| Refund (`POST /v1/refund/{transactionId}`) | Depends on the provider               | Below R$ 1.00 provider error; below R$ 10.00 `CANCELED`; from R$ 10.00 `COMPLETED`                                                |
| DICT and QR reading                        | Real lookup                           | Deterministic fixtures: the same id always returns the same response                                                              |
| Infractions (MED)                          | Your account's                        | 12 samples per credential, open (`OPEN`)                                                                                          |
| Registered webhook                         | Delivers right away                   | Delivers only after proving ownership of the endpoint ([Webhooks in the sandbox](/docs/pix-processamento/sandbox/webhooks))       |
| Limits                                     | Per account                           | 60 requests per minute and 2,000 per day per credential; 3 codes per hour per e-mail                                              |
| Reset                                      | Not applicable                        | There is no reset route and no route to force a status. A clean environment is a new credential                                   |

The withdrawal cut-off amounts exist so you can test the three paths (canceled, pending, completed) without an admin route: just pick the amount. For refunds, the cut-offs test provider error, canceled and completed; there is no pending refund. The rest of the contract (fields, enums, pagination, error envelope) is identical to production.

<Flow>
  <FlowNode title="Withdrawal < R$ 10" subtitle="CANCELED" />

  <FlowNode title="R$ 10 to R$ 100" subtitle="COMPLETED right away" />

  <FlowNode title="Withdrawal > R$ 100" subtitle="PENDING, completes in 10s" />
</Flow>

## Refund by amount range [#refund-by-amount-range]

```bash
curl -X POST https://pix.sandbox.payzu.dev/v1/refund/$TRANSACTION_ID \
  -H "Authorization: Bearer $SANDBOX_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"amount":25.00,"description":"Teste de estorno"}'
```

From R$ 10.00 the refund completes (`COMPLETED`) and the original charge becomes `REFUNDED` when the amount is the full one. Below R$ 10.00 the refund is canceled; below R$ 1.00 the simulated provider returns an error.