> ## Documentation Index
> Fetch the complete documentation index at: https://docs.trio.com.br/llms.txt
> Use this file to discover all available pages before exploring further.

# Simulate a successful deposit

> Settle a sandbox deposit end to end by paying your own QR code from a second bank account.

To watch a deposit settle end to end in the sandbox you need two bank accounts: one that creates the QR code and receives the funds, and one that pays it. This guide creates the second account, generates a QR code on it and pays the code from the first account in the [Trio App](https://app.sandbox.trio.com.br). It builds on the [Cash in](https://docs.trio.com.br/v2/guides/receivables/cash-in.md) tutorial.

All examples use the sandbox base URL `https://api.sandbox.trio.com.br`.

**1. Create a second bank account**

In the Trio App, open the menu and go to **Account > Virtual Accounts**. At the top right of the list, click **Create Virtual Account**.

![](https://mintcdn.com/trio-372e8dab/x8bS2HzNhei2b1vu/images/image-\(30\).png?fit=max\&auto=format\&n=x8bS2HzNhei2b1vu\&q=85\&s=490d10fb6e1c6d29429cc338df1358ba)

Select your real bank account (typically there is only one) and give the new account a short description.

![](https://mintcdn.com/trio-372e8dab/x8bS2HzNhei2b1vu/images/image-\(31\).png?fit=max\&auto=format\&n=x8bS2HzNhei2b1vu\&q=85\&s=66af13a2d0071a2c8b0ea19d878b5010)

The new account appears in the list with its own `id` and balance. Your first account starts with BRL 1,000,000.00; the new one starts with BRL 0.00.

Through the API, create the second account with [`POST /v2/bank_accounts`](https://docs.trio.com.br/v2/api-reference/banking-api/bank-accounts/create-bank-account) (`group_id` and `description`) and list both, with their ids and balances, with [`GET /v2/bank_accounts`](https://docs.trio.com.br/v2/api-reference/banking-api/bank-accounts/list-bank-accounts).

**2. Create a QR code that points to the new account**

Send a `POST` to [Create a dynamic QR code](https://docs.trio.com.br/v2/api-reference/banking-api/receivables/pix/qrcode-dynamic/post.md) with the new account's `id` in `bank_account_id`. The amount is in cents (BRL 100.00 = `10000`), so `5000` is a BRL 50.00 deposit.

```http theme={null}
POST /v2/in/pix/qrcodes
```

```json theme={null}
{
    "bank_account_id": "0196102e-f67b-d5f9-300c-f587094bfc5a",
    "counterparty": {
        "tax_number": "41.491.440/0000-11",
        "name": "My Test Company"
    },
    "amount": 5000,
    "external_id": "{{$randomUUID}}",
    "description": "Test Payment in Sandbox",
    "options": {
        "allow_change_the_amount_on_payment": false,
        "show_qrcode_image": false
    }
}
```

Keep the `hash` from the response: it is the BR code (the Pix copy-and-paste code) you pay in the next steps.

**3. Open Pix in the Trio App**

The account with BRL 0.00 receives the deposit; your first account, which holds the balance, pays it. Go to **Move your account > Pix**.

![](https://mintcdn.com/trio-372e8dab/x8bS2HzNhei2b1vu/images/image-\(32\).png?fit=max\&auto=format\&n=x8bS2HzNhei2b1vu\&q=85\&s=bba9bf0639c316d4564427404351ea0f)

**4. Select the origin account**

Choose the first account, the one with the full balance.

![](https://mintcdn.com/trio-372e8dab/x8bS2HzNhei2b1vu/images/image-\(33\).png?fit=max\&auto=format\&n=x8bS2HzNhei2b1vu\&q=85\&s=70838aaf6170e85a485151ea092f32b6)

**5. Paste the BR code**

Paste the `hash` returned by the API.

![](https://mintcdn.com/trio-372e8dab/x8bS2HzNhei2b1vu/images/image-\(34\).png?fit=max\&auto=format\&n=x8bS2HzNhei2b1vu\&q=85\&s=77fb6780b206be68baa7dac6354a4289)

**6. Confirm the payment**

Follow the remaining confirmation screens. The deposit settles, Trio sends the [webhook event](https://docs.trio.com.br/v2/webhooks/events/overview.md), and the transaction appears in your transaction list and in [`GET /v2/documents/in`](https://docs.trio.com.br/v2/api-reference/banking-api/documents/receivables/list-receivables).

![](https://mintcdn.com/trio-372e8dab/x8bS2HzNhei2b1vu/images/image-\(35\).png?fit=max\&auto=format\&n=x8bS2HzNhei2b1vu\&q=85\&s=c2101a6bb4358e2c8856b8aa80d7c170)

## Next steps

* [Simulate deposit failures](https://docs.trio.com.br/v2/guides/receivables/simulating-deposit-failures.md): reproduce rejected and refunded deposits with the same two accounts.
* [Document lifecycle](https://docs.trio.com.br/v2/guides/pix/document-lifecycle.md): the statuses the settled in document went through.
* [Creating your first webhook](https://docs.trio.com.br/v2/guides/creating-your-first-webhook.md): receive the settlement event in your system.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.