# Simulate an incoming Bre-B transfer

`POST /v1/sandbox/bre-b/transfers/in` · [Sandbox only]

> Base URL: Sandbox `https://sandbox.zulu.com.co/v1`
>
> A test helper: it only exists in the sandbox.

Simulates someone sending you money by Bre-B to one of your keys: creates the deposit, credits your COP balance and sends the `DEPOSITS` webhook. Up to 12,110,000 COP. Exists only in the sandbox.

## Authentication

`Authorization: Bearer <access_token>` (401 when missing or expired) and `X-API-Key` (403 when missing or not matching).

## Request

### Headers

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `Idempotency-Key` | string | optional | Idempotency key (up to 255 characters), valid for 24 hours per workspace. Repeating the call with the same key and body returns the original response with `Idempotent-Replayed: true`; a different body answers 422 and, while the first call is still running, 409. Production ignores it today: every call creates a new resource. max. 255 characters. [Sandbox · coming soon] |

### Body

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `key` | string | required | Your key that receives the transfer. min. 1 characters. |
| `amount` | integer | required | COP amount (whole pesos, up to 12,110,000). > 0. |
| `payer` | object | optional | Simulated payer. Whatever you omit is filled with deterministic synthetic data. |
| `payer.fullName` | string | optional | Full name or company name. max. 120 characters. |
| `payer.documentType` | string | optional | Document type. max. 10 characters. |
| `payer.documentNumber` | string | optional | Document number. max. 20 characters. |
| `payer.bankName` | string | optional | Payer's bank. max. 80 characters. |

## Responses

### 200

Deposit created.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `depositId` | string | required | Deposit id: `SBX-MOV-CREDIT-{uuid}` in the sandbox. |
| `method` | string | required | How it arrived. Values: `PSE` (Payment of a PSE link.), `BRE_B` (Bre-B transfer to one of your keys.), `BRE_B_QR` (Payment of one of your Bre-B QR codes.). |
| `amount` | integer | required | Amount credited (COP, whole pesos). |
| `currency` | string | required | Always `COP`. Always `"COP"`. |
| `reference` | string | required | What it belongs to: the link's `reference` (PSE), the key that received it (Bre-B) or the QR's `reference` (or its id). |
| `externalId` | string | required | Network id (PSE CUS or Bre-B transfer id). Synthetic in the sandbox. |
| `payer` | object | required | Payer of the deposit. In the sandbox the data is synthetic (or what you send to the simulator). |
| `payer.fullName` | string | required | Full name or company name. |
| `payer.documentType` | string | required | Document type. |
| `payer.documentNumber` | string | required | Document number. |
| `payer.bankName` | string | required | Bank the payer paid from. |
| `createdAt` | string (date-time) | required | Arrival (UTC). |

### 400

Invalid request: the body is not JSON, a field has another type or fails its validation.

### 401

The access token is missing, invalid or expired.

### 403

The `X-API-Key` is missing, invalid or does not match the token.

### 404

The resource does not exist.

### 409

Conflict with the current state.

### 422

The operation can not be processed; nothing is recorded.

### 429

Too many requests: wait the seconds in `Retry-After`.

### 500

Internal error.

## Errors

| HTTP | error | cause | Description |
| --- | --- | --- | --- |
| 400 | `BadRequestApiError` | `error in struct validation` | One or more fields fail their validation. `values` carries one message per field, keyed by its JSON path, naming the Go validator that failed. |
| 400 | `BadRequestApiError` | `invalid json body: %s` | The body is not valid JSON, or a field has the wrong type (a string where a number goes, for example). Answered before the fields are validated. |
| 401 | — | `Unauthorized` | The `Authorization: Bearer <access_token>` header is missing, or the token is invalid or expired. |
| 403 | — | `Forbidden` | The `X-API-Key` is missing, unknown, revoked or does not belong to the credentials of the token. |
| 404 | `NotFoundApiError` | `bre-b key "%s" not found` | The key does not exist (in your workspace, or in the Bre-B directory when resolving it). Test data: `@notfound`. |
| 409 | `ResourceConflictApiError` | `idempotency key "%s" is still being processed` | Another call with the same `Idempotency-Key` is still running. Retry in a few seconds to receive its response. |
| 422 | `UnprocessableEntityApiError` | `idempotency key "%s" was used with a different request` | The `Idempotency-Key` was already used in the last 24 hours with a different body or operation. Use a new key for every distinct operation. |
| 422 | `UnprocessableEntityApiError` | `bre-b key "%s" is blocked` | The key is blocked and does not receive payments. |
| 422 | `UnprocessableEntityApiError` | `amount %d is above the bre-b maximum of %d` | Bre-B accepts up to 12,110,000 COP per transfer. |
| 429 | — | `Too Many Requests` | You exceeded the request limit of your credentials. Wait the seconds in `Retry-After`. |
| 500 | `InternalServerApiError` | `[code:1] unexpected error` | Internal error. On operations that move money, check the state before retrying so the operation is not duplicated. |

## Examples

### Receive 250,000 COP at @acmepagos

```bash
curl https://sandbox.zulu.com.co/v1/sandbox/bre-b/transfers/in \
  -H "Authorization: Bearer $ZULU_ACCESS_TOKEN" \
  -H "X-API-Key: $ZULU_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "key": "@acmepagos",
  "amount": 250000,
  "payer": {
    "fullName": "Marta Ruiz",
    "documentType": "CC",
    "documentNumber": "52123456",
    "bankName": "Banco Davivienda"
  }
}'
```

**Response 200**

```json
{
  "depositId": "SBX-MOV-CREDIT-5d1b2f0e-6c3a-4e8b-9f7d-1a2b3c4d5e6f",
  "method": "BRE_B",
  "amount": 250000,
  "currency": "COP",
  "reference": "@acmepagos",
  "externalId": "SBXBREB2611241504052K9Q",
  "payer": {
    "fullName": "Marta Ruiz",
    "documentType": "CC",
    "documentNumber": "52123456",
    "bankName": "Banco Davivienda"
  },
  "createdAt": "2026-11-24T15:04:05.123Z"
}
```

### Amount above the Bre-B maximum

```bash
curl https://sandbox.zulu.com.co/v1/sandbox/bre-b/transfers/in \
  -H "Authorization: Bearer $ZULU_ACCESS_TOKEN" \
  -H "X-API-Key: $ZULU_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "key": "@acmepagos",
  "amount": 15000000
}'
```

**Response 422**

```json
{
  "error": "UnprocessableEntityApiError",
  "cause": "amount 15000000 is above the bre-b maximum of 12110000"
}
```

### Amount with decimals

```bash
curl https://sandbox.zulu.com.co/v1/sandbox/bre-b/transfers/in \
  -H "Authorization: Bearer $ZULU_ACCESS_TOKEN" \
  -H "X-API-Key: $ZULU_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "key": "@acmepagos",
  "amount": 250000.5
}'
```

**Response 400**

```json
{
  "error": "BadRequestApiError",
  "cause": "invalid json body: json: cannot unmarshal number 250000.5 into Go struct field SimulateBreBTransferInRequest.amount of type int64"
}
```
