# Sandbox (/en/docs/pix-processamento/sandbox)

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

  <QuickLink href="/docs/pix-processamento/sandbox/cenarios" title="Test scenarios" />

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

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

The sandbox is a public copy of the Pix API for development and automated tests. It answers at `https://pix.sandbox.payzu.dev` with the same `/v1` routes as production: code that works here works there by changing only the host.

<Flow>
  <FlowNode title="Your application" subtitle="same code" />

  <FlowArrow label="/v1" />

  <FlowNode title="Sandbox" subtitle="pix.sandbox.payzu.dev" />

  <FlowArrow label="then just switch the host" />

  <FlowNode title="Production" subtitle="api.payzu.processamento.com" />
</Flow>

* **No sign-up.** You enter an e-mail, confirm a 6-digit code and get the credential right away: [Generate a credential](/docs/pix-processamento/sandbox/credencial).
* **No real data.** No production account, transaction or Pix key exists in the sandbox, and nothing created there reaches production. Do not use real customer documents, keys or e-mails in your tests.
* **24 hours.** The credential and everything it created (transactions, webhooks, infractions) disappear after 24 hours. There is no renewal: generate another credential.

The sandbox does not replace certification with your production account. The payer is simulated, settlement is automatic and amounts follow fixed rules. It exists so you can write and test the integration before you have a credential, and to keep automated tests stable.

## First charge [#first-charge]

With the credential in `SANDBOX_TOKEN` (see [Generate a credential](/docs/pix-processamento/sandbox/credencial)):

```bash
curl -X POST https://pix.sandbox.payzu.dev/v1/pix \
  -H "Authorization: Bearer $SANDBOX_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"amount":25.00,"clientReference":"pedido-123"}'
```

The charge starts as `PENDING`. Ten seconds later it becomes `COMPLETED` and the registered webhook receives `TRANSACTION_COMPLETED` with `X-Callback-Signature`.

```bash
curl "https://pix.sandbox.payzu.dev/v1/pix?clientReference=pedido-123" \
  -H "Authorization: Bearer $SANDBOX_TOKEN"
```

After the 10 seconds, the response brings `status: "COMPLETED"`, `endToEndId` and `paidAt`. The same lookup works by `id` or `endToEndId`, as in [`GET /v1/pix`](/docs/pix-processamento/endpoints/pix-operations/get_pix).

## Endpoint reference [#endpoint-reference]

The [API reference](/docs/pix-processamento/endpoints) applies to both environments: same route, same fields, different host. The `/sandbox/...` routes exist only in the sandbox and are described in this section.

<QuickLinks>
  <QuickLink href="/docs/pix-processamento/endpoints/pix-operations/post_pix" title="POST /pix" />

  <QuickLink href="/docs/pix-processamento/endpoints/webhooks/post_user_webhook" title="POST /user/webhooks" />

  <QuickLink href="/docs/pix-processamento/endpoints/refunds/post_refund" title="POST /refund" />

  <QuickLink href="/docs/pix-processamento/tutoriais/receive-pix" title="Tutorial · Receive Pix" />
</QuickLinks>