# Advance a transaction

`POST /v1/sandbox/transactions/{transactionId}/advance` · [Sandbox only]

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

Skips the simulated wait: moves a transaction to the next status of its flow, or to the `status` you ask for (`SENT`, `COMPLETED` or `REJECTED`). `REJECTED` reverses the debit. Every change sends the `TRANSACTIONS` webhook. A `COMPLETED` or `REJECTED` transaction never changes again, and a conversion never goes through `SENT`. 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

### Path parameters

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `transactionId` | string | required | Transaction id. |

### 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 |
| --- | --- | --- | --- |
| `status` | string | optional | Status to move it to. Without `status`, it moves to the next one of its flow. Values: `SENT` (Sent to the bank (ACH or manual withdrawals only).), `COMPLETED` (Completed.), `REJECTED` (Rejected (reverses the debit).). |
| `rejectionReason` | string | optional | Reason, only with `status: REJECTED`. max. 120 characters. |

## Responses

### 200

The transaction in its new status.

One of these shapes:

**Shape TransferTransaction**

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `transactionId` | string | required | Identifier of the transaction (the order id in zulu). In the sandbox: `SBX-OR-{SO\|NP}TRFI{YYMMDD}{6}-{2}`. |
| `type` | string | required | Withdrawal. Always `"TRANSFER"`. |
| `status` | string | required | Current status. Values: `CREATED` (Created. For a Bre-B withdrawal, the transfer is in flight.), `IN_PROGRESS` (In progress: the withdrawal is being paid (ACH or manual) or the conversion awaits settlement.), `SENT` (The money was sent to the beneficiary's bank. Withdrawals only (never FX).), `COMPLETED` (Completed.), `REJECTED` (Rejected. The sandbox reverses the debit automatically; in production operations reverses it.). |
| `method` | string | required | How the money was sent. Values: `BRE_B` (Bre-B: `breBKey` was sent and the amount is within the Bre-B maximum.), `ACH` (Online ACH: a bank with an ACH code, whole pesos and within the current caps.), `MANUAL` (Manual payment: in any other case, or when the online transfer could not go out. Not an error.). |
| `amount` | number | required | Amount withdrawn (COP, up to 2 decimals). |
| `currency` | string | required | Always `COP`. Always `"COP"`. |
| `fee` | number | required | Dispersion fee, debited on top of the amount. |
| `note` | string \| null | required | The withdrawal `note`, if sent. |
| `destination` | object | required | Where the money went. |
| `destination.entityType` | string | required | Beneficiary type. Values: `person` (Natural person (an individual).), `company` (Company (legal entity).). |
| `destination.documentType` | string | required | Document type. |
| `destination.documentNumber` | string | required | Document number. |
| `destination.name` | string | required | Full name or company name, as registered. |
| `destination.bankCode` | string \| null | required | ACH code of the bank; `null` when unknown. |
| `destination.bankName` | string \| null | required | Bank name; `null` when unknown. |
| `destination.accountType` | string | required | Account type (normalized). Values: `ahorros` (Savings account.), `corriente` (Checking account.). |
| `destination.accountNumber` | string | required | Account number. |
| `destination.breBKey` | string \| null | required | Bre-B key used; `null` when none was sent. |
| `rejectionReason` | string \| null | required | Rejection reason; `null` except when `REJECTED`. |
| `statusHistory` | array<object> | required | Status changes, oldest first. |
| `statusHistory[].status` | string | required | Status reached. Values: `CREATED` (Created. For a Bre-B withdrawal, the transfer is in flight.), `IN_PROGRESS` (In progress: the withdrawal is being paid (ACH or manual) or the conversion awaits settlement.), `SENT` (The money was sent to the beneficiary's bank. Withdrawals only (never FX).), `COMPLETED` (Completed.), `REJECTED` (Rejected. The sandbox reverses the debit automatically; in production operations reverses it.). |
| `statusHistory[].at` | string (date-time) | required | When it changed (UTC). |
| `createdAt` | string (date-time) | required | Creation time (UTC). |
| `updatedAt` | string (date-time) | required | Last update (UTC). |

**Shape FxTransaction**

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `transactionId` | string | required | Identifier of the transaction (the order id in zulu). In the sandbox: `SBX-OR-{SO\|NP}TRFI{YYMMDD}{6}-{2}`. |
| `type` | string | required | Conversion. Always `"FX"`. |
| `status` | string | required | Current status (never `SENT`). Values: `CREATED` (Created. For a Bre-B withdrawal, the transfer is in flight.), `IN_PROGRESS` (In progress: the withdrawal is being paid (ACH or manual) or the conversion awaits settlement.), `SENT` (The money was sent to the beneficiary's bank. Withdrawals only (never FX).), `COMPLETED` (Completed.), `REJECTED` (Rejected. The sandbox reverses the debit automatically; in production operations reverses it.). |
| `amount` | number | required | Origin amount debited. |
| `currency` | string | required | Origin currency. Values: `COP` (Colombian peso (whole pesos).), `USD` (US dollar (up to 2 decimals).). |
| `fee` | number | required | Always 0: the margin is in the factor. |
| `fx` | object | required | Both sides of the conversion. |
| `fx.quote` | string | required | Quote used. |
| `fx.originCurrency` | string | required | Currency debited. Values: `COP` (Colombian peso (whole pesos).), `USD` (US dollar (up to 2 decimals).). |
| `fx.originAmount` | number | required | Amount debited. |
| `fx.destinationCurrency` | string | required | Currency credited. Values: `COP` (Colombian peso (whole pesos).), `USD` (US dollar (up to 2 decimals).). |
| `fx.destinationAmount` | number | required | Amount credited at settlement. |
| `fx.factor` | number | required | Quote factor (COP per USD). |
| `fx.factorFormula` | string | required | Factor formula. Always `"COP/USD"`. |
| `fx.settlementTerm` | string | required | Settlement term. Values: `SAME_DAY` (Settles the same business day (before the 13:00 cutoff).), `NEXT_DAY` (Settles the next business day.), `SECOND_DAY` (Settles on the second business day.). |
| `fx.settlementDate` | string (date) | required | Settlement business day (Bogotá). |
| `rejectionReason` | string \| null | required | Rejection reason; `null` except when `REJECTED`. |
| `statusHistory` | array<object> | required | Status changes, oldest first. |
| `statusHistory[].status` | string | required | Status reached. Values: `CREATED` (Created. For a Bre-B withdrawal, the transfer is in flight.), `IN_PROGRESS` (In progress: the withdrawal is being paid (ACH or manual) or the conversion awaits settlement.), `SENT` (The money was sent to the beneficiary's bank. Withdrawals only (never FX).), `COMPLETED` (Completed.), `REJECTED` (Rejected. The sandbox reverses the debit automatically; in production operations reverses it.). |
| `statusHistory[].at` | string (date-time) | required | When it changed (UTC). |
| `createdAt` | string (date-time) | required | Creation time (UTC). |
| `updatedAt` | string (date-time) | required | Last update (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` | `transaction "%s" not found` | No transaction with that id exists in your workspace. |
| 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` | `transaction "%s" cannot move from %s to %s` | The requested status does not follow the current one (a `COMPLETED` transaction never changes again, and FX never goes through `SENT`). |
| 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

### To the next status

```bash
curl https://sandbox.zulu.com.co/v1/sandbox/transactions/SBX-OR-NPTRFI261124K7Q2M9-X4/advance \
  -H "Authorization: Bearer $ZULU_ACCESS_TOKEN" \
  -H "X-API-Key: $ZULU_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

**Response 200**

```json
{
  "transactionId": "SBX-OR-NPTRFI261124K7Q2M9-X4",
  "type": "TRANSFER",
  "status": "SENT",
  "method": "ACH",
  "amount": 150000,
  "currency": "COP",
  "fee": 0,
  "note": "Pago factura 1234",
  "destination": {
    "entityType": "person",
    "documentType": "CC",
    "documentNumber": "1020304050",
    "name": "LUIS GÓMEZ",
    "bankCode": "0007",
    "bankName": "Bancolombia",
    "accountType": "ahorros",
    "accountNumber": "0012345678",
    "breBKey": null
  },
  "rejectionReason": null,
  "statusHistory": [
    {
      "status": "IN_PROGRESS",
      "at": "2026-11-24T15:04:05.123Z"
    },
    {
      "status": "SENT",
      "at": "2026-11-24T15:04:10.000Z"
    }
  ],
  "createdAt": "2026-11-24T15:04:05.123Z",
  "updatedAt": "2026-11-24T15:04:10.000Z"
}
```

### Reject a withdrawal

```bash
curl https://sandbox.zulu.com.co/v1/sandbox/transactions/SBX-OR-NPTRFI261124K7Q2M9-X4/advance \
  -H "Authorization: Bearer $ZULU_ACCESS_TOKEN" \
  -H "X-API-Key: $ZULU_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "status": "REJECTED",
  "rejectionReason": "Cuenta embargada"
}'
```

**Response 200**

```json
{
  "transactionId": "SBX-OR-NPTRFI261124K7Q2M9-X4",
  "type": "TRANSFER",
  "status": "REJECTED",
  "method": "ACH",
  "amount": 150000,
  "currency": "COP",
  "fee": 0,
  "note": "Pago factura 1234",
  "destination": {
    "entityType": "person",
    "documentType": "CC",
    "documentNumber": "1020304050",
    "name": "LUIS GÓMEZ",
    "bankCode": "0007",
    "bankName": "Bancolombia",
    "accountType": "ahorros",
    "accountNumber": "0012345678",
    "breBKey": null
  },
  "rejectionReason": "Cuenta embargada",
  "statusHistory": [
    {
      "status": "IN_PROGRESS",
      "at": "2026-11-24T15:04:05.123Z"
    },
    {
      "status": "SENT",
      "at": "2026-11-24T15:04:10.000Z"
    },
    {
      "status": "REJECTED",
      "at": "2026-11-24T15:04:12.000Z"
    }
  ],
  "createdAt": "2026-11-24T15:04:05.123Z",
  "updatedAt": "2026-11-24T15:04:12.000Z"
}
```

### An already completed transaction

```bash
curl https://sandbox.zulu.com.co/v1/sandbox/transactions/SBX-OR-NPTRFI261124K7Q2M9-X4/advance \
  -H "Authorization: Bearer $ZULU_ACCESS_TOKEN" \
  -H "X-API-Key: $ZULU_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "status": "SENT"
}'
```

**Response 422**

```json
{
  "error": "UnprocessableEntityApiError",
  "cause": "transaction \"SBX-OR-NPTRFI261124K7Q2M9-X4\" cannot move from COMPLETED to SENT"
}
```
