# How do I try bank data in the Sandbox in ten minutes?

Source: https://help.didit.me/bank-verification/try-bank-data-in-the-sandbox
Updated: 2026-11-23

Create an API key with the Bank data resource, create a link, open it, pick the Didit Test Bank, read the accounts and balances, and receive the webhooks.

In a Sandbox application, create an API key that carries the **Bank data** resource, create a link with one API call, open it, pick the **Didit Test Bank**, then read the accounts, balances and transactions and watch the bank webhooks arrive.
It takes about ten minutes, it never touches a real bank and it is free.
Live applications cannot use the Bank data API yet: live banks are being opened, and Sandbox is available today.

> **Note:** Keep the API key on your server. It never goes in a browser or an app, and it is shown only once.
> Every call below uses the same `x-api-key` header, and every response is shortened here to the fields that matter.

## What you need

- A Didit account and a Sandbox application. See [testing in Sandbox](https://help.didit.me/getting-started/sandbox-and-testing).
- A terminal that can run `curl`, or a developer on your team. Each call has its reference page in the Didit documentation.

## Step 1: create an API key with the Bank data resource

In the console, switch to your Sandbox application and open **Developers → API keys**.
Press **Create key**, choose **Custom** access and add **Bank data**.
Choose **Read** for the calls that only read and **Write** for the calls that create, change or delete something, which this walk-through needs.
Bank data is not part of full access, so a full-access key and the Primary key are refused on every Bank data call.
Copy the secret and export it:

```bash
export DIDIT_API_KEY="your-sandbox-key"
```

## Step 2: create a link

A link is one run of the screens where a person connects a bank.
Create an ongoing one for the Didit Test Bank.
The reference is [create a bank link](https://docs.didit.me/standalone-apis/bank-link-create).

```bash
curl -X POST https://verification.didit.me/v3/bank/links/ \
  -H "x-api-key: $DIDIT_API_KEY" \
  -H "content-type: application/json" \
  -d '{
    "access": "ongoing",
    "country": "ESP",
    "data": ["accounts", "balances", "transactions"],
    "history_days": 90,
    "vendor_data": "client-7731"
  }'
```

Keep the link `id` with your user.
The `url` in the answer is returned once, when the link is created.
For a one-time read send `"access": "one_time"`, which is also the default.
You can also create a link in the console: in your Sandbox application open **Bank verification → Connections** and press **Create a link**.

## Step 3: open the link and connect the Didit Test Bank

Open the `url` in a browser.
Accept the consent screen, pick **Didit Test Bank**, choose a test customer and the accounts to share, and finish.
The [four screens](https://help.didit.me/bank-verification/how-a-person-connects-their-bank) are the ones a real person sees.
A Sandbox link sends no email.

| Test customer | What it gives you |
|---|---|
| `personal_basic` | One current account with 60 movements over about 90 days |
| `business_multi` | Three accounts held by a company |
| `long_history` | One account with a long history to page through |
| `pending` | A history that includes pending transactions |
| `sparse_fields` | A bank that sends no value date, no counterparty IBAN and no bank reference |
| `no_ongoing` | A bank that only allows one-time access |

## Step 4: receive the webhooks and confirm the link

In **Developers → Webhooks** add an endpoint and subscribe it to the bank events.
See [getting results with webhooks](https://help.didit.me/integration/webhooks-basics).
When the person finishes, `bank.link.completed` arrives with the link id and the connection id, then `bank.connection.created` when the first read has stored the accounts.
Never trust a link id sent by a browser: read the link yourself with [get a bank link](https://docs.didit.me/standalone-apis/bank-link-get).

```bash
curl https://verification.didit.me/v3/bank/links/$LINK_ID/ -H "x-api-key: $DIDIT_API_KEY"
```

The answer shows `"status": "completed"` and a `connection_id`.

## Step 5: read the accounts, balances and transactions

Use the connection id, then an account id from the answer.
The references are [list accounts](https://docs.didit.me/standalone-apis/bank-accounts-list), [account balances](https://docs.didit.me/standalone-apis/bank-account-balances) and [account transactions](https://docs.didit.me/standalone-apis/bank-account-transactions).

```bash
curl https://verification.didit.me/v3/bank/connections/$CONNECTION_ID/accounts/ -H "x-api-key: $DIDIT_API_KEY"
curl https://verification.didit.me/v3/bank/accounts/$ACCOUNT_ID/balances/ -H "x-api-key: $DIDIT_API_KEY"
curl "https://verification.didit.me/v3/bank/accounts/$ACCOUNT_ID/transactions/?date_from=2026-01-01" -H "x-api-key: $DIDIT_API_KEY"
```

Amounts are decimal strings, negative for money out.

## Step 6: follow the changes

The change feed returns only what changed since your last read, and a sync can be asked for on demand.
See [the change feed](https://docs.didit.me/standalone-apis/bank-transactions-sync) and [sync now](https://docs.didit.me/standalone-apis/bank-connection-refresh).
The quickstart in the documentation has every request.

## Step 7: stop access and delete when you are done

Stopping access and deleting are two different calls.
See [stopping access and deleting a connection](https://help.didit.me/bank-verification/stop-access-and-delete-a-bank-connection).

## If something does not work

- A `403` with `bank_data_access_denied` means the key does not carry the **Bank data** resource. Create a key that does.
- A `404` in a Live application is expected: the Bank data API is open to Sandbox applications only for now.
- A return address other than `localhost` is refused in Sandbox.

## Related

- [Bank data quickstart in the Didit documentation](https://docs.didit.me/core-technology/bank-verification/quickstart)
- [Bank data Sandbox and test customers in the Didit documentation](https://docs.didit.me/core-technology/bank-verification/sandbox)
- [Managing your API keys](https://help.didit.me/account-organization/api-keys)
