Skip to main content
The Execute Conversion endpoint consumes a quote obtained from POST /conversions/quote and immediately performs the currency conversion at the locked rate. This is useful when you want to convert stablecoin balances within your RemitFlex account without initiating a payment — for example, to pre-fund a specific currency balance before a batch of payouts. You must execute the conversion within 30 seconds of requesting the quote, or the quote_id will have expired.

Request

quote_id
string
required
The unique quote identifier returned by POST /conversions/quote, prefixed with qt_. The quote must not be expired at the time of this request. Quotes are valid for 30 seconds from their created_at timestamp.

Response

conversion_id
string
Unique conversion identifier with prefix con_. Use this to reference the conversion in your records.
quote_id
string
The qt_-prefixed quote identifier that was consumed to execute this conversion.
status
string
Final status of the conversion. Possible values:
ValueDescription
completedConversion executed successfully and funds are available in your balance.
failedConversion could not be completed. No funds were moved.
from_currency
string
The source currency that was converted from.
to_currency
string
The target currency that was converted into.
amount
number
The source amount that was converted, denominated in from_currency.
converted_amount
number
The amount credited to your balance in to_currency after the conversion and fee deduction.
exchange_rate
number
The exact exchange rate that was applied, as locked in the original quote.
fee
number
The RemitFlex fee charged for the conversion, denominated in from_currency.
created_at
string
ISO 8601 timestamp of when the conversion was initiated.
completed_at
string
ISO 8601 timestamp of when the conversion was completed. null if status is failed.

Examples

curl -X POST https://api.remitflex.com/v1/conversions/execute \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "quote_id": "qt_01HX9M2PABCDEF"
  }'
{
  "conversion_id": "con_01HX9M3QGHIJKL",
  "quote_id": "qt_01HX9M2PABCDEF",
  "status": "completed",
  "from_currency": "USDC",
  "to_currency": "EUR",
  "amount": 1000,
  "converted_amount": 922.50,
  "exchange_rate": 0.9225,
  "fee": 2.50,
  "created_at": "2024-01-15T10:30:01Z",
  "completed_at": "2024-01-15T10:30:05Z"
}

Error Responses

If the quote_id has expired (more than 30 seconds have passed since the quote was created), the API returns a 422 Unprocessable Entity error. You must request a fresh quote and retry.
{
  "error": {
    "code": "QUOTE_EXPIRED",
    "message": "Quote qt_01HX9M2PABCDEF has expired. Please request a new quote."
  }
}
If the quote_id does not exist or was already consumed by a previous execution, the API returns a 404 Not Found error.
{
  "error": {
    "code": "NOT_FOUND",
    "message": "Quote qt_01HX9M2PABCDEF not found or has already been used."
  }
}