Skip to main content
POST
/
v1
/
conversion
Create Conversion
curl --request POST \
  --url https://api-sandbox.uqpaytech.com/api/v1/conversion \
  --header 'Content-Type: application/json' \
  --header 'x-auth-token: <api-key>' \
  --header 'x-idempotency-key: <x-idempotency-key>' \
  --data '
{
  "quote_id": "784832f7-1f8a-4b08-ac2a-8719b5b2a590",
  "sell_currency": "USD",
  "buy_currency": "SGD",
  "conversion_date": "2024-08-26",
  "sell_amount": "1000.00",
  "buy_amount": "1000.00"
}
'
{
  "conversion_id": "784832f7-1f8a-4b08-ac2a-8719b5b2a590",
  "short_reference_id": "P220406-LLCVLRM",
  "sell_currency": "USD",
  "sell_amount": "10",
  "buy_currency": "SGD",
  "buy_amount": "7.36",
  "created_date": "2024-08-22T17:12:58+08:00",
  "currency_pair": "USDSGD",
  "reference": "XC240822-TXCRW2EI",
  "status": "AWAITING_FUNDS"
}

Authorizations

x-auth-token
string
header
required

The API token for login provided by UQPay.

Headers

x-on-behalf-of
string

Specifies the sub-account on whose behalf the request is made. This should be set to the account_id, which can be retrieved via the List Connected Accounts. If omitted or empty, the request is executed using the master account. More information at Connected Accounts.

x-idempotency-key
string<uuid>
required

A unique identifier (UUID) used to maintain operation idempotency, ensuring that repeated executions of the same operation do not result in unintended effects or duplication. It helps preserve data consistency in the face of network errors, retries, or failures.

Body

application/json
quote_id
string
required

A unique UUID identifier for the quote.

Example:

"784832f7-1f8a-4b08-ac2a-8719b5b2a590"

sell_currency
string
required

Currency code ISO_4217.

Example:

"USD"

buy_currency
string
required

Currency code ISO_4217.

Example:

"SGD"

conversion_date
string
required

The designated date on which the currency conversion will be executed. This must be a valid available date for conversion.

Only the current calendar date is supported — past or future dates are not allowed.
Format: YYYY-MM-DD.

Example:

"2024-08-26"

sell_amount
string

The amount of the currency that was sold in the conversion.

Example:

"1000.00"

buy_amount
string

The amount of the currency that was purchased in the conversion.

Example:

"1000.00"

Response

OK - Successfully retrieved a payout.

conversion_id
string
required

A unique UUID identifier for the conversion transaction.

Example:

"784832f7-1f8a-4b08-ac2a-8719b5b2a590"

short_reference_id
string
required

The reference generated by the system to identify the entity.

Example:

"P220406-LLCVLRM"

sell_currency
string
required

Currency code ISO_4217.

Example:

"USD"

sell_amount
string
required

The amount of the currency that was sold in the conversion.

Example:

"10"

buy_currency
string
required

Currency code ISO_4217.

Example:

"SGD"

buy_amount
string
required

The amount of the currency that was purchased in the conversion.

Example:

"7.36"

created_date
string
required

The timestamp when the conversion transaction was initiated.

Example:

"2024-08-22T17:12:58+08:00"

currency_pair
string
required

The currency pair that the quote is for. The direction of the currency pair is per market convention where possible.

Example:

"USDSGD"

reference
string
required

The reference generated by the system to identify the entity.

Example:

"XC240822-TXCRW2EI"

status
string
required

The current status of the conversion transaction. Valid values are:

  • PROCESSING: Currency conversion request is being processed by the system.
  • AWAITING_FUNDS: System is waiting for the source funds to be available.
  • TRADE_SETTLED: Currency exchange has been executed at the agreed rate.
  • FUNDS_ARRIVED: Converted funds have been received in the target currency.
Example:

"AWAITING_FUNDS"