Skip to content
developers

FX

Convert with a quote

POST/v1/transactionsSandbox · coming soon

Base URL
Sandboxhttps://sandbox.zulu.com.co/v1
Not in production yet: it arrives with this same signature. Try it in the sandbox.

Executes a current quote: debits the origin currency from your balance and credits the destination one on the settlement date. Send originAmount or destinationAmount; the other side is computed with the factor. If you send both, they must match exactly.

Rounding (f₂ = factor × 100): COP→USD, cents = round(pesos × 10⁴ / f₂); USD→COP, pesos = round(cents × f₂ / 10⁴). With destinationAmount the origin is rounded up so you never receive less than asked. Both sides must stay within the limits of GET /v1/limits.

The conversion stays IN_PROGRESS until settlement and then becomes COMPLETED; it never goes through SENT.

Authentication

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

Request

Headers

  • Idempotency-KeystringoptionalSandbox · coming soon
    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 charactersExample: "7f9c2ba4-e88f-4c6e-9d43-6a8b8f0f5d21"

Body

  • quotestringrequired
    Quote id (GET /v1/quotes), 30 characters long.
    min. 30 charactersmax. 30 charactersExample: "EQ-COPXUSDX-261124150405-SBX7Q"
  • originAmountnumberoptional
    Amount to debit in the origin currency. Required when destinationAmount is not sent.
    > 0Example: 4000000
  • destinationAmountnumberoptional
    Amount to receive in the destination currency. Required when originAmount is not sent.
    > 0Example: 1006.62

Responses

  • 201Conversion created.

    Body
    • transactionIdstringrequired
      Conversion id (see GET /v1/transactions/{transactionId}).
      Example: "SBX-OR-NPTRFI261124W8D3QF-2K"
    • typestringrequired
      Always FX.
      Always "FX"
    • statusstringrequired
      Status: IN_PROGRESS until settlement.

      Values

      • CREATEDCreated. For a Bre-B withdrawal, the transfer is in flight.
      • IN_PROGRESSIn progress: the withdrawal is being paid (ACH or manual) or the conversion awaits settlement.
      • SENTThe money was sent to the beneficiary's bank. Withdrawals only (never FX).
      • COMPLETEDCompleted.
      • REJECTEDRejected. The sandbox reverses the debit automatically; in production operations reverses it.
    • originCurrencystringrequired
      Currency debited.

      Values

      • COPColombian peso (whole pesos).
      • USDUS dollar (up to 2 decimals).
    • originAmountnumberrequired
      Amount debited.
      Example: 4000000
    • destinationCurrencystringrequired
      Currency credited.

      Values

      • COPColombian peso (whole pesos).
      • USDUS dollar (up to 2 decimals).
    • destinationAmountnumberrequired
      Amount credited at settlement.
      Example: 1006.62
    • factornumberrequired
      Factor applied (COP per USD).
      Example: 3973.7
    • factorFormulastringrequired
      Always COP/USD.
      Always "COP/USD"Example: "COP/USD"
    • settlementTermstringrequired
      Settlement term.

      Values

      • SAME_DAYSettles the same business day (before the 13:00 cutoff).
      • NEXT_DAYSettles the next business day.
      • SECOND_DAYSettles on the second business day.
    • settlementDatestring (date)required
      Settlement business day (Bogotá).
      Example: "2026-11-24"
  • 400Invalid request: the body is not JSON, a field has another type or fails its validation.

  • 401The access token is missing, invalid or expired.

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

  • 404The resource does not exist.

  • 409Conflict with the current state.

  • 422The operation can not be processed; nothing is recorded.

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

  • 500Internal error.

Errors

The exact causes this operation can answer, from the error catalog. Compare error and the HTTP status; the cause text is stable but meant for people.

HTTPerrorcauseDescription
400BadRequestApiErrorerror in struct validationOne or more fields fail their validation. values carries one message per field, keyed by its JSON path, naming the Go validator that failed.
400BadRequestApiErrorinvalid json body: %sThe 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.
404NotFoundApiErrorquote "%s" not foundNo quote with that id exists in your workspace.
409ResourceConflictApiErroridempotency key "%s" is still being processedAnother call with the same Idempotency-Key is still running. Retry in a few seconds to receive its response.
422UnprocessableEntityApiErroridempotency key "%s" was used with a different requestThe Idempotency-Key was already used in the last 24 hours with a different body or operation. Use a new key for every distinct operation.
422UnprocessableEntityApiErrorquote "%s" is expiredThe quote expired (it lives 30 seconds). Request a new one.
422UnprocessableEntityApiErrorquote "%s" has already been usedEach quote serves a single conversion.
422UnprocessableEntityApiErrororigin or destination amount wasn't calculated with factor "%v"You sent originAmount and destinationAmount and they do not match the quote's factor. Send only one of them.
422UnprocessableEntityApiErrorinsufficient %s balance to convert %.2fThe balance of the origin currency is not enough.
422UnprocessableEntityApiError%s amount %.2f is below the minimum of %.2fOne side of the conversion is below the minimum (GET /v1/limits).
422UnprocessableEntityApiError%s amount %.2f is above the maximum of %.2fOne side of the conversion exceeds the maximum (GET /v1/limits).
422UnprocessableEntityApiErroramount %v has too many decimals for %s (max %d)The amount has more decimals than its currency allows: COP in whole pesos, USD up to 2 decimals.

Also, like every authenticated endpoint: 401 Unauthorized, 403 Forbidden, 429 Too Many Requests (with Retry-After) and 500.

Examples

Convert 4,000,000 COP to USD201

Request

curl https://sandbox.zulu.com.co/v1/transactions \
  -H "Authorization: Bearer $ZULU_ACCESS_TOKEN" \
  -H "X-API-Key: $ZULU_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "quote": "EQ-COPXUSDX-261124150405-SBX7Q",
  "originAmount": 4000000
}'

Response 201

{
  "transactionId": "SBX-OR-NPTRFI261124W8D3QF-2K",
  "type": "FX",
  "status": "IN_PROGRESS",
  "originCurrency": "COP",
  "originAmount": 4000000,
  "destinationCurrency": "USD",
  "destinationAmount": 1006.62,
  "factor": 3973.7,
  "factorFormula": "COP/USD",
  "settlementTerm": "SAME_DAY",
  "settlementDate": "2026-11-24"
}
Receive exactly 1,000 USD201

Request

curl https://sandbox.zulu.com.co/v1/transactions \
  -H "Authorization: Bearer $ZULU_ACCESS_TOKEN" \
  -H "X-API-Key: $ZULU_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "quote": "EQ-COPXUSDX-261124150405-SBX7Q",
  "destinationAmount": 1000
}'

Response 201

{
  "transactionId": "SBX-OR-NPTRFI261124W8D3QF-2K",
  "type": "FX",
  "status": "IN_PROGRESS",
  "originCurrency": "COP",
  "originAmount": 3973700,
  "destinationCurrency": "USD",
  "destinationAmount": 1000,
  "factor": 3973.7,
  "factorFormula": "COP/USD",
  "settlementTerm": "SAME_DAY",
  "settlementDate": "2026-11-24"
}
No amount at all400

Request

curl https://sandbox.zulu.com.co/v1/transactions \
  -H "Authorization: Bearer $ZULU_ACCESS_TOKEN" \
  -H "X-API-Key: $ZULU_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "quote": "EQ-COPXUSDX-261124150405-SBX7Q"
}'

Response 400

{
  "error": "BadRequestApiError",
  "cause": "error in struct validation",
  "values": {
    "destinationAmount": "failed validation on the \"required_without\" tag with value required \"OriginAmount\"",
    "originAmount": "failed validation on the \"required_without\" tag with value required \"DestinationAmount\""
  }
}
Expired quote422

Request

curl https://sandbox.zulu.com.co/v1/transactions \
  -H "Authorization: Bearer $ZULU_ACCESS_TOKEN" \
  -H "X-API-Key: $ZULU_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "quote": "EQ-COPXUSDX-261124150405-SBX7Q",
  "originAmount": 4000000
}'

Response 422

{
  "error": "UnprocessableEntityApiError",
  "cause": "quote \"EQ-COPXUSDX-261124150405-SBX7Q\" is expired"
}
Two amounts that do not match422

Request

curl https://sandbox.zulu.com.co/v1/transactions \
  -H "Authorization: Bearer $ZULU_ACCESS_TOKEN" \
  -H "X-API-Key: $ZULU_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "quote": "EQ-COPXUSDX-261124150405-SBX7Q",
  "originAmount": 4000000,
  "destinationAmount": 1010
}'

Response 422

{
  "error": "UnprocessableEntityApiError",
  "cause": "origin or destination amount wasn't calculated with factor \"3973.7\""
}