Skip to main content

Step 1: Generate a Quote ID

Before creating a conversion order, you must obtain a valid quote_id, which defines the exchange rate and other parameters for the transaction. Use the Create Quote API to generate this ID. Call List Conversion Dates first to confirm that today’s date is available for the currency pair. Create Quote and Create Conversion currently require conversion_date to be today’s date and do not support scheduling a future conversion date. Before creating the quote, use List Balances or Retrieve Balance to confirm that the sell currency account has enough available balance.
Important:
  • Ensure that the sell_amount value exactly matches the amount you intend to use for the conversion order.
    Using a different amount may result in the request being rejected, as it must align with the quote_id generated for that specific amount.
  • A Quote ID is valid for 75 seconds. You must create the conversion within this time frame; otherwise, the quote will expire.

Create Quote - Request example

Notes:
  • You can use buy_amount instead of sell_amount.
    The system will automatically calculate the corresponding amount in the other currency.
    However, make sure to include only one of these parameters — either sell_amount or buy_amount, but not both.
  • Use the same parameter in both APIs — if buy_amount is used in Create Quote, use buy_amount in Create Conversion, and the same applies to sell_amount.
    This ensures consistency and successful processing.

Create Quote - Response example

Step 2: Create the Conversion

Once you have a valid Quote ID, use the Create Conversion API to initiate the conversion order.

Create Conversion - Request example

Create Conversion - Response example

After you make the conversion order, the system will trigger the following webhooks: conversion.funds.awaiting and conversion.funds.arrived.
  • conversion.funds.awaiting: The conversion order has been placed successfully.
  • conversion.funds.arrived: The funds in the sell currency account have been deducted.

Webhook example: conversion.funds.awaiting

Webhook example: conversion.funds.arrived

Step 3: Order Completion

Once the order is submitted, please wait for UQPAY to review and approve the currency exchange. Users may receive one of the following webhooks, depending on the outcome of the conversion order:
  • conversion.trade.failed: The conversion order has failed or been cancelled.
  • conversion.trade.settled: The conversion has been successfully completed.

Webhook example: conversion.trade.failed

Webhook example: conversion.trade.settled

After approval, the conversion process will be completed, and the exchanged funds will be available in your account. If you need to reconcile the debit from the sell currency and the credit to the buy currency, use List Balances Transactions. To check one conversion order directly, use the Retrieve Conversion API with the conversion_id returned by Create Conversion or conversion webhooks. To view the conversion orders you’ve created, use the List Conversion API. This endpoint retrieves a list of all conversion orders associated with your account.

List Conversion - Request example

List Conversion - Response example