Skip to content
developers

FX / Use cases

An importer buys USD

Buy exactly the dollars you owe your supplier, with the rate locked and the cost in pesos known before you execute.

Sandbox · coming soon

An importer must pay 1,000 USD to a supplier abroad. It needs to know how many pesos that costs before committing, and to receive exactly those dollars in its USD balance.

The flow

  1. Check its COP balance.
  2. Quote COP→USD with the term it needs.
  3. Execute with destinationAmount: 1000: zulu computes the pesos, rounding up.
  4. Follow the conversion until COMPLETED: the 1,000 USD land in its zulu USD balance.

1. Available balance

GET/v1/balancesGet balancesSandbox · coming soon

2. Quote

GET /v1/quotes

curl "https://sandbox.zulu.com.co/v1/quotes?from=COP&to=USD" \
  -H "Authorization: Bearer $ZULU_ACCESS_TOKEN" \
  -H "X-API-Key: $ZULU_API_KEY"

At factor 3973.70, receiving 1,000 USD costs ceil(100,000 × 397,370 / 10⁴) = 3,973,700 COP. Show it to the user before executing; you have 30 seconds.

3. Execute by the destination amount

POST /v1/transactions

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"
}

4. Follow it to settlement

Listen to the TRANSACTIONS webhook or read the conversion. When it is COMPLETED, the dollars are in your USD balance.

GET/v1/transactions/{transactionId}Get a transactionSandbox · coming soon

What can go wrong

ResponseWhat to do
422 quote "…" is expiredMore than 30 seconds passed: quote again and show the cost again.
422 insufficient COP balance to convert …Fund your COP balance (with a PSE link, for example).
422 … is below the minimum or above the maximumFit the amount to the FX limits.
HTTPerrorcauseDescription
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.
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).