Conversions
Convert part of your own balance from one currency to another, at a price you lock first with a quote.
A conversion moves value between two of your own balances: CAD or USD into a digital dollar (USDC or USDT), or back. You always know the exact price before anything moves, because a conversion executes a quote you requested first.
Two calls, one price
- Quote the conversion with
POST /v1/quotes, withoutmethod: that's what makes it a conversion instead of a payout. - Convert with
POST /v1/conversions, sending the quote'sidwhile it lasts.
You pay exactly the quote's source.total and receive exactly its destination.amount.
Canadian dollars
CAD reaches your balance through Canadian rails (Interac e-Transfer, EFT), which run in sandbox only for now. See Countries and methods.
1. Quote the conversion
POST/v1/quotescurl "$CAIBO_API/v1/quotes" \
-H "Authorization: Bearer $CAIBO_API_KEY" \
-H "Idempotency-Key: convert-quote-001" \
-H "Content-Type: application/json" \
-d '{
"source_currency": "USD",
"destination_currency": "USDC",
"amount": "1000.00",
"amount_side": "source"
}'| Field | Description |
|---|---|
source_currency | The balance the money leaves. |
destination_currency | The balance the money arrives in. |
amount | The fixed amount, as a decimal string. |
amount_side | source: amount is what leaves your balance. destination: amount is what arrives. |
The quote tells you the rate, what leaves (source.total, which is principal + platform_fee + tenant_markup) and what arrives (destination.amount). It's valid for a short time: use it before it expires.
2. Convert
POST/v1/conversionscurl "$CAIBO_API/v1/conversions" \
-H "Authorization: Bearer $CAIBO_API_KEY" \
-H "Idempotency-Key: convert-001" \
-H "Content-Type: application/json" \
-d '{ "quote_id": "quo_01m3sgaz0000000000000000" }'The quote's total is held from your available balance in the source currency, and the quote can't be used by anything else. The conversion is executed asynchronously.
Statuses
| Status | What it means |
|---|---|
pending | The total is held and the conversion is being executed. |
pending_review | The risk controls asked a person to look. The total is held and nothing is executed until then; risk_decision_id says which decision. Approved, it becomes pending; rejected, it fails with risk_rejected and the hold is released. |
completed | destination.amount is in your available balance. |
failed | Nothing was converted and the hold was released. failure_code says why: conversion_refused or risk_rejected. |
Follow it with the conversion.created, conversion.completed and conversion.failed events, or with GET/v1/conversions/{id}.
When it's refused
Nothing is held and the quote is not used in any of these cases:
| Response | Why |
|---|---|
422 insufficient_funds | Your available balance doesn't cover the total. The quote stays usable while it lasts. |
422 quote_expired | The quote expired. Request a new one. |
409 quote_already_used | The quote was already used by another operation. |
404 | The quote isn't yours. |
422 limit_exceeded | A limit on your account. |
422 risk_blocked | The risk controls refused it. |
503 operation_suspended | Conversions are paused for now. Retry later. |
Repeating the request with the same Idempotency-Key returns the same conversion: it never converts twice. See Idempotency.